File: format.pxd

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 (27 lines) | stat: -rw-r--r-- 727 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
cimport libav as lib


cdef class VideoFormat:

    cdef lib.AVPixelFormat pix_fmt
    cdef const lib.AVPixFmtDescriptor *ptr
    cdef readonly unsigned int width, height

    cdef readonly tuple components

    cdef _init(self, lib.AVPixelFormat pix_fmt, unsigned int width, unsigned int height)

    cpdef chroma_width(self, int luma_width=?)
    cpdef chroma_height(self, int luma_height=?)


cdef class VideoFormatComponent:

    cdef VideoFormat format
    cdef readonly unsigned int index
    cdef const lib.AVComponentDescriptor *ptr


cdef VideoFormat get_video_format(lib.AVPixelFormat c_format, unsigned int width, unsigned int height)

cdef lib.AVPixelFormat get_pix_fmt(const char *name) except lib.AV_PIX_FMT_NONE