2023-10-27 06:28:27 CST W43D5

This commit is contained in:
aggresss
2023-10-27 06:28:28 +08:00
parent babffde433
commit 7a0773ebf2
57 changed files with 4729 additions and 2853 deletions

View File

@@ -33,82 +33,82 @@ type AVHWDeviceContext C.struct_AVHWDeviceContext
type AVHWDeviceContextFreeFunc = C.av_hw_device_context_free_func
// Custom: GetAvClass gets `AVHWDeviceContext.av_class` value.
// GetAvClass gets `AVHWDeviceContext.av_class` value.
func (dc *AVHWDeviceContext) GetAvClass() *AVClass {
return (*AVClass)(dc.av_class)
}
// Custom: SetAvClass sets `AVHWDeviceContext.av_class` value.
// SetAvClass sets `AVHWDeviceContext.av_class` value.
func (dc *AVHWDeviceContext) SetAvClass(v *AVClass) {
dc.av_class = (*C.struct_AVClass)(v)
}
// Custom: GetAvClassAddr gets `AVHWDeviceContext.av_class` address.
// GetAvClassAddr gets `AVHWDeviceContext.av_class` address.
func (dc *AVHWDeviceContext) GetAvClassAddr() **AVClass {
return (**AVClass)(unsafe.Pointer(&dc.av_class))
}
// Custom: GetInternal gets `AVHWDeviceContext.internal` value.
// GetInternal gets `AVHWDeviceContext.internal` value.
func (dc *AVHWDeviceContext) GetInternal() *AVHWDeviceInternal {
return (*AVHWDeviceInternal)(dc.internal)
}
// Custom: SetInternal sets `AVHWDeviceContext.internal` value.
// SetInternal sets `AVHWDeviceContext.internal` value.
func (dc *AVHWDeviceContext) SetInternal(v *AVHWDeviceInternal) {
dc.internal = (*C.struct_AVHWDeviceInternal)(v)
}
// Custom: GetInternalAddr gets `AVHWDeviceContext.internal` address.
// GetInternalAddr gets `AVHWDeviceContext.internal` address.
func (dc *AVHWDeviceContext) GetInternalAddr() **AVHWDeviceInternal {
return (**AVHWDeviceInternal)(unsafe.Pointer(&dc.internal))
}
// Custom: GetType gets `AVHWDeviceContext.type` value.
// GetType gets `AVHWDeviceContext.type` value.
func (dc *AVHWDeviceContext) GetType() AVHWDeviceType {
return (AVHWDeviceType)(dc._type)
}
// Custom: SetType sets `AVHWDeviceContext.type` value.
// SetType sets `AVHWDeviceContext.type` value.
func (dc *AVHWDeviceContext) SetType(v AVHWDeviceType) {
dc._type = (C.enum_AVHWDeviceType)(v)
}
// Custom: GetTypeAddr gets `AVHWDeviceContext.type` address.
// GetTypeAddr gets `AVHWDeviceContext.type` address.
func (dc *AVHWDeviceContext) GetTypeAddr() *AVHWDeviceType {
return (*AVHWDeviceType)(&dc._type)
}
// Custom: GetHwctx gets `AVHWDeviceContext.hwctx` value.
// GetHwctx gets `AVHWDeviceContext.hwctx` value.
func (dc *AVHWDeviceContext) GetHwctx() unsafe.Pointer {
return dc.hwctx
}
// Custom: SetHwctx sets `AVHWDeviceContext.hwctx` value.
// SetHwctx sets `AVHWDeviceContext.hwctx` value.
func (dc *AVHWDeviceContext) SetHwctx(v CVoidPointer) {
dc.hwctx = VoidPointer(v)
}
// Custom: GetHwctxAddr gets `AVHWDeviceContext.hwctx` address.
// GetHwctxAddr gets `AVHWDeviceContext.hwctx` address.
func (dc *AVHWDeviceContext) GetHwctxAddr() *unsafe.Pointer {
return &dc.hwctx
}
// Custom: SetFree sets `AVHWDeviceContext.free` value.
// SetFree sets `AVHWDeviceContext.free` value.
func (dc *AVHWDeviceContext) SetFree(v AVHWDeviceContextFreeFunc) {
dc.free = (C.av_hw_device_context_free_func)(v)
}
// Custom: GetUserOpaque gets `AVHWDeviceContext.user_opaque` value.
// GetUserOpaque gets `AVHWDeviceContext.user_opaque` value.
func (dc *AVHWDeviceContext) GetUserOpaque() unsafe.Pointer {
return dc.user_opaque
}
// Custom: SetUserOpaque sets `AVHWDeviceContext.user_opaque` value.
// SetUserOpaque sets `AVHWDeviceContext.user_opaque` value.
func (dc *AVHWDeviceContext) SetUserOpaque(v CVoidPointer) {
dc.user_opaque = VoidPointer(v)
}
// Custom: GetUserOpaqueAddr gets `AVHWDeviceContext.user_opaque` address.
// GetUserOpaqueAddr gets `AVHWDeviceContext.user_opaque` address.
func (dc *AVHWDeviceContext) GetUserOpaqueAddr() *unsafe.Pointer {
return &dc.user_opaque
}
@@ -119,187 +119,187 @@ type AVHWFramesContext C.struct_AVHWFramesContext
type AVHWFramesContextFreeFunc = C.av_hw_frames_context_free_func
// Custom: GetAvClass gets `AVHWFramesContext.av_class` value.
// GetAvClass gets `AVHWFramesContext.av_class` value.
func (fc *AVHWFramesContext) GetAvClass() *AVClass {
return (*AVClass)(fc.av_class)
}
// Custom: SetAvClass sets `AVHWFramesContext.av_class` value.
// SetAvClass sets `AVHWFramesContext.av_class` value.
func (fc *AVHWFramesContext) SetAvClass(v *AVClass) {
fc.av_class = (*C.struct_AVClass)(v)
}
// Custom: GetAvClassAddr gets `AVHWFramesContext.av_class` address.
// GetAvClassAddr gets `AVHWFramesContext.av_class` address.
func (fc *AVHWFramesContext) GetAvClassAddr() **AVClass {
return (**AVClass)(unsafe.Pointer(&fc.av_class))
}
// Custom: GetInternal gets `AVHWFramesContext.internal` value.
// GetInternal gets `AVHWFramesContext.internal` value.
func (fc *AVHWFramesContext) GetInternal() *AVHWFramesInternal {
return (*AVHWFramesInternal)(fc.internal)
}
// Custom: SetInternal sets `AVHWFramesContext.internal` value.
// SetInternal sets `AVHWFramesContext.internal` value.
func (fc *AVHWFramesContext) SetInternal(v *AVHWFramesInternal) {
fc.internal = (*C.struct_AVHWFramesInternal)(v)
}
// Custom: GetInternalAddr gets `AVHWFramesContext.internal` address.
// GetInternalAddr gets `AVHWFramesContext.internal` address.
func (fc *AVHWFramesContext) GetInternalAddr() **AVHWFramesInternal {
return (**AVHWFramesInternal)(unsafe.Pointer(&fc.internal))
}
// Custom: GetDeviceRef gets `AVHWFramesContext.device_ref` value.
// GetDeviceRef gets `AVHWFramesContext.device_ref` value.
func (fc *AVHWFramesContext) GetDeviceRef() *AVBufferRef {
return (*AVBufferRef)(fc.device_ref)
}
// Custom: SetDeviceRef sets `AVHWFramesContext.device_ref` value.
// SetDeviceRef sets `AVHWFramesContext.device_ref` value.
func (fc *AVHWFramesContext) SetDeviceRef(v *AVBufferRef) {
fc.device_ref = (*C.struct_AVBufferRef)(v)
}
// Custom: GetDeviceRefAddr gets `AVHWFramesContext.device_ref` address.
// GetDeviceRefAddr gets `AVHWFramesContext.device_ref` address.
func (fc *AVHWFramesContext) GetDeviceRefAddr() **AVBufferRef {
return (**AVBufferRef)(unsafe.Pointer(&fc.device_ref))
}
// Custom: GetDeviceCtx gets `AVHWFramesContext.device_ctx` value.
// GetDeviceCtx gets `AVHWFramesContext.device_ctx` value.
func (fc *AVHWFramesContext) GetDeviceCtx() *AVHWDeviceContext {
return (*AVHWDeviceContext)(fc.device_ctx)
}
// Custom: SetDeviceCtx sets `AVHWFramesContext.device_ctx` value.
// SetDeviceCtx sets `AVHWFramesContext.device_ctx` value.
func (fc *AVHWFramesContext) SetDeviceCtx(v *AVHWDeviceContext) {
fc.device_ctx = (*C.struct_AVHWDeviceContext)(v)
}
// Custom: GetDeviceCtxAddr gets `AVHWFramesContext.device_ctx` address.
// GetDeviceCtxAddr gets `AVHWFramesContext.device_ctx` address.
func (fc *AVHWFramesContext) GetDeviceCtxAddr() **AVHWDeviceContext {
return (**AVHWDeviceContext)(unsafe.Pointer(&fc.device_ctx))
}
// Custom: GetHwctx gets `AVHWFramesContext.hwctx` value.
// GetHwctx gets `AVHWFramesContext.hwctx` value.
func (fc *AVHWFramesContext) GetHwctx() unsafe.Pointer {
return (unsafe.Pointer)(fc.hwctx)
}
// Custom: SetHwctx sets `AVHWFramesContext.hwctx` value.
// SetHwctx sets `AVHWFramesContext.hwctx` value.
func (fc *AVHWFramesContext) SetHwctx(v CVoidPointer) {
fc.hwctx = VoidPointer(v)
}
// Custom: GetHwctxAddr gets `AVHWFramesContext.hwctx` address.
// GetHwctxAddr gets `AVHWFramesContext.hwctx` address.
func (fc *AVHWFramesContext) GetHwctxAddr() *unsafe.Pointer {
return (*unsafe.Pointer)(&fc.hwctx)
}
// Custom: SetFree sets `AVHWFramesContext.free` value.
// SetFree sets `AVHWFramesContext.free` value.
func (fc *AVHWFramesContext) SetFree(v AVHWFramesContextFreeFunc) {
fc.free = (C.av_hw_frames_context_free_func)(v)
}
// Custom: GetUserOpaque gets `AVHWFramesContext.user_opaque` value.
// GetUserOpaque gets `AVHWFramesContext.user_opaque` value.
func (fc *AVHWFramesContext) GetUserOpaque() unsafe.Pointer {
return (unsafe.Pointer)(fc.user_opaque)
}
// Custom: SetUserOpaque sets `AVHWFramesContext.user_opaque` value.
// SetUserOpaque sets `AVHWFramesContext.user_opaque` value.
func (fc *AVHWFramesContext) SetUserOpaque(v CVoidPointer) {
fc.user_opaque = VoidPointer(v)
}
// Custom: GetUserOpaqueAddr gets `AVHWFramesContext.user_opaque` address.
// GetUserOpaqueAddr gets `AVHWFramesContext.user_opaque` address.
func (fc *AVHWFramesContext) GetUserOpaqueAddr() *unsafe.Pointer {
return (*unsafe.Pointer)(&fc.user_opaque)
}
// Custom: GetPool gets `AVHWFramesContext.pool` value.
// GetPool gets `AVHWFramesContext.pool` value.
func (fc *AVHWFramesContext) GetPool() *AVBufferPool {
return (*AVBufferPool)(fc.pool)
}
// Custom: SetPool sets `AVHWFramesContext.pool` value.
// SetPool sets `AVHWFramesContext.pool` value.
func (fc *AVHWFramesContext) SetPool(v *AVBufferPool) {
fc.pool = (*C.struct_AVBufferPool)(v)
}
// Custom: GetPoolAddr gets `AVHWFramesContext.pool` address.
// GetPoolAddr gets `AVHWFramesContext.pool` address.
func (fc *AVHWFramesContext) GetPoolAddr() **AVBufferPool {
return (**AVBufferPool)(unsafe.Pointer(&fc.pool))
}
// Custom: GetInitialPoolSize gets `AVHWFramesContext.initial_pool_size` value.
// GetInitialPoolSize gets `AVHWFramesContext.initial_pool_size` value.
func (fc *AVHWFramesContext) GetInitialPoolSize() int32 {
return (int32)(fc.initial_pool_size)
}
// Custom: SetInitialPoolSize sets `AVHWFramesContext.initial_pool_size` value.
// SetInitialPoolSize sets `AVHWFramesContext.initial_pool_size` value.
func (fc *AVHWFramesContext) SetInitialPoolSize(v int32) {
fc.initial_pool_size = (C.int)(v)
}
// Custom: GetInitialPoolSizeAddr gets `AVHWFramesContext.initial_pool_size` address.
// GetInitialPoolSizeAddr gets `AVHWFramesContext.initial_pool_size` address.
func (fc *AVHWFramesContext) GetInitialPoolSizeAddr() *int32 {
return (*int32)(&fc.initial_pool_size)
}
// Custom: GetFormat gets `AVHWFramesContext.format` value.
// GetFormat gets `AVHWFramesContext.format` value.
func (fc *AVHWFramesContext) GetFormat() AVPixelFormat {
return (AVPixelFormat)(fc.format)
}
// Custom: SetFormat sets `AVHWFramesContext.format` value.
// SetFormat sets `AVHWFramesContext.format` value.
func (fc *AVHWFramesContext) SetFormat(v AVPixelFormat) {
fc.format = (C.enum_AVPixelFormat)(v)
}
// Custom: GetFormatAddr gets `AVHWFramesContext.format` address.
// GetFormatAddr gets `AVHWFramesContext.format` address.
func (fc *AVHWFramesContext) GetFormatAddr() *AVPixelFormat {
return (*AVPixelFormat)(&fc.format)
}
// Custom: GetSwFormat gets `AVHWFramesContext.sw_format` value.
// GetSwFormat gets `AVHWFramesContext.sw_format` value.
func (fc *AVHWFramesContext) GetSwFormat() AVPixelFormat {
return (AVPixelFormat)(fc.sw_format)
}
// Custom: SetSwFormat sets `AVHWFramesContext.sw_format` value.
// SetSwFormat sets `AVHWFramesContext.sw_format` value.
func (fc *AVHWFramesContext) SetSwFormat(v AVPixelFormat) {
fc.sw_format = (C.enum_AVPixelFormat)(v)
}
// Custom: GetSwFormatAddr gets `AVHWFramesContext.sw_format` address.
// GetSwFormatAddr gets `AVHWFramesContext.sw_format` address.
func (fc *AVHWFramesContext) GetSwFormatAddr() *AVPixelFormat {
return (*AVPixelFormat)(&fc.sw_format)
}
// Custom: GetWidth gets `AVHWFramesContext.width` value.
// GetWidth gets `AVHWFramesContext.width` value.
func (fc *AVHWFramesContext) GetWidth() int32 {
return (int32)(fc.width)
}
// Custom: SetWidth sets `AVHWFramesContext.width` value.
// SetWidth sets `AVHWFramesContext.width` value.
func (fc *AVHWFramesContext) SetWidth(v int32) {
fc.width = (C.int)(v)
}
// Custom: GetWidthAddr gets `AVHWFramesContext.width` address.
// GetWidthAddr gets `AVHWFramesContext.width` address.
func (fc *AVHWFramesContext) GetWidthAddr() *int32 {
return (*int32)(&fc.width)
}
// Custom: GetHeight gets `AVHWFramesContext.height` value.
// GetHeight gets `AVHWFramesContext.height` value.
func (fc *AVHWFramesContext) GetHeight() int32 {
return (int32)(fc.height)
}
// Custom: SetHeight sets `AVHWFramesContext.height` value.
// SetHeight sets `AVHWFramesContext.height` value.
func (fc *AVHWFramesContext) SetHeight(v int32) {
fc.height = (C.int)(v)
}
// Custom: GetHeightAddr gets `AVHWFramesContext.height` address.
// GetHeightAddr gets `AVHWFramesContext.height` address.
func (fc *AVHWFramesContext) GetHeightAddr() *int32 {
return (*int32)(&fc.height)
}
@@ -408,96 +408,96 @@ func AvHWFrameTransferGetFormats(hwframeCtx *AVBufferRef, dir AVHWFrameTransferD
type AVHWFramesConstraints C.struct_AVHWFramesConstraints
// Custom: GetValidHwFormats gets `AVHWFramesConstraints.valid_hw_formats` value.
// GetValidHwFormats gets `AVHWFramesConstraints.valid_hw_formats` value.
func (fcs *AVHWFramesConstraints) GetValidHwFormats() []AVPixelFormat {
return SliceTrunc((*AVPixelFormat)(fcs.valid_hw_formats), func(pf AVPixelFormat) bool {
return pf == AV_PIX_FMT_NONE
})
}
// Custom: SetValidHwFormats sets `AVHWFramesConstraints.valid_hw_formats` value.
// SetValidHwFormats sets `AVHWFramesConstraints.valid_hw_formats` value.
func (fcs *AVHWFramesConstraints) SetValidHwFormats(v *AVPixelFormat) {
fcs.valid_hw_formats = (*C.enum_AVPixelFormat)(v)
}
// Custom: GetValidHwFormatsAddr gets `AVHWFramesConstraints.valid_hw_formats` address.
// GetValidHwFormatsAddr gets `AVHWFramesConstraints.valid_hw_formats` address.
func (fcs *AVHWFramesConstraints) GetValidHwFormatsAddr() **AVPixelFormat {
return (**AVPixelFormat)(&fcs.valid_hw_formats)
}
// Custom: GetValidSwFormats gets `AVHWFramesConstraints.valid_sw_formats` value.
// GetValidSwFormats gets `AVHWFramesConstraints.valid_sw_formats` value.
func (fcs *AVHWFramesConstraints) GetValidSwFormats() []AVPixelFormat {
return SliceTrunc((*AVPixelFormat)(fcs.valid_sw_formats), func(pf AVPixelFormat) bool {
return pf == AV_PIX_FMT_NONE
})
}
// Custom: SetValidSwFormats sets `AVHWFramesConstraints.valid_sw_formats` value.
// SetValidSwFormats sets `AVHWFramesConstraints.valid_sw_formats` value.
func (fcs *AVHWFramesConstraints) SetValidSwFormats(v *AVPixelFormat) {
fcs.valid_sw_formats = (*C.enum_AVPixelFormat)(v)
}
// Custom: GetValidSwFormatsAddr gets `AVHWFramesConstraints.valid_sw_formats` address.
// GetValidSwFormatsAddr gets `AVHWFramesConstraints.valid_sw_formats` address.
func (fcs *AVHWFramesConstraints) GetValidSwFormatsAddr() **AVPixelFormat {
return (**AVPixelFormat)(&fcs.valid_sw_formats)
}
// Custom: GetMinWidth gets `AVHWFramesConstraints.min_width` value.
// GetMinWidth gets `AVHWFramesConstraints.min_width` value.
func (fcs *AVHWFramesConstraints) GetMinWidth() int32 {
return (int32)(fcs.min_width)
}
// Custom: SetMinWidth sets `AVHWFramesConstraints.min_width` value.
// SetMinWidth sets `AVHWFramesConstraints.min_width` value.
func (fcs *AVHWFramesConstraints) SetMinWidth(v int32) {
fcs.min_width = (C.int)(v)
}
// Custom: GetMinWidthAddr gets `AVHWFramesConstraints.min_width` address.
// GetMinWidthAddr gets `AVHWFramesConstraints.min_width` address.
func (fcs *AVHWFramesConstraints) GetMinWidthAddr() *int32 {
return (*int32)(&fcs.min_width)
}
// Custom: GetMinHeight gets `AVHWFramesConstraints.min_height` value.
// GetMinHeight gets `AVHWFramesConstraints.min_height` value.
func (fcs *AVHWFramesConstraints) GetMinHeight() int32 {
return (int32)(fcs.min_height)
}
// Custom: SetMinHeight sets `AVHWFramesConstraints.min_height` value.
// SetMinHeight sets `AVHWFramesConstraints.min_height` value.
func (fcs *AVHWFramesConstraints) SetMinHeight(v int32) {
fcs.min_height = (C.int)(v)
}
// Custom: GetMinHeightAddr gets `AVHWFramesConstraints.min_height` address.
// GetMinHeightAddr gets `AVHWFramesConstraints.min_height` address.
func (fcs *AVHWFramesConstraints) GetMinHeightAddr() *int32 {
return (*int32)(&fcs.min_height)
}
// Custom: GetMaxWidth gets `AVHWFramesConstraints.max_width` value.
// GetMaxWidth gets `AVHWFramesConstraints.max_width` value.
func (fcs *AVHWFramesConstraints) GetMaxWidth() int32 {
return (int32)(fcs.max_width)
}
// Custom: SetMaxWidth sets `AVHWFramesConstraints.max_width` value.
// SetMaxWidth sets `AVHWFramesConstraints.max_width` value.
func (fcs *AVHWFramesConstraints) SetMaxWidth(v int32) {
fcs.max_width = (C.int)(v)
}
// Custom: GetMaxWidthAddr gets `AVHWFramesConstraints.max_width` address.
// GetMaxWidthAddr gets `AVHWFramesConstraints.max_width` address.
func (fcs *AVHWFramesConstraints) GetMaxWidthAddr() *int32 {
return (*int32)(&fcs.max_width)
}
// Custom: GetMaxHeight gets `AVHWFramesConstraints.max_height` value.
// GetMaxHeight gets `AVHWFramesConstraints.max_height` value.
func (fcs *AVHWFramesConstraints) GetMaxHeight() int32 {
return (int32)(fcs.max_height)
}
// Custom: SetMaxHeight sets `AVHWFramesConstraints.max_height` value.
// SetMaxHeight sets `AVHWFramesConstraints.max_height` value.
func (fcs *AVHWFramesConstraints) SetMaxHeight(v int32) {
fcs.max_height = (C.int)(v)
}
// Custom: GetMaxHeightAddr gets `AVHWFramesConstraints.max_height` address.
// GetMaxHeightAddr gets `AVHWFramesConstraints.max_height` address.
func (fcs *AVHWFramesConstraints) GetMaxHeightAddr() *int32 {
return (*int32)(&fcs.max_height)
}