From c5289d80cddca088c5c1bf935e435aba8262cd2b Mon Sep 17 00:00:00 2001 From: "H.G. Giorgis" Date: Tue, 1 Sep 2015 00:36:25 -0400 Subject: [PATCH] Minor AVFrame update --- avutil/avutil.go | 11 ----------- avutil/frame.go | 12 +++++++----- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/avutil/avutil.go b/avutil/avutil.go index ab4cb15..a4fdfef 100644 --- a/avutil/avutil.go +++ b/avutil/avutil.go @@ -81,14 +81,3 @@ func Av_fopen_utf8(p, m string) *File { func Av_get_time_base_q() AVRational { return (AVRational)(C.av_get_time_base_q()) } - -///////////////////////////////////////////////////////////////////////// -//Exported -///////////////////////////////////////////////////////////////////////// - -func Data(f *AVFrame) *uint8 { - return (*uint8)(unsafe.Pointer((*C.uint8_t)(unsafe.Pointer(&f.data)))) -} -func Linesize(f *AVFrame) int { - return int(*(*C.int)(unsafe.Pointer(&f.linesize))) -} diff --git a/avutil/frame.go b/avutil/frame.go index 7420552..ebe0392 100644 --- a/avutil/frame.go +++ b/avutil/frame.go @@ -23,11 +23,6 @@ type ( AVFrameSideDataType C.enum_AVFrameSideDataType ) -//WHERE ?? -//'get_frame_defaults' undeclared (first use in this function) -//'get_audio_buffer' undeclared (first use in this function) -//'get_video_buffer' undeclared (first use in this function) - //AVDictionary ** avpriv_frame_get_metadatap (AVFrame *frame) func Avpriv_frame_get_metadatap(f *AVFrame) **AVDictionary { return (**AVDictionary)(unsafe.Pointer(C.avpriv_frame_get_metadatap((*C.struct_AVFrame)(unsafe.Pointer(f))))) @@ -135,3 +130,10 @@ func Av_frame_new_side_data(f *AVFrame, d AVFrameSideDataType, s int) *AVFrameSi func Av_frame_get_side_data(f *AVFrame, t AVFrameSideDataType) *AVFrameSideData { return (*AVFrameSideData)(C.av_frame_get_side_data((*C.struct_AVFrame)(unsafe.Pointer(f)), (C.enum_AVFrameSideDataType)(t))) } + +func Data(f *AVFrame) *uint8 { + return (*uint8)(unsafe.Pointer((*C.uint8_t)(unsafe.Pointer(&f.data)))) +} +func Linesize(f *AVFrame) int { + return int(*(*C.int)(unsafe.Pointer(&f.linesize))) +}