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
81 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
class EnumType(type): | ||
def __init__(self, name, bases, attrs, items): ... | ||
def _create(self, name: str, value: int, doc=None, by_value_only=False): ... | ||
def __len__(self): ... | ||
def __iter__(self): ... | ||
def __getitem__(self, key): ... | ||
def _get(self, value: int, create: bool = False): ... | ||
def _get_multi_flags(self, value: int): ... | ||
def get( | ||
self, key, default: int | None = None, create: bool = False | ||
) -> int | None: ... | ||
|
||
class EnumItem: | ||
name: str | ||
value: int | ||
|
||
def __int__(self): ... | ||
def __hash__(self): ... | ||
def __reduce__(self): ... | ||
def __eq__(self, other) -> bool: ... | ||
def __ne__(self, other) -> bool: ... | ||
|
||
class EnumFlag(EnumItem): | ||
flags: tuple[EnumFlag] | ||
|
||
def __and__(self, other): ... | ||
def __or__(self, other): ... | ||
def __xor__(self, other): ... | ||
def __invert__(self): ... | ||
def __nonzero__(self) -> bool: ... |
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,2 @@ | ||
from .frame import VideoFrame | ||
from .stream import VideoStream |
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,24 @@ | ||
class VideoFormat: | ||
name: str | ||
bits_per_pixel: int | ||
padded_bits_per_pixel: int | ||
is_big_endian: bool | ||
has_palette: bool | ||
is_bit_stream: bool | ||
is_planar: bool | ||
is_rgb: bool | ||
|
||
def __init__(self, name: str, width: int = 0, height: int = 0): ... | ||
def chroma_width(self, luma_width: int = 0) -> int: ... | ||
def chroma_height(self, luma_height: int = 0) -> int: ... | ||
|
||
class VideoFormatComponent: | ||
plane: int | ||
bits: int | ||
is_alpha: bool | ||
is_luma: bool | ||
is_chroma: bool | ||
width: int | ||
height: int | ||
|
||
def __init__(self, format: VideoFormat, index: 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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from typing import Any | ||
|
||
from .plane import VideoPlane | ||
|
||
class VideoFrame: | ||
planes: tuple[VideoPlane] | ||
width: int | ||
height: int | ||
key_frame: bool | ||
interlaced_frame: bool | ||
pict_type: Any | ||
|
||
def from_image(img: Any) -> VideoFrame: ... | ||
def __init__( | ||
self, name: str, width: int = 0, height: int = 0, format: str = "yuv420p" | ||
): ... |
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,9 @@ | ||
from .frame import VideoFrame | ||
|
||
class VideoPlane: | ||
line_size: int | ||
width: int | ||
height: int | ||
buffer_size: int | ||
|
||
def __init__(frame: VideoFrame, index: int): ... |