Skip to content

Commit 9d223f1

Browse files
committed
Add annotations to encode_frames_with_qminmax
1 parent d2e95a1 commit 9d223f1

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

av/stream.pyi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ class Stream:
4848
language: str | None
4949
type: Literal["video", "audio", "data", "subtitle", "attachment"]
5050

51+
# From context
52+
codec_tag: str
53+
5154
class DataStream(Stream):
5255
type: Literal["data"]
5356
name: str | None

tests/test_encode.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
import io
24
import math
35
from fractions import Fraction
@@ -409,7 +411,9 @@ def test_max_b_frames(self) -> None:
409411
assert actual_max_b_frames <= max_b_frames
410412

411413

412-
def encode_frames_with_qminmax(frames: list, shape: tuple, qminmax: tuple) -> int:
414+
def encode_frames_with_qminmax(
415+
frames: list[VideoFrame], shape: tuple[int, int, int], qminmax: tuple[int, int]
416+
) -> int:
413417
"""
414418
Encode a video with the given quantiser limits, and return how many enocded
415419
bytes we made in total.

0 commit comments

Comments
 (0)