feat: add setter and getter for extra_hw_frames (#52)

This commit is contained in:
l0rem1psum
2024-03-12 15:59:46 +08:00
committed by GitHub
parent d3d2df833b
commit a4f27be76e
2 changed files with 10 additions and 0 deletions

View File

@@ -314,6 +314,14 @@ func (cc *CodecContext) SetHardwareDeviceContext(hdc *HardwareDeviceContext) {
}
}
func (cc *CodecContext) ExtraHardwareFrames() int {
return int(cc.c.extra_hw_frames)
}
func (cc *CodecContext) SetExtraHardwareFrames(n int) {
cc.c.extra_hw_frames = C.int(n)
}
type CodecContextPixelFormatCallback func(pfs []PixelFormat) PixelFormat
var (