avframe fields
This commit is contained in:
31
mp4/libav.py
31
mp4/libav.py
@ -40,8 +40,32 @@ AVMEDIA_TYPE_DATA = 2
|
||||
AVMEDIA_TYPE_SUBTITLE = 3
|
||||
AVMEDIA_TYPE_ATTACHMENT = 4
|
||||
|
||||
AV_NUM_DATA_POINTERS = 8
|
||||
|
||||
c_uint8_p = ctypes.POINTER(ctypes.c_uint8)
|
||||
c_uint8_pp = ctypes.POINTER(c_uint8_p)
|
||||
|
||||
class AVRational(ctypes.Structure):
|
||||
_fields_ = [
|
||||
("num", ctypes.c_int),
|
||||
("den", ctypes.c_int)]
|
||||
|
||||
class AVFrame(ctypes.Structure):
|
||||
pass
|
||||
_fields_ = [
|
||||
("data", c_uint8_p * AV_NUM_DATA_POINTERS),
|
||||
("linesize", ctypes.c_int * AV_NUM_DATA_POINTERS),
|
||||
("extended_data", c_uint8_pp),
|
||||
("width", ctypes.c_int),
|
||||
("height", ctypes.c_int),
|
||||
("nb_samples", ctypes.c_int),
|
||||
("format", ctypes.c_int),
|
||||
("key_frame", ctypes.c_int),
|
||||
("pict_type", ctypes.c_int),
|
||||
("sample_aspect_ratio", AVRational),
|
||||
("pts", ctypes.c_int64),
|
||||
("pkt_dts", ctypes.c_int64),
|
||||
("time_base", AVRational)]
|
||||
# ...
|
||||
|
||||
AVFrame_p = ctypes.POINTER(AVFrame)
|
||||
AVFrame_pp = ctypes.POINTER(AVFrame_p)
|
||||
@ -51,11 +75,6 @@ class AVCodecParameters(ctypes.Structure):
|
||||
|
||||
AVCodecParameters_p = ctypes.POINTER(AVCodecParameters)
|
||||
|
||||
class AVRational(ctypes.Structure):
|
||||
_fields_ = [
|
||||
("num", ctypes.c_int),
|
||||
("den", ctypes.c_int)]
|
||||
|
||||
class AVStream(ctypes.Structure):
|
||||
_fields_ = [
|
||||
("av_class", ctypes.c_void_p),
|
||||
|
||||
Reference in New Issue
Block a user