From a837bb59597df2c9a25fb2485e24c384e780801d Mon Sep 17 00:00:00 2001 From: WyattBlue Date: Thu, 18 Apr 2024 04:34:44 -0400 Subject: [PATCH] Add S12_TIMECODE --- av/sidedata/sidedata.pxd | 2 -- av/sidedata/sidedata.pyi | 1 + av/sidedata/sidedata.pyx | 3 ++- include/libavcodec/avcodec.pxd | 3 +-- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/av/sidedata/sidedata.pxd b/av/sidedata/sidedata.pxd index ac58f1477..8a2f6d07c 100644 --- a/av/sidedata/sidedata.pxd +++ b/av/sidedata/sidedata.pxd @@ -7,7 +7,6 @@ from av.frame cimport Frame cdef class SideData(Buffer): - cdef Frame frame cdef lib.AVFrameSideData *ptr cdef _Dictionary metadata @@ -16,7 +15,6 @@ cdef class SideData(Buffer): cdef SideData wrap_side_data(Frame frame, int index) cdef class _SideDataContainer: - cdef Frame frame cdef list _by_index diff --git a/av/sidedata/sidedata.pyi b/av/sidedata/sidedata.pyi index ac28f0dee..e814bb222 100644 --- a/av/sidedata/sidedata.pyi +++ b/av/sidedata/sidedata.pyi @@ -23,6 +23,7 @@ class Type(EnumItem): CONTENT_LIGHT_LEVEL: int ICC_PROFILE: int SEI_UNREGISTERED: int + S12M_TIMECODE: int class SideData(Buffer): type: Type diff --git a/av/sidedata/sidedata.pyx b/av/sidedata/sidedata.pyx index 05ed00219..9b423a30b 100644 --- a/av/sidedata/sidedata.pyx +++ b/av/sidedata/sidedata.pyx @@ -25,7 +25,8 @@ Type = define_enum("Type", __name__, ( ("SPHERICAL", lib.AV_FRAME_DATA_SPHERICAL), ("CONTENT_LIGHT_LEVEL", lib.AV_FRAME_DATA_CONTENT_LIGHT_LEVEL), ("ICC_PROFILE", lib.AV_FRAME_DATA_ICC_PROFILE), - ("SEI_UNREGISTERED", lib.AV_FRAME_DATA_SEI_UNREGISTERED) if lib.AV_FRAME_DATA_SEI_UNREGISTERED != -1 else None, + ("SEI_UNREGISTERED", lib.AV_FRAME_DATA_SEI_UNREGISTERED), + ("S12M_TIMECODE", lib.AV_FRAME_DATA_S12M_TIMECODE), )) diff --git a/include/libavcodec/avcodec.pxd b/include/libavcodec/avcodec.pxd index 49758be4c..16d88a473 100644 --- a/include/libavcodec/avcodec.pxd +++ b/include/libavcodec/avcodec.pxd @@ -10,8 +10,6 @@ cdef extern from "libavcodec/avcodec.h" nogil: #define AV_FRAME_DATA_SEI_UNREGISTERED -1 #endif """ - - # custom cdef set pyav_get_available_codecs() cdef int avcodec_version() @@ -326,6 +324,7 @@ cdef extern from "libavcodec/avcodec.h" nogil: AV_FRAME_DATA_QP_TABLE_PROPERTIES AV_FRAME_DATA_QP_TABLE_DATA AV_FRAME_DATA_SEI_UNREGISTERED + AV_FRAME_DATA_S12M_TIMECODE cdef struct AVFrameSideData: AVFrameSideDataType type