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

@@ -49,62 +49,62 @@ func AvOutputVideoDeviceNext(d *AVOutputFormat) *AVOutputFormat {
// AVDeviceRect
type AVDeviceRect C.struct_AVDeviceRect
// Custom: GetX gets `AVDeviceRect.x` value.
// GetX gets `AVDeviceRect.x` value.
func (dr *AVDeviceRect) GetX() int32 {
return (int32)(dr.x)
}
// Custom: SetX sets `AVDeviceRect.x` value.
// SetX sets `AVDeviceRect.x` value.
func (dr *AVDeviceRect) SetX(v int32) {
dr.x = (C.int)(v)
}
// Custom: GetXAddr gets `AVDeviceRect.x` address.
// GetXAddr gets `AVDeviceRect.x` address.
func (dr *AVDeviceRect) GetXAddr() *int32 {
return (*int32)(&dr.x)
}
// Custom: GetY gets `AVDeviceRect.y` value.
// GetY gets `AVDeviceRect.y` value.
func (dr *AVDeviceRect) GetY() int32 {
return (int32)(dr.y)
}
// Custom: SetY sets `AVDeviceRect.y` value.
// SetY sets `AVDeviceRect.y` value.
func (dr *AVDeviceRect) SetY(v int32) {
dr.y = (C.int)(v)
}
// Custom: GetYAddr gets `AVDeviceRect.y` address.
// GetYAddr gets `AVDeviceRect.y` address.
func (dr *AVDeviceRect) GetYAddr() *int32 {
return (*int32)(&dr.y)
}
// Custom: GetWidth gets `AVDeviceRect.width` value.
// GetWidth gets `AVDeviceRect.width` value.
func (dr *AVDeviceRect) GetWidth() int32 {
return (int32)(dr.width)
}
// Custom: SetWidth sets `AVDeviceRect.width` value.
// SetWidth sets `AVDeviceRect.width` value.
func (dr *AVDeviceRect) SetWidth(v int32) {
dr.width = (C.int)(v)
}
// Custom: GetWidthAddr gets `AVDeviceRect.width` address.
// GetWidthAddr gets `AVDeviceRect.width` address.
func (dr *AVDeviceRect) GetWidthAddr() *int32 {
return (*int32)(&dr.width)
}
// Custom: GetHeight gets `AVDeviceRect.height` value.
// GetHeight gets `AVDeviceRect.height` value.
func (dr *AVDeviceRect) GetHeight() int32 {
return (int32)(dr.height)
}
// Custom: SetHeight sets `AVDeviceRect.height` value.
// SetHeight sets `AVDeviceRect.height` value.
func (dr *AVDeviceRect) SetHeight(v int32) {
dr.height = (C.int)(v)
}
// Custom: GetHeightAddr gets `AVDeviceRect.height` address.
// GetHeightAddr gets `AVDeviceRect.height` address.
func (dr *AVDeviceRect) GetHeightAddr() *int32 {
return (*int32)(&dr.height)
}
@@ -161,209 +161,215 @@ func AvDeviceDevToAppControlMessage(s *AVFormatContext,
// AVDeviceCapabilitiesQuery
type AVDeviceCapabilitiesQuery C.struct_AVDeviceCapabilitiesQuery
// Custom: GetAvClass gets `AVDeviceCapabilitiesQuery.av_class` value.
// GetAvClass gets `AVDeviceCapabilitiesQuery.av_class` value.
func (dc *AVDeviceCapabilitiesQuery) GetAvClass() *AVClass {
return (*AVClass)(dc.av_class)
}
// Custom: SetAvClass sets `AVDeviceCapabilitiesQuery.av_class` value.
// SetAvClass sets `AVDeviceCapabilitiesQuery.av_class` value.
func (dc *AVDeviceCapabilitiesQuery) SetAvClass(v *AVClass) {
dc.av_class = (*C.struct_AVClass)(v)
}
// Custom: GetAvClassAddr gets `AVDeviceCapabilitiesQuery.av_class` address.
// GetAvClassAddr gets `AVDeviceCapabilitiesQuery.av_class` address.
func (dc *AVDeviceCapabilitiesQuery) GetAvClassAddr() **AVClass {
return (**AVClass)(unsafe.Pointer(&dc.av_class))
}
// Custom: GetDeviceContext gets `AVDeviceCapabilitiesQuery.device_context` value.
// GetDeviceContext gets `AVDeviceCapabilitiesQuery.device_context` value.
func (dc *AVDeviceCapabilitiesQuery) GetDeviceContext() *AVFormatContext {
return (*AVFormatContext)(dc.device_context)
}
// Custom: SetDeviceContext sets `AVDeviceCapabilitiesQuery.device_context` value.
// SetDeviceContext sets `AVDeviceCapabilitiesQuery.device_context` value.
func (dc *AVDeviceCapabilitiesQuery) SetDeviceContext(v *AVFormatContext) {
dc.device_context = (*C.struct_AVFormatContext)(v)
}
// Custom: GetDeviceContextAddr gets `AVDeviceCapabilitiesQuery.device_context` address.
// GetDeviceContextAddr gets `AVDeviceCapabilitiesQuery.device_context` address.
func (dc *AVDeviceCapabilitiesQuery) GetDeviceContextAddr() **AVFormatContext {
return (**AVFormatContext)(unsafe.Pointer(&dc.device_context))
}
// Custom: GetCodec gets `AVDeviceCapabilitiesQuery.codec` value.
// GetCodec gets `AVDeviceCapabilitiesQuery.codec` value.
func (dc *AVDeviceCapabilitiesQuery) GetCodec() AVCodecID {
return (AVCodecID)(dc.codec)
}
// Custom: SetCodec sets `AVDeviceCapabilitiesQuery.codec` value.
// SetCodec sets `AVDeviceCapabilitiesQuery.codec` value.
func (dc *AVDeviceCapabilitiesQuery) SetCodec(v AVCodecID) {
dc.codec = (C.enum_AVCodecID)(v)
}
// Custom: GetCodecAddr gets `AVDeviceCapabilitiesQuery.codec` address.
// GetCodecAddr gets `AVDeviceCapabilitiesQuery.codec` address.
func (dc *AVDeviceCapabilitiesQuery) GetCodecAddr() *AVCodecID {
return (*AVCodecID)(&dc.codec)
}
// Custom: GetSampleFormat gets `AVDeviceCapabilitiesQuery.sample_format` value.
// GetSampleFormat gets `AVDeviceCapabilitiesQuery.sample_format` value.
func (dc *AVDeviceCapabilitiesQuery) GetSampleFormat() AVSampleFormat {
return (AVSampleFormat)(dc.sample_format)
}
// Custom: SetSampleFormat sets `AVDeviceCapabilitiesQuery.sample_format` value.
// SetSampleFormat sets `AVDeviceCapabilitiesQuery.sample_format` value.
func (dc *AVDeviceCapabilitiesQuery) SetSampleFormat(v AVSampleFormat) {
dc.sample_format = (C.enum_AVSampleFormat)(v)
}
// Custom: GetSampleFormatAddr gets `AVDeviceCapabilitiesQuery.sample_format` address.
// GetSampleFormatAddr gets `AVDeviceCapabilitiesQuery.sample_format` address.
func (dc *AVDeviceCapabilitiesQuery) GetSampleFormatAddr() *AVSampleFormat {
return (*AVSampleFormat)(&dc.sample_format)
}
// Custom: GetPixelFormat gets `AVDeviceCapabilitiesQuery.pixel_format` value.
// GetPixelFormat gets `AVDeviceCapabilitiesQuery.pixel_format` value.
func (dc *AVDeviceCapabilitiesQuery) GetPixelFormat() AVPixelFormat {
return (AVPixelFormat)(dc.pixel_format)
}
// Custom: SetPixelFormat sets `AVDeviceCapabilitiesQuery.pixel_format` value.
// SetPixelFormat sets `AVDeviceCapabilitiesQuery.pixel_format` value.
func (dc *AVDeviceCapabilitiesQuery) SetPixelFormat(v AVPixelFormat) {
dc.pixel_format = (C.enum_AVPixelFormat)(v)
}
// Custom: GetPixelFormatAddr gets `AVDeviceCapabilitiesQuery.pixel_format` address.
// GetPixelFormatAddr gets `AVDeviceCapabilitiesQuery.pixel_format` address.
func (dc *AVDeviceCapabilitiesQuery) GetPixelFormatAddr() *AVPixelFormat {
return (*AVPixelFormat)(&dc.pixel_format)
}
// Custom: GetSampleRate gets `AVDeviceCapabilitiesQuery.sample_rate` value.
// GetSampleRate gets `AVDeviceCapabilitiesQuery.sample_rate` value.
func (dc *AVDeviceCapabilitiesQuery) GetSampleRate() int32 {
return (int32)(dc.sample_rate)
}
// Custom: SetSampleRate sets `AVDeviceCapabilitiesQuery.sample_rate` value.
// SetSampleRate sets `AVDeviceCapabilitiesQuery.sample_rate` value.
func (dc *AVDeviceCapabilitiesQuery) SetSampleRate(v int32) {
dc.sample_rate = (C.int)(v)
}
// Custom: GetSampleRateAddr gets `AVDeviceCapabilitiesQuery.sample_rate` address.
// GetSampleRateAddr gets `AVDeviceCapabilitiesQuery.sample_rate` address.
func (dc *AVDeviceCapabilitiesQuery) GetSampleRateAddr() *int32 {
return (*int32)(&dc.sample_rate)
}
// Custom: GetChannels gets `AVDeviceCapabilitiesQuery.channels` value.
// GetChannels gets `AVDeviceCapabilitiesQuery.channels` value.
func (dc *AVDeviceCapabilitiesQuery) GetChannels() int32 {
return (int32)(dc.channels)
}
// Custom: SetChannels sets `AVDeviceCapabilitiesQuery.channels` value.
// SetChannels sets `AVDeviceCapabilitiesQuery.channels` value.
func (dc *AVDeviceCapabilitiesQuery) SetChannels(v int32) {
dc.channels = (C.int)(v)
}
// Custom: GetChannelsAddr gets `AVDeviceCapabilitiesQuery.channels` address.
// GetChannelsAddr gets `AVDeviceCapabilitiesQuery.channels` address.
func (dc *AVDeviceCapabilitiesQuery) GetChannelsAddr() *int32 {
return (*int32)(&dc.channels)
}
// Custom: GetChannelLayout gets `AVDeviceCapabilitiesQuery.channel_layout` value.
// GetChannelLayout gets `AVDeviceCapabilitiesQuery.channel_layout` value.
func (dc *AVDeviceCapabilitiesQuery) GetChannelLayout() int64 {
return (int64)(dc.channel_layout)
}
// Custom: SetChannelLayout sets `AVDeviceCapabilitiesQuery.channel_layout` value.
// SetChannelLayout sets `AVDeviceCapabilitiesQuery.channel_layout` value.
func (dc *AVDeviceCapabilitiesQuery) SetChannelLayout(v int64) {
dc.channel_layout = (C.int64_t)(v)
}
// Custom: GetChannelLayoutAddr gets `AVDeviceCapabilitiesQuery.channel_layout` address.
// GetChannelLayoutAddr gets `AVDeviceCapabilitiesQuery.channel_layout` address.
func (dc *AVDeviceCapabilitiesQuery) GetChannelLayoutAddr() *int64 {
return (*int64)(&dc.channel_layout)
}
// Custom: GetWindowWidth gets `AVDeviceCapabilitiesQuery.window_width` value.
// GetWindowWidth gets `AVDeviceCapabilitiesQuery.window_width` value.
func (dc *AVDeviceCapabilitiesQuery) GetWindowWidth() int32 {
return (int32)(dc.window_width)
}
// Custom: SetWindowWidth sets `AVDeviceCapabilitiesQuery.window_width` value.
// SetWindowWidth sets `AVDeviceCapabilitiesQuery.window_width` value.
func (dc *AVDeviceCapabilitiesQuery) SetWindowWidth(v int32) {
dc.window_width = (C.int)(v)
}
// Custom: GetWindowWidthAddr gets `AVDeviceCapabilitiesQuery.window_width` address.
// GetWindowWidthAddr gets `AVDeviceCapabilitiesQuery.window_width` address.
func (dc *AVDeviceCapabilitiesQuery) GetWindowWidthAddr() *int32 {
return (*int32)(&dc.window_width)
}
// Custom: GetWindowHeight gets `AVDeviceCapabilitiesQuery.window_height` value.
// GetWindowHeight gets `AVDeviceCapabilitiesQuery.window_height` value.
func (dc *AVDeviceCapabilitiesQuery) GetWindowHeight() int32 {
return (int32)(dc.window_height)
}
// Custom: SetWindowHeight sets `AVDeviceCapabilitiesQuery.window_height` value.
// SetWindowHeight sets `AVDeviceCapabilitiesQuery.window_height` value.
func (dc *AVDeviceCapabilitiesQuery) SetWindowHeight(v int32) {
dc.window_height = (C.int)(v)
}
// Custom: GetWindowHeightAddr gets `AVDeviceCapabilitiesQuery.window_height` address.
// GetWindowHeightAddr gets `AVDeviceCapabilitiesQuery.window_height` address.
func (dc *AVDeviceCapabilitiesQuery) GetWindowHeightAddr() *int32 {
return (*int32)(&dc.window_height)
}
// Custom: GetFrameWidth gets `AVDeviceCapabilitiesQuery.frame_width` value.
// GetFrameWidth gets `AVDeviceCapabilitiesQuery.frame_width` value.
func (dc *AVDeviceCapabilitiesQuery) GetFrameWidth() int32 {
return (int32)(dc.frame_width)
}
// Custom: SetFrameWidth sets `AVDeviceCapabilitiesQuery.frame_width` value.
// SetFrameWidth sets `AVDeviceCapabilitiesQuery.frame_width` value.
func (dc *AVDeviceCapabilitiesQuery) SetFrameWidth(v int32) {
dc.frame_width = (C.int)(v)
}
// Custom: GetFrameWidthAddr gets `AVDeviceCapabilitiesQuery.frame_width` address.
// GetFrameWidthAddr gets `AVDeviceCapabilitiesQuery.frame_width` address.
func (dc *AVDeviceCapabilitiesQuery) GetFrameWidthAddr() *int32 {
return (*int32)(&dc.frame_width)
}
// Custom: GetFrameHeight gets `AVDeviceCapabilitiesQuery.frame_height` value.
// GetFrameHeight gets `AVDeviceCapabilitiesQuery.frame_height` value.
func (dc *AVDeviceCapabilitiesQuery) GetFrameHeight() int32 {
return (int32)(dc.frame_height)
}
// Custom: SetFrameHeight sets `AVDeviceCapabilitiesQuery.frame_height` value.
// SetFrameHeight sets `AVDeviceCapabilitiesQuery.frame_height` value.
func (dc *AVDeviceCapabilitiesQuery) SetFrameHeight(v int32) {
dc.frame_height = (C.int)(v)
}
// Custom: GetFrameHeightAddr gets `AVDeviceCapabilitiesQuery.frame_height` address.
// GetFrameHeightAddr gets `AVDeviceCapabilitiesQuery.frame_height` address.
func (dc *AVDeviceCapabilitiesQuery) GetFrameHeightAddr() *int32 {
return (*int32)(&dc.frame_height)
}
// Custom: GetFps gets `AVDeviceCapabilitiesQuery.fps` value.
// GetFps gets `AVDeviceCapabilitiesQuery.fps` value.
func (dc *AVDeviceCapabilitiesQuery) GetFps() AVRational {
return (AVRational)(dc.fps)
}
// Custom: SetFps sets `AVDeviceCapabilitiesQuery.fps` value.
// SetFps sets `AVDeviceCapabilitiesQuery.fps` value.
func (dc *AVDeviceCapabilitiesQuery) SetFps(v AVRational) {
dc.fps = (C.struct_AVRational)(v)
}
// Custom: GetFpsAddr gets `AVDeviceCapabilitiesQuery.fps` address.
// GetFpsAddr gets `AVDeviceCapabilitiesQuery.fps` address.
func (dc *AVDeviceCapabilitiesQuery) GetFpsAddr() *AVRational {
return (*AVRational)(&dc.fps)
}
// Deprecated: No use
// NONEED: av_device_capabilities
// Deprecated: No use.
//
// AvDeviceCapabilitiesCreate initializes capabilities probing API based on AVOption API.
func AvDeviceCapabilitiesCreate(caps **AVDeviceCapabilitiesQuery,
s *AVFormatContext, deviceOptions **AVDictionary) int32 {
return (int32)(C.avdevice_capabilities_create((**C.struct_AVDeviceCapabilitiesQuery)(unsafe.Pointer(caps)),
(*C.struct_AVFormatContext)(s), (**C.struct_AVDictionary)(unsafe.Pointer(deviceOptions))))
}
// Deprecated: No use
// Deprecated: No use.
//
// AvDeviceCapabilitiesFree frees resources created by AvDeviceCapabilitiesCreate()
func AvDeviceCapabilitiesFree(caps **AVDeviceCapabilitiesQuery, s *AVFormatContext) {
C.avdevice_capabilities_free((**C.struct_AVDeviceCapabilitiesQuery)(unsafe.Pointer(caps)),
(*C.struct_AVFormatContext)(s))
@@ -372,12 +378,12 @@ func AvDeviceCapabilitiesFree(caps **AVDeviceCapabilitiesQuery, s *AVFormatConte
// AVDeviceInfo
type AVDeviceInfo C.struct_AVDeviceInfo
// Custom: GetDeviceName gets `AVDeviceInfo.device_name` value.
// GetDeviceName gets `AVDeviceInfo.device_name` value.
func (di *AVDeviceInfo) GetDeviceName() string {
return C.GoString(di.device_name)
}
// Custom: GetDeviceDescription gets `AVDeviceInfo.device_description` value.
// GetDeviceDescription gets `AVDeviceInfo.device_description` value.
func (di *AVDeviceInfo) GetDeviceDescription() string {
return C.GoString(di.device_description)
}
@@ -385,7 +391,7 @@ func (di *AVDeviceInfo) GetDeviceDescription() string {
// AVDeviceInfoList
type AVDeviceInfoList C.struct_AVDeviceInfoList
// Custom: GetDevices gets `AVDeviceInfoList.devices` value.
// GetDevices gets `AVDeviceInfoList.devices` value.
func (dcl *AVDeviceInfoList) GetDevices() []*AVDeviceInfo {
if dcl.devices == nil {
return nil
@@ -393,12 +399,12 @@ func (dcl *AVDeviceInfoList) GetDevices() []*AVDeviceInfo {
return unsafe.Slice((**AVDeviceInfo)(unsafe.Pointer(dcl.devices)), dcl.nb_devices)
}
// Custom: GetNbDevices gets `AVDeviceInfoList.nb_devices` value.
// GetNbDevices gets `AVDeviceInfoList.nb_devices` value.
func (dcl *AVDeviceInfoList) GetNbDevices() int32 {
return (int32)(dcl.nb_devices)
}
// Custom: GetDefaultDevice gets `AVDeviceInfoList.default_device` value.
// GetDefaultDevice gets `AVDeviceInfoList.default_device` value.
func (dcl *AVDeviceInfoList) GetDefaultDevice() int32 {
return (int32)(dcl.default_device)
}