forked from PyAV-Org/PyAV
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
344 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
from typing import Any | ||
|
||
class AudioFormat: | ||
name: str | ||
bytes: int | ||
bits: int | ||
is_planar: bool | ||
is_packed: bool | ||
planar: Any | ||
packed: Any | ||
planar: AudioFormat | ||
packed: AudioFormat | ||
container_name: str |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
channel_descriptions: dict[str, str] | ||
|
||
class AudioLayout: | ||
name: str | ||
layout: int | ||
nb_channels: int | ||
channels: tuple[AudioChannels] | ||
channels: tuple[AudioChannel, ...] | ||
|
||
class AudioChannels: | ||
class AudioChannel: | ||
name: str | ||
description: str |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
class AudioPlane: | ||
from av.plane import Plane | ||
|
||
class AudioPlane(Plane): | ||
buffer_size: int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
from av.filter.graph import Graph | ||
|
||
from .format import AudioFormat | ||
from .frame import AudioFrame | ||
from .layout import AudioLayout | ||
|
||
class AudioResampler: | ||
rate: int | ||
frame_size: int | ||
format: AudioFormat | ||
graph: None | ||
graph: Graph | None | ||
|
||
def __init__( | ||
self, | ||
format=None, | ||
layout=None, | ||
format: AudioFormat | None = None, | ||
layout: AudioLayout | None = None, | ||
rate: int | None = None, | ||
frame_size: int | None = None, | ||
): ... | ||
def resample(self, frame: AudioFrame | None) -> list: ... | ||
) -> None: ... | ||
def resample(self, frame: AudioFrame | None) -> list[AudioFrame]: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,16 @@ | ||
from typing import Literal | ||
|
||
from av.packet import Packet | ||
from av.stream import Stream | ||
|
||
class AudioStream(Stream): ... | ||
from .codeccontext import AudioCodecContext | ||
from .format import AudioFormat | ||
from .frame import AudioFrame | ||
|
||
class AudioStream(Stream): | ||
type: Literal["audio"] | ||
format: AudioFormat | ||
codec_context: AudioCodecContext | ||
|
||
def encode(self, frame: AudioFrame | None = None) -> list[Packet]: ... # type: ignore[override] | ||
def decode(self, packet: Packet | None = None) -> list[AudioFrame]: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,21 @@ | ||
from fractions import Fraction | ||
from typing import Sequence | ||
|
||
from av.packet import Packet | ||
from av.stream import Stream | ||
|
||
from .core import Container | ||
|
||
class OutputContainer(Container): | ||
def __enter__(self) -> OutputContainer: ... | ||
def add_stream( | ||
self, | ||
codec_name: str | None = None, | ||
rate: Fraction | int | float | None = None, | ||
template: Stream | None = None, | ||
options: dict[str, str] | None = None, | ||
) -> Stream: ... | ||
def start_encoding(self) -> None: ... | ||
def close(self) -> None: ... | ||
def mux(self, packets: Sequence[Packet]) -> None: ... | ||
def mux_one(self, packet: Packet) -> None: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.