Debian Codegraph @

av/audio/stream.pyi

raw
1 from typing import Literal
2
3 from av.packet import Packet
4 from av.stream import Stream
5
6 from .codeccontext import AudioCodecContext
7 from .format import AudioFormat
8 from .frame import AudioFrame
9 from .layout import AudioLayout
10
11 class _Format:
12 def __get__(self, i: object | None, owner: type | None = None) -> AudioFormat: ...
13 def __set__(self, instance: object, value: AudioFormat | str) -> None: ...
14
15 class _Layout:
16 def __get__(self, i: object | None, owner: type | None = None) -> AudioLayout: ...
17 def __set__(self, instance: object, value: AudioLayout | str) -> None: ...
18
19 class AudioStream(Stream):
20 codec_context: AudioCodecContext
21 def encode(self, frame: AudioFrame | None = None) -> list[Packet]: ...
22 def decode(self, packet: Packet | None = None) -> list[AudioFrame]: ...
23
24 # From codec context
25 frame_size: int
26 sample_rate: int
27 bit_rate: int
28 rate: int
29 channels: int
30 type: Literal["audio"]
31 format: _Format
32 layout: _Layout