File: hwaccel.pyi

package info (click to toggle)
python-av 16.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,684 kB
  • sloc: python: 7,607; sh: 182; ansic: 174; makefile: 135
file content (50 lines) | stat: -rw-r--r-- 1,317 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
from enum import IntEnum
from typing import cast

from av.codec.codec import Codec
from av.video.format import VideoFormat

class HWDeviceType(IntEnum):
    none = cast(int, ...)
    vdpau = cast(int, ...)
    cuda = cast(int, ...)
    vaapi = cast(int, ...)
    dxva2 = cast(int, ...)
    qsv = cast(int, ...)
    videotoolbox = cast(int, ...)
    d3d11va = cast(int, ...)
    drm = cast(int, ...)
    opencl = cast(int, ...)
    mediacodec = cast(int, ...)
    vulkan = cast(int, ...)
    d3d12va = cast(int, ...)

class HWConfigMethod(IntEnum):
    none = cast(int, ...)
    hw_device_ctx = cast(int, ...)
    hw_frame_ctx = cast(int, ...)
    internal = cast(int, ...)
    ad_hoc = cast(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,
        flags: int | None = None,
    ) -> None: ...
    def create(self, codec: Codec) -> HWAccel: ...

def hwdevices_available() -> list[str]: ...