-
Notifications
You must be signed in to change notification settings - Fork 369
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This implements hardware decoding continuing from the work of @rvillalba-novetta and @mikeboers with cleanup work by @WyattBlue.
- Loading branch information
1 parent
6eaf701
commit 2c63608
Showing
29 changed files
with
649 additions
and
23 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
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 +1 @@ | ||
__version__ = "14.0.1" | ||
__version__ = "14.1.0" |
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
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
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,20 @@ | ||
cimport libav as lib | ||
|
||
from av.codec.codec cimport Codec | ||
|
||
|
||
cdef class HWConfig: | ||
cdef object __weakref__ | ||
cdef lib.AVCodecHWConfig *ptr | ||
cdef void _init(self, lib.AVCodecHWConfig *ptr) | ||
|
||
cdef HWConfig wrap_hwconfig(lib.AVCodecHWConfig *ptr) | ||
|
||
cdef class HWAccel: | ||
cdef int _device_type | ||
cdef str _device | ||
cdef readonly Codec codec | ||
cdef readonly HWConfig config | ||
cdef lib.AVBufferRef *ptr | ||
cdef public bint allow_software_fallback | ||
cdef public dict options |
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,48 @@ | ||
from enum import IntEnum | ||
|
||
from av.codec.codec import Codec | ||
from av.video.format import VideoFormat | ||
|
||
class HWDeviceType(IntEnum): | ||
none: int | ||
vdpau: int | ||
cuda: int | ||
vaapi: int | ||
dxva2: int | ||
qsv: int | ||
videotoolbox: int | ||
d3d11va: int | ||
drm: int | ||
opencl: int | ||
mediacodec: int | ||
vulkan: int | ||
d3d12va: int | ||
|
||
class HWConfigMethod(IntEnum): | ||
none: int | ||
hw_device_ctx: int | ||
hw_frame_ctx: int | ||
internal: int | ||
ad_hoc: int | ||
|
||
class HWConfig: | ||
@property | ||
def device_type(self) -> HWDeviceType: ... | ||
@property | ||
def format(self) -> VideoFormat: ... | ||
@property | ||
def methods(self) -> HWConfigMethod: ... | ||
@property | ||
def is_supported(self) -> bool: ... | ||
|
||
class HWAccel: | ||
def __init__( | ||
self, | ||
device_type: str | HWDeviceType, | ||
device: str | None = None, | ||
allow_software_fallback: bool = False, | ||
options: dict[str, object] | None = None, | ||
) -> None: ... | ||
def create(self, codec: Codec) -> HWAccel: ... | ||
|
||
def hwdevices_available() -> list[str]: ... |
Oops, something went wrong.