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
5 changed files
with
150 additions
and
143 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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
from numbers import Real | ||
from pathlib import Path | ||
from typing import Any, Literal, overload | ||
|
||
from av import InputContainer, OutputContainer | ||
|
||
@overload | ||
def open( | ||
file: Any, | ||
mode: Literal["r"], | ||
format: str | None = None, | ||
options: dict[str, str] | None = None, | ||
container_options: dict[str, str] | None = None, | ||
stream_options: list[str] | None = None, | ||
metadata_encoding: str = "utf-8", | ||
metadata_errors: str = "strict", | ||
buffer_size: int = 32768, | ||
timeout=Real | None | tuple[Real | None, Real | None], | ||
io_open=None, | ||
) -> InputContainer: ... | ||
@overload | ||
def open( | ||
file: str | Path, | ||
mode: Literal["r"] | None = None, | ||
format: str | None = None, | ||
options: dict[str, str] | None = None, | ||
container_options: dict[str, str] | None = None, | ||
stream_options: list[str] | None = None, | ||
metadata_encoding: str = "utf-8", | ||
metadata_errors: str = "strict", | ||
buffer_size: int = 32768, | ||
timeout=Real | None | tuple[Real | None, Real | None], | ||
io_open=None, | ||
) -> InputContainer: ... | ||
@overload | ||
def open( | ||
file: Any, | ||
mode: Literal["w"], | ||
format: str | None = None, | ||
options: dict[str, str] | None = None, | ||
container_options: dict[str, str] | None = None, | ||
stream_options: list[str] | None = None, | ||
metadata_encoding: str = "utf-8", | ||
metadata_errors: str = "strict", | ||
buffer_size: int = 32768, | ||
timeout=Real | None | tuple[Real | None, Real | None], | ||
io_open=None, | ||
) -> OutputContainer: ... | ||
@overload | ||
def open( | ||
file: Any, | ||
mode: Literal["r", "w"] | None = None, | ||
format: str | None = None, | ||
options: dict[str, str] | None = None, | ||
container_options: dict[str, str] | None = None, | ||
stream_options: list[str] | None = None, | ||
metadata_encoding: str = "utf-8", | ||
metadata_errors: str = "strict", | ||
buffer_size: int = 32768, | ||
timeout=Real | None | tuple[Real | None, Real | None], | ||
io_open=None, | ||
) -> InputContainer | OutputContainer: ... |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from av.logging import get_last_error | ||
|
||
classes: dict[int, Exception] | ||
|
||
def code_to_tag(code: int) -> bytes: ... | ||
def tag_to_code(tag: bytes) -> int: ... | ||
def make_error(res: int, filename=None, log=None): ... | ||
|
||
class FFmpegError(Exception): | ||
def __init__(self, code: int, message, filename=None, log=None): ... | ||
|
||
class LookupError(FFmpegError): ... | ||
class HTTPError(FFmpegError): ... | ||
class HTTPClientError(FFmpegError): ... | ||
class UndefinedError(FFmpegError): ... |
Oops, something went wrong.