Debian Codegraph @

av/video/stream.pyi

raw
1 from collections.abc import Sequence
2 from fractions import Fraction
3 from typing import Iterator, Literal
4
5 from av.codec.context import ThreadType
6 from av.packet import Packet
7 from av.stream import Stream
8
9 from .codeccontext import VideoCodecContext
10 from .format import VideoFormat
11 from .frame import VideoFrame
12
13 class VideoStream(Stream):
14 bit_rate: int | None
15 max_bit_rate: int | None
16 bit_rate_tolerance: int
17 sample_aspect_ratio: Fraction | None
18 display_aspect_ratio: Fraction | None
19 codec_context: VideoCodecContext
20
21 def encode(self, frame: VideoFrame | None = None) -> list[Packet]: ...
22 def encode_lazy(self, frame: VideoFrame | None = None) -> Iterator[Packet]: ...
23 def decode(self, packet: Packet | None = None) -> list[VideoFrame]: ...
24 def set_display_matrix(self, matrix: Sequence[int] | None) -> None: ...
25 def set_display_rotation(
26 self, degrees: float, hflip: bool = ..., vflip: bool = ...
27 ) -> None: ...
28
29 # from codec context
30 format: VideoFormat
31 thread_count: int
32 thread_type: ThreadType
33 width: int
34 height: int
35 bits_per_coded_sample: int
36 pix_fmt: str | None
37 framerate: Fraction
38 rate: Fraction
39 gop_size: int
40 has_b_frames: bool
41 max_b_frames: int
42 coded_width: int
43 coded_height: int
44 color_range: int
45 color_primaries: int
46 color_trc: int
47 colorspace: int
48 type: Literal["video"]