Minor AVFrame update

This commit is contained in:
H.G. Giorgis
2015-09-01 00:36:25 -04:00
parent 5b60b5ef58
commit c5289d80cd
2 changed files with 7 additions and 16 deletions
-11
View File
@@ -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)))
}
+7 -5
View File
@@ -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)))
}