mirror of
https://github.com/asticode/go-astiav.git
synced 2025-10-05 08:06:59 +08:00
merge master and add SetHardwareDeviceContext (#126)
This commit is contained in:
@@ -40,6 +40,18 @@ func (fc *FilterContext) Class() *Class {
|
||||
return newClassFromC(unsafe.Pointer(fc.c))
|
||||
}
|
||||
|
||||
// https://ffmpeg.org/doxygen/7.0/structAVFilterContext.html#addd946fbe5af506a2b19f9ad7cb97c35
|
||||
func (fc *FilterContext) SetHardwareDeviceContext(hdc *HardwareDeviceContext) {
|
||||
if fc.c.hw_device_ctx != nil {
|
||||
C.av_buffer_unref(&fc.c.hw_device_ctx)
|
||||
}
|
||||
if hdc != nil {
|
||||
fc.c.hw_device_ctx = C.av_buffer_ref(hdc.c)
|
||||
} else {
|
||||
fc.c.hw_device_ctx = nil
|
||||
}
|
||||
}
|
||||
|
||||
// https://ffmpeg.org/doxygen/7.0/structAVFilterContext.html#a6eee53e57dddfa7cca1cade870c8a44e
|
||||
func (fc *FilterContext) Filter() *Filter {
|
||||
return newFilterFromC(fc.c.filter)
|
||||
|
Reference in New Issue
Block a user