mirror of
https://github.com/qrtc/ffmpeg-dev-go.git
synced 2025-10-07 00:23:49 +08:00
2023-11-02 10:14:31 CST W44D4
This commit is contained in:
@@ -93,12 +93,6 @@ func AvTimecodeGetSmpteFromFramenum(tc *AVTimecode, framenum int32) uint32 {
|
||||
return (uint32)(C.av_timecode_get_smpte_from_framenum((*C.AVTimecode)(tc), (C.int)(framenum)))
|
||||
}
|
||||
|
||||
// AvTimecodeGetSmpte converts sei info to SMPTE 12M binary representation.
|
||||
func AvTimecodeGetSmpte(rate AVRational, drop, hh, mm, ss, ff int32) int32 {
|
||||
return (int32)(C.av_timecode_get_smpte((C.struct_AVRational)(rate),
|
||||
(C.int)(drop), (C.int)(hh), (C.int)(mm), (C.int)(ss), (C.int)(ff)))
|
||||
}
|
||||
|
||||
// AvTimecodeMakeString loads timecode string in buf.
|
||||
func AvTimecodeMakeString(tc *AVTimecode, framenum int32) (buf, bufPar string) {
|
||||
b := make([]C.char, AV_TIMECODE_STR_SIZE+1)
|
||||
@@ -106,14 +100,6 @@ func AvTimecodeMakeString(tc *AVTimecode, framenum int32) (buf, bufPar string) {
|
||||
return C.GoString(&b[0]), C.GoString(ret)
|
||||
}
|
||||
|
||||
// AvTimecodeMakeSmpteTcString2 gets the timecode string from the SMPTE timecode format.
|
||||
func AvTimecodeMakeSmpteTcString2(rate AVRational, tcsmpte uint32, preventDf, skipField int32) (buf, bufPar string) {
|
||||
b := make([]C.char, AV_TIMECODE_STR_SIZE+1)
|
||||
ret := C.av_timecode_make_smpte_tc_string2((*C.char)(&b[0]),
|
||||
(C.AVRational)(rate), (C.uint32_t)(tcsmpte), (C.int)(preventDf), (C.int)(skipField))
|
||||
return C.GoString(&b[0]), C.GoString(ret)
|
||||
}
|
||||
|
||||
// AvTimecodeMakeSmpteTcString gets the timecode string from the SMPTE timecode format.
|
||||
func AvTimecodeMakeSmpteTcString(tcsmpte uint32, preventDf int32) (buf, bufPar string) {
|
||||
b := make([]C.char, AV_TIMECODE_STR_SIZE+1)
|
||||
@@ -134,15 +120,6 @@ func AvTimecodeInit(tc *AVTimecode, rate AVRational, flags, frameStart int32, lo
|
||||
(C.int)(flags), (C.int)(frameStart), VoidPointer(logCtx)))
|
||||
}
|
||||
|
||||
// AvTimecodeInitFromComponents initializes a timecode struct from the passed timecode components.
|
||||
func AvTimecodeInitFromComponents(tc *AVTimecode, rate AVRational,
|
||||
flags, hh, mm, ss, ff int32, logCtx CVoidPointer) int32 {
|
||||
return (int32)(C.av_timecode_init_from_components((*C.AVTimecode)(tc),
|
||||
(C.struct_AVRational)(rate), (C.int)(flags),
|
||||
(C.int)(hh), (C.int)(mm), (C.int)(ss), (C.int)(ff),
|
||||
VoidPointer(logCtx)))
|
||||
}
|
||||
|
||||
// AvTimecodeInitFromString parses timecode representation (hh:mm:ss[:;.]ff).
|
||||
func AvTimecodeInitFromString(tc *AVTimecode, rate AVRational, str string, logCtx CVoidPointer) int32 {
|
||||
strPtr, strFunc := StringCasting(str)
|
||||
|
Reference in New Issue
Block a user