Expose pointer to underlying AVCodecContext (#95)

* feat: expose pointer to underlying C object

* feat: add ut
This commit is contained in:
l0rem1psum
2024-11-05 15:58:34 +08:00
committed by GitHub
parent bc148523bc
commit 0d3622405a
2 changed files with 6 additions and 0 deletions

View File

@@ -340,6 +340,10 @@ func (cc *CodecContext) SetExtraHardwareFrames(n int) {
cc.c.extra_hw_frames = C.int(n)
}
func (cc *CodecContext) UnsafePointer() unsafe.Pointer {
return unsafe.Pointer(cc.c)
}
type CodecContextPixelFormatCallback func(pfs []PixelFormat) PixelFormat
var (