mirror of
https://github.com/qrtc/ffmpeg-dev-go.git
synced 2025-10-04 23:33:15 +08:00
2023-10-27 06:28:27 CST W43D5
This commit is contained in:
2161
avcodec.go
2161
avcodec.go
File diff suppressed because it is too large
Load Diff
@@ -26,139 +26,139 @@ type AVDCTGetPixelsFunc = C.avdct_get_pixels_func
|
||||
// typedef void (*avdct_get_pixels_unaligned_func)(int16_t *block, const uint8_t *pixels, ptrdiff_t line_size);
|
||||
type AVDCTGetPixelsUnalignedFunc = C.avdct_get_pixels_unaligned_func
|
||||
|
||||
// Custom: GetAvClass gets `AVDCT.av_class` value.
|
||||
// GetAvClass gets `AVDCT.av_class` value.
|
||||
func (dct *AVDCT) GetAvClass() *AVClass {
|
||||
return (*AVClass)(dct.av_class)
|
||||
}
|
||||
|
||||
// Custom: SetAvClass sets `AVDCT.av_class` value.
|
||||
// SetAvClass sets `AVDCT.av_class` value.
|
||||
func (dct *AVDCT) SetAvClass(v *AVClass) {
|
||||
dct.av_class = (*C.struct_AVClass)(v)
|
||||
}
|
||||
|
||||
// Custom: GetAvClassAddr gets `AVDCT.av_class` address.
|
||||
// GetAvClassAddr gets `AVDCT.av_class` address.
|
||||
func (dct *AVDCT) GetAvClassAddr() **AVClass {
|
||||
return (**AVClass)(unsafe.Pointer(&dct.av_class))
|
||||
}
|
||||
|
||||
// Custom: GetIdct gets `AVDCT.idct` value.
|
||||
// GetIdct gets `AVDCT.idct` value.
|
||||
func (dct *AVDCT) GetIdct() AVDCTIdctFunc {
|
||||
return (AVDCTIdctFunc)(dct.idct)
|
||||
}
|
||||
|
||||
// Custom: SetIdct sets `AVDCT.idct` value.
|
||||
// SetIdct sets `AVDCT.idct` value.
|
||||
func (dct *AVDCT) SetIdct(v AVDCTIdctFunc) {
|
||||
dct.idct = (C.avdct_idct_func)(v)
|
||||
}
|
||||
|
||||
// Custom: GetIdctAddr gets `AVDCT.idct` address.
|
||||
// GetIdctAddr gets `AVDCT.idct` address.
|
||||
func (dct *AVDCT) GetIdctAddr() *AVDCTIdctFunc {
|
||||
return (*AVDCTIdctFunc)(&dct.idct)
|
||||
}
|
||||
|
||||
// Custom: GetIdctPermutation gets `AVDCT.idct_permutation` value.
|
||||
// GetIdctPermutation gets `AVDCT.idct_permutation` value.
|
||||
func (dct *AVDCT) GetIdctPermutation() []uint8 {
|
||||
return unsafe.Slice((*uint8)(&dct.idct_permutation[0]), 64)
|
||||
}
|
||||
|
||||
// Custom: SetIdctPermutation sets `AVDCT.idct_permutation` value.
|
||||
// SetIdctPermutation sets `AVDCT.idct_permutation` value.
|
||||
func (dct *AVDCT) SetIdctPermutation(v []uint8) {
|
||||
for i := 0; i < FFMIN(len(v), 64); i++ {
|
||||
dct.idct_permutation[i] = (C.uint8_t)(v[i])
|
||||
}
|
||||
}
|
||||
|
||||
// Custom: GetIdctPermutationAddr gets `AVDCT.idct_permutation` address.
|
||||
// GetIdctPermutationAddr gets `AVDCT.idct_permutation` address.
|
||||
func (dct *AVDCT) GetIdctPermutationAddr() **uint8 {
|
||||
return (**uint8)(unsafe.Pointer(&dct.idct_permutation))
|
||||
}
|
||||
|
||||
// Custom: GetFdct gets `AVDCT.fdct` value.
|
||||
// GetFdct gets `AVDCT.fdct` value.
|
||||
func (dct *AVDCT) GetFdct() AVDCTFdctFunc {
|
||||
return (AVDCTFdctFunc)(dct.fdct)
|
||||
}
|
||||
|
||||
// Custom: SetFdct sets `AVDCT.fdct` value.
|
||||
// SetFdct sets `AVDCT.fdct` value.
|
||||
func (dct *AVDCT) SetFdct(v AVDCTFdctFunc) {
|
||||
dct.fdct = (C.avdct_fdct_func)(v)
|
||||
}
|
||||
|
||||
// Custom: GetFdctAddr gets `AVDCT.fdct` address.
|
||||
// GetFdctAddr gets `AVDCT.fdct` address.
|
||||
func (dct *AVDCT) GetFdctAddr() *AVDCTFdctFunc {
|
||||
return (*AVDCTFdctFunc)(&dct.fdct)
|
||||
}
|
||||
|
||||
// Custom: GetDctAlgo gets `AVDCT.dct_algo` value.
|
||||
// GetDctAlgo gets `AVDCT.dct_algo` value.
|
||||
func (dct *AVDCT) GetDctAlgo() int32 {
|
||||
return (int32)(dct.dct_algo)
|
||||
}
|
||||
|
||||
// Custom: SetDctAlgo sets `AVDCT.dct_algo` value.
|
||||
// SetDctAlgo sets `AVDCT.dct_algo` value.
|
||||
func (dct *AVDCT) SetDctAlgo(v int32) {
|
||||
dct.dct_algo = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetDctAlgoAddr gets `AVDCT.dct_algo` address.
|
||||
// GetDctAlgoAddr gets `AVDCT.dct_algo` address.
|
||||
func (dct *AVDCT) GetDctAlgoAddr() *int32 {
|
||||
return (*int32)(&dct.dct_algo)
|
||||
}
|
||||
|
||||
// Custom: GetIdctAlgo gets `AVDCT.idct_algo` value.
|
||||
// GetIdctAlgo gets `AVDCT.idct_algo` value.
|
||||
func (dct *AVDCT) GetIdctAlgo() int32 {
|
||||
return (int32)(dct.idct_algo)
|
||||
}
|
||||
|
||||
// Custom: SetIdctAlgo sets `AVDCT.idct_algo` value.
|
||||
// SetIdctAlgo sets `AVDCT.idct_algo` value.
|
||||
func (dct *AVDCT) SetIdctAlgo(v int32) {
|
||||
dct.idct_algo = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetIdctAlgoAddr gets `AVDCT.idct_algo` address.
|
||||
// GetIdctAlgoAddr gets `AVDCT.idct_algo` address.
|
||||
func (dct *AVDCT) GetIdctAlgoAddr() *int32 {
|
||||
return (*int32)(&dct.idct_algo)
|
||||
}
|
||||
|
||||
// Custom: GetGetPixels gets `AVDCT.get_pixels` value.
|
||||
// GetGetPixels gets `AVDCT.get_pixels` value.
|
||||
func (dct *AVDCT) GetGetPixels() AVDCTGetPixelsFunc {
|
||||
return (AVDCTGetPixelsFunc)(dct.get_pixels)
|
||||
}
|
||||
|
||||
// Custom: SetGetPixels sets `AVDCT.get_pixels` value.
|
||||
// SetGetPixels sets `AVDCT.get_pixels` value.
|
||||
func (dct *AVDCT) SetGetPixels(v AVDCTGetPixelsFunc) {
|
||||
dct.get_pixels = (C.avdct_get_pixels_func)(v)
|
||||
}
|
||||
|
||||
// Custom: GetGetPixelsAddr gets `AVDCT.get_pixels` address.
|
||||
// GetGetPixelsAddr gets `AVDCT.get_pixels` address.
|
||||
func (dct *AVDCT) GetGetPixelsAddr() *AVDCTGetPixelsFunc {
|
||||
return (*AVDCTGetPixelsFunc)(&dct.get_pixels)
|
||||
}
|
||||
|
||||
// Custom: GetBitsPerSample gets `AVDCT.bits_per_sample` value.
|
||||
// GetBitsPerSample gets `AVDCT.bits_per_sample` value.
|
||||
func (dct *AVDCT) GetBitsPerSample() int32 {
|
||||
return (int32)(dct.bits_per_sample)
|
||||
}
|
||||
|
||||
// Custom: SetBitsPerSample sets `AVDCT.bits_per_sample` value.
|
||||
// SetBitsPerSample sets `AVDCT.bits_per_sample` value.
|
||||
func (dct *AVDCT) SetBitsPerSample(v int32) {
|
||||
dct.bits_per_sample = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetBitsPerSampleAddr gets `AVDCT.bits_per_sample` address.
|
||||
// GetBitsPerSampleAddr gets `AVDCT.bits_per_sample` address.
|
||||
func (dct *AVDCT) GetBitsPerSampleAddr() *int32 {
|
||||
return (*int32)(&dct.bits_per_sample)
|
||||
}
|
||||
|
||||
// Custom: GetGetPixelsUnaligned gets `AVDCT.get_pixels_unaligned` value.
|
||||
// GetGetPixelsUnaligned gets `AVDCT.get_pixels_unaligned` value.
|
||||
func (dct *AVDCT) GetGetPixelsUnaligned() AVDCTGetPixelsUnalignedFunc {
|
||||
return (AVDCTGetPixelsUnalignedFunc)(dct.get_pixels_unaligned)
|
||||
}
|
||||
|
||||
// Custom: SetGetPixelsUnaligned sets `AVDCT.get_pixels_unaligned` value.
|
||||
// SetGetPixelsUnaligned sets `AVDCT.get_pixels_unaligned` value.
|
||||
func (dct *AVDCT) SetGetPixelsUnaligned(v AVDCTGetPixelsUnalignedFunc) {
|
||||
dct.get_pixels_unaligned = (C.avdct_get_pixels_unaligned_func)(v)
|
||||
}
|
||||
|
||||
// Custom: GetGetPixelsUnalignedAddr gets `AVDCT.get_pixels_unaligned` address.
|
||||
// GetGetPixelsUnalignedAddr gets `AVDCT.get_pixels_unaligned` address.
|
||||
func (dct *AVDCT) GetGetPixelsUnalignedAddr() *AVDCTGetPixelsUnalignedFunc {
|
||||
return (*AVDCTGetPixelsUnalignedFunc)(&dct.get_pixels_unaligned)
|
||||
}
|
||||
|
@@ -11,12 +11,12 @@ type FFTSample = C.FFTSample
|
||||
// FFTComplex
|
||||
type FFTComplex C.struct_FFTComplex
|
||||
|
||||
// Custom: GetRe gets `FFTComplex.re` value.
|
||||
// GetRe gets `FFTComplex.re` value.
|
||||
func (fc *FFTComplex) GetRe() FFTSample {
|
||||
return (FFTSample)(fc.re)
|
||||
}
|
||||
|
||||
// Custom: GetIm gets `FFTComplex.im` value.
|
||||
// GetIm gets `FFTComplex.im` value.
|
||||
func (fc *FFTComplex) GetIm() FFTSample {
|
||||
return (FFTSample)(fc.im)
|
||||
}
|
||||
|
@@ -12,122 +12,122 @@ type AVBSFInternal C.struct_AVBSFInternal
|
||||
// AVBSFContext
|
||||
type AVBSFContext C.struct_AVBSFContext
|
||||
|
||||
// Custom: GetAvClass gets `AVBSFContext.av_class` value.
|
||||
// GetAvClass gets `AVBSFContext.av_class` value.
|
||||
func (bsfc *AVBSFContext) GetAvClass() *AVClass {
|
||||
return (*AVClass)(bsfc.av_class)
|
||||
}
|
||||
|
||||
// Custom: SetAvClass sets `AVBSFContext.av_class` value.
|
||||
// SetAvClass sets `AVBSFContext.av_class` value.
|
||||
func (bsfc *AVBSFContext) SetAvClass(v *AVClass) {
|
||||
bsfc.av_class = (*C.struct_AVClass)(v)
|
||||
}
|
||||
|
||||
// Custom: GetAvClassAddr gets `AVBSFContext.av_class` address.
|
||||
// GetAvClassAddr gets `AVBSFContext.av_class` address.
|
||||
func (bsfc *AVBSFContext) GetAvClassAddr() **AVClass {
|
||||
return (**AVClass)(unsafe.Pointer(&bsfc.av_class))
|
||||
}
|
||||
|
||||
// Custom: GetFilter gets `AVBSFContext.filter` value.
|
||||
// GetFilter gets `AVBSFContext.filter` value.
|
||||
func (bsfc *AVBSFContext) GetFilter() *AVBitStreamFilter {
|
||||
return (*AVBitStreamFilter)(bsfc.filter)
|
||||
}
|
||||
|
||||
// Custom: SetFilter sets `AVBSFContext.filter` value.
|
||||
// SetFilter sets `AVBSFContext.filter` value.
|
||||
func (bsfc *AVBSFContext) SetFilter(v *AVBitStreamFilter) {
|
||||
bsfc.filter = (*C.struct_AVBitStreamFilter)(v)
|
||||
}
|
||||
|
||||
// Custom: GetFilterAddr gets `AVBSFContext.filter` address.
|
||||
// GetFilterAddr gets `AVBSFContext.filter` address.
|
||||
func (bsfc *AVBSFContext) GetFilterAddr() **AVBitStreamFilter {
|
||||
return (**AVBitStreamFilter)(unsafe.Pointer(&bsfc.filter))
|
||||
}
|
||||
|
||||
// Custom: GetInternal gets `AVBSFContext.internal` value.
|
||||
// GetInternal gets `AVBSFContext.internal` value.
|
||||
func (bsfc *AVBSFContext) GetInternal() *AVBSFInternal {
|
||||
return (*AVBSFInternal)(bsfc.internal)
|
||||
}
|
||||
|
||||
// Custom: SetInternal sets `AVBSFContext.internal` value.
|
||||
// SetInternal sets `AVBSFContext.internal` value.
|
||||
func (bsfc *AVBSFContext) SetInternal(v *AVBSFInternal) {
|
||||
bsfc.internal = (*C.struct_AVBSFInternal)(v)
|
||||
}
|
||||
|
||||
// Custom: GetInternalAddr gets `AVBSFContext.internal` address.
|
||||
// GetInternalAddr gets `AVBSFContext.internal` address.
|
||||
func (bsfc *AVBSFContext) GetInternalAddr() **AVBSFInternal {
|
||||
return (**AVBSFInternal)(unsafe.Pointer(&bsfc.internal))
|
||||
}
|
||||
|
||||
// Custom: GetPrivData gets `AVBSFContext.priv_data` value.
|
||||
// GetPrivData gets `AVBSFContext.priv_data` value.
|
||||
func (bsfc *AVBSFContext) GetPrivData() unsafe.Pointer {
|
||||
return bsfc.priv_data
|
||||
}
|
||||
|
||||
// Custom: SetPrivData sets `AVBSFContext.priv_data` value.
|
||||
// SetPrivData sets `AVBSFContext.priv_data` value.
|
||||
func (bsfc *AVBSFContext) SetPrivData(v CVoidPointer) {
|
||||
bsfc.priv_data = VoidPointer(v)
|
||||
}
|
||||
|
||||
// Custom: GetPrivDataAddr gets `AVBSFContext.priv_data` address.
|
||||
// GetPrivDataAddr gets `AVBSFContext.priv_data` address.
|
||||
func (bsfc *AVBSFContext) GetPrivDataAddr() unsafe.Pointer {
|
||||
return (unsafe.Pointer)(&bsfc.priv_data)
|
||||
}
|
||||
|
||||
// Custom: GetParIn gets `AVBSFContext.par_in` value.
|
||||
// GetParIn gets `AVBSFContext.par_in` value.
|
||||
func (bsfc *AVBSFContext) GetParIn() *AVCodecParameters {
|
||||
return (*AVCodecParameters)(bsfc.par_in)
|
||||
}
|
||||
|
||||
// Custom: SetParIn sets `AVBSFContext.par_in` value.
|
||||
// SetParIn sets `AVBSFContext.par_in` value.
|
||||
func (bsfc *AVBSFContext) SetParIn(v *AVCodecParameters) {
|
||||
bsfc.par_in = (*C.struct_AVCodecParameters)(v)
|
||||
}
|
||||
|
||||
// Custom: GetParInAddr gets `AVBSFContext.par_in` address.
|
||||
// GetParInAddr gets `AVBSFContext.par_in` address.
|
||||
func (bsfc *AVBSFContext) GetParInAddr() **AVCodecParameters {
|
||||
return (**AVCodecParameters)(unsafe.Pointer(&bsfc.par_in))
|
||||
}
|
||||
|
||||
// Custom: GetParOut gets `AVBSFContext.par_out` value.
|
||||
// GetParOut gets `AVBSFContext.par_out` value.
|
||||
func (bsfc *AVBSFContext) GetParOut() *AVCodecParameters {
|
||||
return (*AVCodecParameters)(bsfc.par_out)
|
||||
}
|
||||
|
||||
// Custom: SetParOut sets `AVBSFContext.par_out` value.
|
||||
// SetParOut sets `AVBSFContext.par_out` value.
|
||||
func (bsfc *AVBSFContext) SetParOut(v *AVCodecParameters) {
|
||||
bsfc.par_out = (*C.struct_AVCodecParameters)(v)
|
||||
}
|
||||
|
||||
// Custom: GetParOutAddr gets `AVBSFContext.par_out` address.
|
||||
// GetParOutAddr gets `AVBSFContext.par_out` address.
|
||||
func (bsfc *AVBSFContext) GetParOutAddr() **AVCodecParameters {
|
||||
return (**AVCodecParameters)(unsafe.Pointer(&bsfc.par_out))
|
||||
}
|
||||
|
||||
// Custom: GetTimeBaseIn gets `AVBSFContext.time_base_in` value.
|
||||
// GetTimeBaseIn gets `AVBSFContext.time_base_in` value.
|
||||
func (bsfc *AVBSFContext) GetTimeBaseIn() AVRational {
|
||||
return (AVRational)(bsfc.time_base_in)
|
||||
}
|
||||
|
||||
// Custom: SetTimeBaseIn sets `AVBSFContext.time_base_in` value.
|
||||
// SetTimeBaseIn sets `AVBSFContext.time_base_in` value.
|
||||
func (bsfc *AVBSFContext) SetTimeBaseIn(v AVRational) {
|
||||
bsfc.time_base_in = (C.struct_AVRational)(v)
|
||||
}
|
||||
|
||||
// Custom: GetTimeBaseInAddr gets `AVBSFContext.time_base_in` address.
|
||||
// GetTimeBaseInAddr gets `AVBSFContext.time_base_in` address.
|
||||
func (bsfc *AVBSFContext) GetTimeBaseInAddr() *AVRational {
|
||||
return (*AVRational)(&bsfc.time_base_in)
|
||||
}
|
||||
|
||||
// Custom: GetTimeBaseOut gets `AVBSFContext.time_base_out` value.
|
||||
// GetTimeBaseOut gets `AVBSFContext.time_base_out` value.
|
||||
func (bsfc *AVBSFContext) GetTimeBaseOut() AVRational {
|
||||
return (AVRational)(bsfc.time_base_out)
|
||||
}
|
||||
|
||||
// Custom: SetTimeBaseOut sets `AVBSFContext.time_base_out` value.
|
||||
// SetTimeBaseOut sets `AVBSFContext.time_base_out` value.
|
||||
func (bsfc *AVBSFContext) SetTimeBaseOut(v AVRational) {
|
||||
bsfc.time_base_out = (C.struct_AVRational)(v)
|
||||
}
|
||||
|
||||
// Custom: GetTimeBaseOutAddr gets `AVBSFContext.time_base_out` address.
|
||||
// GetTimeBaseOutAddr gets `AVBSFContext.time_base_out` address.
|
||||
func (bsfc *AVBSFContext) GetTimeBaseOutAddr() *AVRational {
|
||||
return (*AVRational)(&bsfc.time_base_out)
|
||||
}
|
||||
@@ -135,29 +135,29 @@ func (bsfc *AVBSFContext) GetTimeBaseOutAddr() *AVRational {
|
||||
// AVBitStreamFilter
|
||||
type AVBitStreamFilter C.struct_AVBitStreamFilter
|
||||
|
||||
// Custom: GetName gets `AVBitStreamFilter.name` value.
|
||||
// GetName gets `AVBitStreamFilter.name` value.
|
||||
func (bsf *AVBitStreamFilter) GetName() string {
|
||||
return C.GoString(bsf.name)
|
||||
}
|
||||
|
||||
// Custom: GetCodecIds gets `AVBitStreamFilter.codec_ids` value.
|
||||
// GetCodecIds gets `AVBitStreamFilter.codec_ids` value.
|
||||
func (bsf *AVBitStreamFilter) GetCodecIds() []AVCodecID {
|
||||
return SliceTrunc((*AVCodecID)(bsf.codec_ids), func(ac AVCodecID) bool {
|
||||
return ac == AV_CODEC_ID_NONE
|
||||
})
|
||||
}
|
||||
|
||||
// Custom: GetPrivClass gets `AVBitStreamFilter.priv_class` value.
|
||||
// GetPrivClass gets `AVBitStreamFilter.priv_class` value.
|
||||
func (bsf *AVBitStreamFilter) GetPrivClass() *AVClass {
|
||||
return (*AVClass)(bsf.priv_class)
|
||||
}
|
||||
|
||||
// Custom: SetPrivClass sets `AVBitStreamFilter.priv_class` value.
|
||||
// SetPrivClass sets `AVBitStreamFilter.priv_class` value.
|
||||
func (bsf *AVBitStreamFilter) SetPrivClass(v *AVClass) {
|
||||
bsf.priv_class = (*C.struct_AVClass)(v)
|
||||
}
|
||||
|
||||
// Custom: GetPrivClassAddr gets `AVBitStreamFilter.priv_class` address.
|
||||
// GetPrivClassAddr gets `AVBitStreamFilter.priv_class` address.
|
||||
func (bsf *AVBitStreamFilter) GetPrivClassAddr() **AVClass {
|
||||
return (**AVClass)(unsafe.Pointer(&bsf.priv_class))
|
||||
}
|
||||
|
@@ -32,12 +32,12 @@ const (
|
||||
// AVProfile
|
||||
type AVProfile C.struct_AVProfile
|
||||
|
||||
// Custom: GetProfile gets `AVProfile.profile` value.
|
||||
// GetProfile gets `AVProfile.profile` value.
|
||||
func (p *AVProfile) GetProfile() int32 {
|
||||
return (int32)(p.profile)
|
||||
}
|
||||
|
||||
// Custom: GetName gets `AVProfile.name` value.
|
||||
// GetName gets `AVProfile.name` value.
|
||||
func (p *AVProfile) GetName() string {
|
||||
return C.GoString(p.name)
|
||||
}
|
||||
@@ -45,79 +45,79 @@ func (p *AVProfile) GetName() string {
|
||||
// AVCodec
|
||||
type AVCodec C.struct_AVCodec
|
||||
|
||||
// Custom: GetName gets `AVCodec.name` value.
|
||||
// GetName gets `AVCodec.name` value.
|
||||
func (codec *AVCodec) GetName() string {
|
||||
return C.GoString(codec.name)
|
||||
}
|
||||
|
||||
// Custom: GetLongName gets `AVCodec.long_name` value.
|
||||
// GetLongName gets `AVCodec.long_name` value.
|
||||
func (codec *AVCodec) GetLongName() string {
|
||||
return C.GoString(codec.long_name)
|
||||
}
|
||||
|
||||
// Custom: GetType gets `AVCodec.type` value.
|
||||
// GetType gets `AVCodec.type` value.
|
||||
func (codec *AVCodec) GetType() AVMediaType {
|
||||
return (AVMediaType)(codec._type)
|
||||
}
|
||||
|
||||
// Custom: GetType gets `AVCodec.id` value.
|
||||
// GetType gets `AVCodec.id` value.
|
||||
func (codec *AVCodec) GetID() AVCodecID {
|
||||
return (AVCodecID)(codec.id)
|
||||
}
|
||||
|
||||
// Custom: GetCapabilities gets `AVCodec.capabilities` value.
|
||||
// GetCapabilities gets `AVCodec.capabilities` value.
|
||||
func (codec *AVCodec) GetCapabilities() int32 {
|
||||
return (int32)(codec.capabilities)
|
||||
}
|
||||
|
||||
// Custom: GetSupportedFramerates gets `AVCodec.supportedFramerates` value.
|
||||
// GetSupportedFramerates gets `AVCodec.supportedFramerates` value.
|
||||
func (codec *AVCodec) GetSupportedFramerates() []AVRational {
|
||||
return SliceTrunc((*AVRational)(codec.supported_framerates), func(ar AVRational) bool {
|
||||
return ar.GetNum() == 0 && ar.GetDen() == 0
|
||||
})
|
||||
}
|
||||
|
||||
// Custom: GetPixFmts gets `AVCodec.pix_fmts` value.
|
||||
// GetPixFmts gets `AVCodec.pix_fmts` value.
|
||||
func (codec *AVCodec) GetPixFmts() []AVPixelFormat {
|
||||
return SliceTrunc((*AVPixelFormat)(codec.pix_fmts), func(pf AVPixelFormat) bool {
|
||||
return pf == AV_PIX_FMT_NONE
|
||||
})
|
||||
}
|
||||
|
||||
// Custom: GetSupportedSamplerates gets `AVCodec.supported_samplerates` value.
|
||||
// GetSupportedSamplerates gets `AVCodec.supported_samplerates` value.
|
||||
func (codec *AVCodec) GetSupportedSamplerates() []int32 {
|
||||
return SliceTrunc((*int32)(codec.supported_samplerates), func(i int32) bool {
|
||||
return i == 0
|
||||
})
|
||||
}
|
||||
|
||||
// Custom: GetSampleFmts gets `AVCodec.sample_fmts` value.
|
||||
// GetSampleFmts gets `AVCodec.sample_fmts` value.
|
||||
func (codec *AVCodec) GetSampleFmts() []AVSampleFormat {
|
||||
return SliceTrunc((*AVSampleFormat)(codec.sample_fmts), func(sf AVSampleFormat) bool {
|
||||
return sf == AV_SAMPLE_FMT_NONE
|
||||
})
|
||||
}
|
||||
|
||||
// Custom: GetChannelLayouts gets `AVCodec.channel_layouts` value.
|
||||
// GetChannelLayouts gets `AVCodec.channel_layouts` value.
|
||||
func (codec *AVCodec) GetChannelLayouts() []uint64 {
|
||||
return SliceTrunc((*uint64)(codec.channel_layouts), func(u uint64) bool {
|
||||
return u == 0
|
||||
})
|
||||
}
|
||||
|
||||
// Custom: GetMaxLowres gets `AVCodec.max_lowres` value.
|
||||
// GetMaxLowres gets `AVCodec.max_lowres` value.
|
||||
func (codec *AVCodec) GetMaxLowres() uint8 {
|
||||
return (uint8)(codec.max_lowres)
|
||||
}
|
||||
|
||||
// Custom: GetProfiles gets `AVCodec.profiles` value.
|
||||
// GetProfiles gets `AVCodec.profiles` value.
|
||||
func (codec *AVCodec) GetProfiles() []AVProfile {
|
||||
return SliceTrunc((*AVProfile)(codec.profiles), func(ap AVProfile) bool {
|
||||
return ap.GetProfile() == FF_PROFILE_UNKNOWN
|
||||
})
|
||||
}
|
||||
|
||||
// Custom: GetWrapperName gets `AVCodec.wrapper_name` value.
|
||||
// GetWrapperName gets `AVCodec.wrapper_name` value.
|
||||
func (codec *AVCodec) GetWrapperName() string {
|
||||
return C.GoString(codec.wrapper_name)
|
||||
}
|
||||
@@ -171,52 +171,52 @@ const (
|
||||
// AVCodecHWConfig
|
||||
type AVCodecHWConfig C.struct_AVCodecHWConfig
|
||||
|
||||
// Custom: GetPixFmt gets `AVCodecHWConfig.pix_fmt` value.
|
||||
// GetPixFmt gets `AVCodecHWConfig.pix_fmt` value.
|
||||
func (hwc *AVCodecHWConfig) GetPixFmt() AVPixelFormat {
|
||||
return (AVPixelFormat)(hwc.pix_fmt)
|
||||
}
|
||||
|
||||
// Custom: SetPixFmt sets `AVCodecHWConfig.pix_fmt` value.
|
||||
// SetPixFmt sets `AVCodecHWConfig.pix_fmt` value.
|
||||
func (hwc *AVCodecHWConfig) SetPixFmt(v AVPixelFormat) {
|
||||
hwc.pix_fmt = (C.enum_AVPixelFormat)(v)
|
||||
}
|
||||
|
||||
// Custom: GetPixFmtAddr gets `AVCodecHWConfig.pix_fmt` address.
|
||||
// GetPixFmtAddr gets `AVCodecHWConfig.pix_fmt` address.
|
||||
func (hwc *AVCodecHWConfig) GetPixFmtAddr() *AVPixelFormat {
|
||||
return (*AVPixelFormat)(&hwc.pix_fmt)
|
||||
}
|
||||
|
||||
// Custom: GetMethods gets `AVCodecHWConfig.methods` value.
|
||||
// GetMethods gets `AVCodecHWConfig.methods` value.
|
||||
func (hwc *AVCodecHWConfig) GetMethods() int32 {
|
||||
return (int32)(hwc.methods)
|
||||
}
|
||||
|
||||
// Custom: SetMethods sets `AVCodecHWConfig.methods` value.
|
||||
// SetMethods sets `AVCodecHWConfig.methods` value.
|
||||
func (hwc *AVCodecHWConfig) SetMethods(v int32) {
|
||||
hwc.methods = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetMethodsAddr gets `AVCodecHWConfig.methods` address.
|
||||
// GetMethodsAddr gets `AVCodecHWConfig.methods` address.
|
||||
func (hwc *AVCodecHWConfig) GetMethodsAddr() *int32 {
|
||||
return (*int32)(&hwc.methods)
|
||||
}
|
||||
|
||||
// Custom: GetDeviceType gets `AVCodecHWConfig.devicetype` value.
|
||||
// GetDeviceType gets `AVCodecHWConfig.devicetype` value.
|
||||
func (hwc *AVCodecHWConfig) GetDeviceType() AVHWDeviceType {
|
||||
return (AVHWDeviceType)(hwc.device_type)
|
||||
}
|
||||
|
||||
// Custom: SetDeviceType sets `AVCodecHWConfig.devicetype` value.
|
||||
// SetDeviceType sets `AVCodecHWConfig.devicetype` value.
|
||||
func (hwc *AVCodecHWConfig) SetDeviceType(v AVHWDeviceType) {
|
||||
hwc.device_type = (C.enum_AVHWDeviceType)(v)
|
||||
}
|
||||
|
||||
// Custom: GetDeviceTypeAddr gets `AVCodecHWConfig.devicetype` address.
|
||||
// GetDeviceTypeAddr gets `AVCodecHWConfig.devicetype` address.
|
||||
func (hwc *AVCodecHWConfig) GetDeviceTypeAddr() *AVHWDeviceType {
|
||||
return (*AVHWDeviceType)(&hwc.device_type)
|
||||
}
|
||||
|
||||
// AvCodecGetHwConfig retrieves supported hardware configurations for a codec.
|
||||
func AvCodecGetHwConfig[T HelperInteger](codec *AVCodec, index T) *AVCodecHWConfig {
|
||||
func AvCodecGetHwConfig[T Integer](codec *AVCodec, index T) *AVCodecHWConfig {
|
||||
return (*AVCodecHWConfig)(C.avcodec_get_hw_config((*C.struct_AVCodec)(codec), (C.int)(index)))
|
||||
}
|
||||
|
@@ -8,37 +8,37 @@ import "C"
|
||||
// AVCodecDescriptor
|
||||
type AVCodecDescriptor C.struct_AVCodecDescriptor
|
||||
|
||||
// Custom: GetId gets `AVCodecDescriptor.id` value.
|
||||
// GetId gets `AVCodecDescriptor.id` value.
|
||||
func (hwc *AVCodecDescriptor) GetId() AVCodecID {
|
||||
return (AVCodecID)(hwc.id)
|
||||
}
|
||||
|
||||
// Custom: GetType gets `AVCodecDescriptor.type` value.
|
||||
// GetType gets `AVCodecDescriptor.type` value.
|
||||
func (hwc *AVCodecDescriptor) GetType() AVMediaType {
|
||||
return (AVMediaType)(hwc._type)
|
||||
}
|
||||
|
||||
// Custom: GetName gets `AVCodecDescriptor.name` value.
|
||||
// GetName gets `AVCodecDescriptor.name` value.
|
||||
func (hwc *AVCodecDescriptor) GetName() string {
|
||||
return C.GoString(hwc.name)
|
||||
}
|
||||
|
||||
// Custom: GetLongName gets `AVCodecDescriptor.long_name` value.
|
||||
// GetLongName gets `AVCodecDescriptor.long_name` value.
|
||||
func (hwc *AVCodecDescriptor) GetLongName() string {
|
||||
return C.GoString(hwc.long_name)
|
||||
}
|
||||
|
||||
// Custom: GetProps gets `AVCodecDescriptor.props` value.
|
||||
// GetProps gets `AVCodecDescriptor.props` value.
|
||||
func (hwc *AVCodecDescriptor) GetProps() int32 {
|
||||
return (int32)(hwc.props)
|
||||
}
|
||||
|
||||
// Custom: GetMimeTypes gets `AVCodecDescriptor.mime_types` value.
|
||||
// GetMimeTypes gets `AVCodecDescriptor.mime_types` value.
|
||||
func (hwc *AVCodecDescriptor) GetMimeTypes() (v []string) {
|
||||
return SliceTruncString(hwc.mime_types)
|
||||
}
|
||||
|
||||
// Custom: GetProfiles gets `AVCodecDescriptor.profiles` value.
|
||||
// GetProfiles gets `AVCodecDescriptor.profiles` value.
|
||||
func (hwc *AVCodecDescriptor) GetProfiles() []AVProfile {
|
||||
return SliceTrunc((*AVProfile)(hwc.profiles), func(ap AVProfile) bool {
|
||||
return ap.GetProfile() == FF_PROFILE_UNKNOWN
|
||||
|
@@ -21,437 +21,437 @@ const (
|
||||
// AVCodecParameters
|
||||
type AVCodecParameters C.struct_AVCodecParameters
|
||||
|
||||
// Custom: GetCodecType gets `AVCodecParameters.codectype` value.
|
||||
// GetCodecType gets `AVCodecParameters.codectype` value.
|
||||
func (par *AVCodecParameters) GetCodecType() AVMediaType {
|
||||
return (AVMediaType)(par.codec_type)
|
||||
}
|
||||
|
||||
// Custom: SetCodecType sets `AVCodecParameters.codectype` value.
|
||||
// SetCodecType sets `AVCodecParameters.codectype` value.
|
||||
func (par *AVCodecParameters) SetCodecType(v AVMediaType) {
|
||||
par.codec_type = (C.enum_AVMediaType)(v)
|
||||
}
|
||||
|
||||
// Custom: GetCodecTypeAddr gets `AVCodecParameters.codectype` address.
|
||||
// GetCodecTypeAddr gets `AVCodecParameters.codectype` address.
|
||||
func (par *AVCodecParameters) GetCodecTypeAddr() *AVMediaType {
|
||||
return (*AVMediaType)(unsafe.Pointer(&par.codec_type))
|
||||
}
|
||||
|
||||
// Custom: GetCodecId gets `AVCodecParameters.codec_id` value.
|
||||
// GetCodecId gets `AVCodecParameters.codec_id` value.
|
||||
func (par *AVCodecParameters) GetCodecId() AVCodecID {
|
||||
return (AVCodecID)(par.codec_id)
|
||||
}
|
||||
|
||||
// Custom: SetCodecId sets `AVCodecParameters.codec_id` value.
|
||||
// SetCodecId sets `AVCodecParameters.codec_id` value.
|
||||
func (par *AVCodecParameters) SetCodecId(v AVCodecID) {
|
||||
par.codec_id = (C.enum_AVCodecID)(v)
|
||||
}
|
||||
|
||||
// Custom: GetCodecIdAddr gets `AVCodecParameters.codec_id` address.
|
||||
// GetCodecIdAddr gets `AVCodecParameters.codec_id` address.
|
||||
func (par *AVCodecParameters) GetCodecIdAddr() *AVCodecID {
|
||||
return (*AVCodecID)(unsafe.Pointer(&par.codec_id))
|
||||
}
|
||||
|
||||
// Custom: GetCodecTag gets `AVCodecParameters.codec_tag` value.
|
||||
// GetCodecTag gets `AVCodecParameters.codec_tag` value.
|
||||
func (par *AVCodecParameters) GetCodecTag() uint32 {
|
||||
return (uint32)(par.codec_tag)
|
||||
}
|
||||
|
||||
// Custom: SetCodecTag sets `AVCodecParameters.codec_tag` value.
|
||||
// SetCodecTag sets `AVCodecParameters.codec_tag` value.
|
||||
func (par *AVCodecParameters) SetCodecTag(v uint32) {
|
||||
par.codec_tag = (C.uint)(v)
|
||||
}
|
||||
|
||||
// Custom: GetCodecTagAddr gets `AVCodecParameters.codec_tag` address.
|
||||
// GetCodecTagAddr gets `AVCodecParameters.codec_tag` address.
|
||||
func (par *AVCodecParameters) GetCodecTagAddr() *uint32 {
|
||||
return (*uint32)(&par.codec_tag)
|
||||
}
|
||||
|
||||
// Custom: GetExtradata gets `AVCodecParameters.extradata` value.
|
||||
// GetExtradata gets `AVCodecParameters.extradata` value.
|
||||
func (par *AVCodecParameters) GetExtradata() *uint8 {
|
||||
return (*uint8)(par.extradata)
|
||||
}
|
||||
|
||||
// Custom: SetExtradata sets `AVCodecParameters.extradata` value.
|
||||
// SetExtradata sets `AVCodecParameters.extradata` value.
|
||||
func (par *AVCodecParameters) SetExtradata(v *uint8) {
|
||||
par.extradata = (*C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetExtradataAddr gets `AVCodecParameters.extradata` address.
|
||||
// GetExtradataAddr gets `AVCodecParameters.extradata` address.
|
||||
func (par *AVCodecParameters) GetExtradataAddr() *uint8 {
|
||||
return (*uint8)(unsafe.Pointer(&par.extradata))
|
||||
}
|
||||
|
||||
// Custom: GetExtradataSize gets `AVCodecParameters.extradata_size` value.
|
||||
// GetExtradataSize gets `AVCodecParameters.extradata_size` value.
|
||||
func (par *AVCodecParameters) GetExtradataSize() int32 {
|
||||
return (int32)(par.extradata_size)
|
||||
}
|
||||
|
||||
// Custom: SetExtradataSize sets `AVCodecParameters.extradata_size` value.
|
||||
// SetExtradataSize sets `AVCodecParameters.extradata_size` value.
|
||||
func (par *AVCodecParameters) SetExtradataSize(v int32) {
|
||||
par.extradata_size = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetExtradataSizeAddr gets `AVCodecParameters.extradata_size` address.
|
||||
// GetExtradataSizeAddr gets `AVCodecParameters.extradata_size` address.
|
||||
func (par *AVCodecParameters) GetExtradataSizeAddr() *int32 {
|
||||
return (*int32)(&par.extradata_size)
|
||||
}
|
||||
|
||||
// Custom: GetFormat gets `AVCodecParameters.format` value.
|
||||
// GetFormat gets `AVCodecParameters.format` value.
|
||||
func (par *AVCodecParameters) GetFormat() int32 {
|
||||
return (int32)(par.format)
|
||||
}
|
||||
|
||||
// Custom: SetFormat sets `AVCodecParameters.format` value.
|
||||
// SetFormat sets `AVCodecParameters.format` value.
|
||||
func (par *AVCodecParameters) SetFormat(v int32) {
|
||||
par.format = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetFormatAddr gets `AVCodecParameters.format` address.
|
||||
// GetFormatAddr gets `AVCodecParameters.format` address.
|
||||
func (par *AVCodecParameters) GetFormatAddr() *int32 {
|
||||
return (*int32)(&par.format)
|
||||
}
|
||||
|
||||
// Custom: GetBitRate gets `AVCodecParameters.bit_rate` value.
|
||||
// GetBitRate gets `AVCodecParameters.bit_rate` value.
|
||||
func (par *AVCodecParameters) GetBitRate() int64 {
|
||||
return (int64)(par.bit_rate)
|
||||
}
|
||||
|
||||
// Custom: SetBitRate sets `AVCodecParameters.bit_rate` value.
|
||||
// SetBitRate sets `AVCodecParameters.bit_rate` value.
|
||||
func (par *AVCodecParameters) SetBitRate(v int64) {
|
||||
par.bit_rate = (C.int64_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetBitRateAddr gets `AVCodecParameters.bit_rate` address.
|
||||
// GetBitRateAddr gets `AVCodecParameters.bit_rate` address.
|
||||
func (par *AVCodecParameters) GetBitRateAddr() *int64 {
|
||||
return (*int64)(&par.bit_rate)
|
||||
}
|
||||
|
||||
// Custom: GetBitsPerCodedSample gets `AVCodecParameters.bits_per_coded_sample` value.
|
||||
// GetBitsPerCodedSample gets `AVCodecParameters.bits_per_coded_sample` value.
|
||||
func (par *AVCodecParameters) GetBitsPerCodedSample() int32 {
|
||||
return (int32)(par.bits_per_coded_sample)
|
||||
}
|
||||
|
||||
// Custom: SetBitsPerCodedSample sets `AVCodecParameters.bits_per_coded_sample` value.
|
||||
// SetBitsPerCodedSample sets `AVCodecParameters.bits_per_coded_sample` value.
|
||||
func (par *AVCodecParameters) SetBitsPerCodedSample(v int32) {
|
||||
par.bits_per_coded_sample = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetBitsPerCodedSampleAddr gets `AVCodecParameters.bits_per_coded_sample` address.
|
||||
// GetBitsPerCodedSampleAddr gets `AVCodecParameters.bits_per_coded_sample` address.
|
||||
func (par *AVCodecParameters) GetBitsPerCodedSampleAddr() *int32 {
|
||||
return (*int32)(&par.bits_per_coded_sample)
|
||||
}
|
||||
|
||||
// Custom: GetBitsPerRawSample gets `AVCodecParameters.bits_per_raw_sample` value.
|
||||
// GetBitsPerRawSample gets `AVCodecParameters.bits_per_raw_sample` value.
|
||||
func (par *AVCodecParameters) GetBitsPerRawSample() int32 {
|
||||
return (int32)(par.bits_per_raw_sample)
|
||||
}
|
||||
|
||||
// Custom: SetBitsPerRawSample sets `AVCodecParameters.bits_per_raw_sample` value.
|
||||
// SetBitsPerRawSample sets `AVCodecParameters.bits_per_raw_sample` value.
|
||||
func (par *AVCodecParameters) SetBitsPerRawSample(v int32) {
|
||||
par.bits_per_raw_sample = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetBitsPerRawSampleAddr gets `AVCodecParameters.bits_per_raw_sample` address.
|
||||
// GetBitsPerRawSampleAddr gets `AVCodecParameters.bits_per_raw_sample` address.
|
||||
func (par *AVCodecParameters) GetBitsPerRawSampleAddr() *int32 {
|
||||
return (*int32)(&par.bits_per_raw_sample)
|
||||
}
|
||||
|
||||
// Custom: GetProfile gets `AVCodecParameters.profile` value.
|
||||
// GetProfile gets `AVCodecParameters.profile` value.
|
||||
func (par *AVCodecParameters) GetProfile() int32 {
|
||||
return (int32)(par.profile)
|
||||
}
|
||||
|
||||
// Custom: SetProfile sets `AVCodecParameters.profile` value.
|
||||
// SetProfile sets `AVCodecParameters.profile` value.
|
||||
func (par *AVCodecParameters) SetProfile(v int32) {
|
||||
par.profile = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetProfileAddr gets `AVCodecParameters.profile` address.
|
||||
// GetProfileAddr gets `AVCodecParameters.profile` address.
|
||||
func (par *AVCodecParameters) GetProfileAddr() *int32 {
|
||||
return (*int32)(&par.profile)
|
||||
}
|
||||
|
||||
// Custom: GetLevel gets `AVCodecParameters.level` value.
|
||||
// GetLevel gets `AVCodecParameters.level` value.
|
||||
func (par *AVCodecParameters) GetLevel() int32 {
|
||||
return (int32)(par.level)
|
||||
}
|
||||
|
||||
// Custom: SetLevel sets `AVCodecParameters.level` value.
|
||||
// SetLevel sets `AVCodecParameters.level` value.
|
||||
func (par *AVCodecParameters) SetLevel(v int32) {
|
||||
par.level = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetLevelAddr gets `AVCodecParameters.level` address.
|
||||
// GetLevelAddr gets `AVCodecParameters.level` address.
|
||||
func (par *AVCodecParameters) GetLevelAddr() *int32 {
|
||||
return (*int32)(&par.level)
|
||||
}
|
||||
|
||||
// Custom: GetWidth gets `AVCodecParameters.width` value.
|
||||
// GetWidth gets `AVCodecParameters.width` value.
|
||||
func (par *AVCodecParameters) GetWidth() int32 {
|
||||
return (int32)(par.width)
|
||||
}
|
||||
|
||||
// Custom: SetWidth sets `AVCodecParameters.width` value.
|
||||
// SetWidth sets `AVCodecParameters.width` value.
|
||||
func (par *AVCodecParameters) SetWidth(v int32) {
|
||||
par.width = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetWidthAddr gets `AVCodecParameters.width` address.
|
||||
// GetWidthAddr gets `AVCodecParameters.width` address.
|
||||
func (par *AVCodecParameters) GetWidthAddr() *int32 {
|
||||
return (*int32)(&par.width)
|
||||
}
|
||||
|
||||
// Custom: GetHeight gets `AVCodecParameters.height` value.
|
||||
// GetHeight gets `AVCodecParameters.height` value.
|
||||
func (par *AVCodecParameters) GetHeight() int32 {
|
||||
return (int32)(par.height)
|
||||
}
|
||||
|
||||
// Custom: SetHeight sets `AVCodecParameters.height` value.
|
||||
// SetHeight sets `AVCodecParameters.height` value.
|
||||
func (par *AVCodecParameters) SetHeight(v int32) {
|
||||
par.height = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetHeightAddr gets `AVCodecParameters.height` address.
|
||||
// GetHeightAddr gets `AVCodecParameters.height` address.
|
||||
func (par *AVCodecParameters) GetHeightAddr() *int32 {
|
||||
return (*int32)(&par.height)
|
||||
}
|
||||
|
||||
// Custom: GetSampleAspectRatio gets `AVCodecParameters.sample_aspect_ratio` value.
|
||||
// GetSampleAspectRatio gets `AVCodecParameters.sample_aspect_ratio` value.
|
||||
func (par *AVCodecParameters) GetSampleAspectRatio() AVRational {
|
||||
return (AVRational)(par.sample_aspect_ratio)
|
||||
}
|
||||
|
||||
// Custom: SetSampleAspectRatio sets `AVCodecParameters.sample_aspect_ratio` value.
|
||||
// SetSampleAspectRatio sets `AVCodecParameters.sample_aspect_ratio` value.
|
||||
func (par *AVCodecParameters) SetSampleAspectRatio(v AVRational) {
|
||||
par.sample_aspect_ratio = (C.struct_AVRational)(v)
|
||||
}
|
||||
|
||||
// Custom: GetSampleAspectRatioAddr gets `AVCodecParameters.sample_aspect_ratio` address.
|
||||
// GetSampleAspectRatioAddr gets `AVCodecParameters.sample_aspect_ratio` address.
|
||||
func (par *AVCodecParameters) GetSampleAspectRatioAddr() *AVRational {
|
||||
return (*AVRational)(&par.sample_aspect_ratio)
|
||||
}
|
||||
|
||||
// Custom: GetFieldOrder gets `AVCodecParameters.field_order` value.
|
||||
// GetFieldOrder gets `AVCodecParameters.field_order` value.
|
||||
func (par *AVCodecParameters) GetFieldOrder() AVFieldOrder {
|
||||
return (AVFieldOrder)(par.field_order)
|
||||
}
|
||||
|
||||
// Custom: SetFieldOrder sets `AVCodecParameters.field_order` value.
|
||||
// SetFieldOrder sets `AVCodecParameters.field_order` value.
|
||||
func (par *AVCodecParameters) SetFieldOrder(v AVFieldOrder) {
|
||||
par.field_order = (C.enum_AVFieldOrder)(v)
|
||||
}
|
||||
|
||||
// Custom: GetFieldOrderAddr gets `AVCodecParameters.field_order` address.
|
||||
// GetFieldOrderAddr gets `AVCodecParameters.field_order` address.
|
||||
func (par *AVCodecParameters) GetFieldOrderAddr() *AVFieldOrder {
|
||||
return (*AVFieldOrder)(unsafe.Pointer(&par.field_order))
|
||||
}
|
||||
|
||||
// Custom: GetColorRange gets `AVCodecParameters.colorrange` value.
|
||||
// GetColorRange gets `AVCodecParameters.colorrange` value.
|
||||
func (par *AVCodecParameters) GetColorRange() AVColorRange {
|
||||
return (AVColorRange)(par.color_range)
|
||||
}
|
||||
|
||||
// Custom: SetColorRange sets `AVCodecParameters.colorrange` value.
|
||||
// SetColorRange sets `AVCodecParameters.colorrange` value.
|
||||
func (par *AVCodecParameters) SetColorRange(v AVColorRange) {
|
||||
par.color_range = (C.enum_AVColorRange)(v)
|
||||
}
|
||||
|
||||
// Custom: GetColorRangeAddr gets `AVCodecParameters.colorrange` address.
|
||||
// GetColorRangeAddr gets `AVCodecParameters.colorrange` address.
|
||||
func (par *AVCodecParameters) GetColorRangeAddr() *AVColorRange {
|
||||
return (*AVColorRange)(unsafe.Pointer(&par.color_range))
|
||||
}
|
||||
|
||||
// Custom: GetColorPrimaries gets `AVCodecParameters.color_primaries` value.
|
||||
// GetColorPrimaries gets `AVCodecParameters.color_primaries` value.
|
||||
func (par *AVCodecParameters) GetColorPrimaries() AVColorPrimaries {
|
||||
return (AVColorPrimaries)(par.color_primaries)
|
||||
}
|
||||
|
||||
// Custom: SetColorPrimaries sets `AVCodecParameters.color_primaries` value.
|
||||
// SetColorPrimaries sets `AVCodecParameters.color_primaries` value.
|
||||
func (par *AVCodecParameters) SetColorPrimaries(v AVColorPrimaries) {
|
||||
par.color_primaries = (C.enum_AVColorPrimaries)(v)
|
||||
}
|
||||
|
||||
// Custom: GetColorPrimariesAddr gets `AVCodecParameters.color_primaries` address.
|
||||
// GetColorPrimariesAddr gets `AVCodecParameters.color_primaries` address.
|
||||
func (par *AVCodecParameters) GetColorPrimariesAddr() *AVColorPrimaries {
|
||||
return (*AVColorPrimaries)(unsafe.Pointer(&par.color_primaries))
|
||||
}
|
||||
|
||||
// Custom: GetColorTrc gets `AVCodecParameters.color_trc` value.
|
||||
// GetColorTrc gets `AVCodecParameters.color_trc` value.
|
||||
func (par *AVCodecParameters) GetColorTrc() AVColorTransferCharacteristic {
|
||||
return (AVColorTransferCharacteristic)(par.color_trc)
|
||||
}
|
||||
|
||||
// Custom: SetColorTrc sets `AVCodecParameters.color_trc` value.
|
||||
// SetColorTrc sets `AVCodecParameters.color_trc` value.
|
||||
func (par *AVCodecParameters) SetColorTrc(v AVColorTransferCharacteristic) {
|
||||
par.color_trc = (C.enum_AVColorTransferCharacteristic)(v)
|
||||
}
|
||||
|
||||
// Custom: GetColorTrcAddr gets `AVCodecParameters.color_trc` address.
|
||||
// GetColorTrcAddr gets `AVCodecParameters.color_trc` address.
|
||||
func (par *AVCodecParameters) GetColorTrcAddr() *AVColorTransferCharacteristic {
|
||||
return (*AVColorTransferCharacteristic)(unsafe.Pointer(&par.color_trc))
|
||||
}
|
||||
|
||||
// Custom: GetColorSpace gets `AVCodecParameters.color_space` value.
|
||||
// GetColorSpace gets `AVCodecParameters.color_space` value.
|
||||
func (par *AVCodecParameters) GetColorSpace() AVColorSpace {
|
||||
return (AVColorSpace)(par.color_space)
|
||||
}
|
||||
|
||||
// Custom: SetColorSpace sets `AVCodecParameters.color_space` value.
|
||||
// SetColorSpace sets `AVCodecParameters.color_space` value.
|
||||
func (par *AVCodecParameters) SetColorSpace(v AVColorSpace) {
|
||||
par.color_space = (C.enum_AVColorSpace)(v)
|
||||
}
|
||||
|
||||
// Custom: GetColorSpaceAddr gets `AVCodecParameters.color_space` address.
|
||||
// GetColorSpaceAddr gets `AVCodecParameters.color_space` address.
|
||||
func (par *AVCodecParameters) GetColorSpaceAddr() *AVColorSpace {
|
||||
return (*AVColorSpace)(unsafe.Pointer(&par.color_space))
|
||||
}
|
||||
|
||||
// Custom: GetChromaLocation gets `AVCodecParameters.chroma_location` value.
|
||||
// GetChromaLocation gets `AVCodecParameters.chroma_location` value.
|
||||
func (par *AVCodecParameters) GetChromaLocation() AVChromaLocation {
|
||||
return (AVChromaLocation)(par.chroma_location)
|
||||
}
|
||||
|
||||
// Custom: SetChromaLocation sets `AVCodecParameters.chroma_location` value.
|
||||
// SetChromaLocation sets `AVCodecParameters.chroma_location` value.
|
||||
func (par *AVCodecParameters) SetChromaLocation(v AVChromaLocation) {
|
||||
par.chroma_location = (C.enum_AVChromaLocation)(v)
|
||||
}
|
||||
|
||||
// Custom: GetChromaLocationAddr gets `AVCodecParameters.chroma_location` address.
|
||||
// GetChromaLocationAddr gets `AVCodecParameters.chroma_location` address.
|
||||
func (par *AVCodecParameters) GetChromaLocationAddr() *AVChromaLocation {
|
||||
return (*AVChromaLocation)(unsafe.Pointer(&par.chroma_location))
|
||||
}
|
||||
|
||||
// Custom: GetVideoDelay gets `AVCodecParameters.video_delay` value.
|
||||
// GetVideoDelay gets `AVCodecParameters.video_delay` value.
|
||||
func (par *AVCodecParameters) GetVideoDelay() int32 {
|
||||
return (int32)(par.video_delay)
|
||||
}
|
||||
|
||||
// Custom: SetVideoDelay sets `AVCodecParameters.video_delay` value.
|
||||
// SetVideoDelay sets `AVCodecParameters.video_delay` value.
|
||||
func (par *AVCodecParameters) SetVideoDelay(v int32) {
|
||||
par.video_delay = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetVideoDelayAddr gets `AVCodecParameters.video_delay` address.
|
||||
// GetVideoDelayAddr gets `AVCodecParameters.video_delay` address.
|
||||
func (par *AVCodecParameters) GetVideoDelayAddr() *int32 {
|
||||
return (*int32)(&par.video_delay)
|
||||
}
|
||||
|
||||
// Custom: GetChannelLayout gets `AVCodecParameters.channel_layout` value.
|
||||
// GetChannelLayout gets `AVCodecParameters.channel_layout` value.
|
||||
func (par *AVCodecParameters) GetChannelLayout() uint64 {
|
||||
return (uint64)(par.channel_layout)
|
||||
}
|
||||
|
||||
// Custom: SetChannelLayout sets `AVCodecParameters.channel_layout` value.
|
||||
// SetChannelLayout sets `AVCodecParameters.channel_layout` value.
|
||||
func (par *AVCodecParameters) SetChannelLayout(v uint64) {
|
||||
par.channel_layout = (C.uint64_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetChannelLayoutAddr gets `AVCodecParameters.channel_layout` address.
|
||||
// GetChannelLayoutAddr gets `AVCodecParameters.channel_layout` address.
|
||||
func (par *AVCodecParameters) GetChannelLayoutAddr() *uint64 {
|
||||
return (*uint64)(&par.channel_layout)
|
||||
}
|
||||
|
||||
// Custom: GetChannels gets `AVCodecParameters.channels` value.
|
||||
// GetChannels gets `AVCodecParameters.channels` value.
|
||||
func (par *AVCodecParameters) GetChannels() int32 {
|
||||
return (int32)(par.channels)
|
||||
}
|
||||
|
||||
// Custom: SetChannels sets `AVCodecParameters.channels` value.
|
||||
// SetChannels sets `AVCodecParameters.channels` value.
|
||||
func (par *AVCodecParameters) SetChannels(v int32) {
|
||||
par.channels = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetChannelsAddr gets `AVCodecParameters.channels` address.
|
||||
// GetChannelsAddr gets `AVCodecParameters.channels` address.
|
||||
func (par *AVCodecParameters) GetChannelsAddr() *int32 {
|
||||
return (*int32)(&par.channels)
|
||||
}
|
||||
|
||||
// Custom: GetSampleRate gets `AVCodecParameters.sample_rate` value.
|
||||
// GetSampleRate gets `AVCodecParameters.sample_rate` value.
|
||||
func (par *AVCodecParameters) GetSampleRate() int32 {
|
||||
return (int32)(par.sample_rate)
|
||||
}
|
||||
|
||||
// Custom: SetSampleRate sets `AVCodecParameters.sample_rate` value.
|
||||
// SetSampleRate sets `AVCodecParameters.sample_rate` value.
|
||||
func (par *AVCodecParameters) SetSampleRate(v int32) {
|
||||
par.sample_rate = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetSampleRateAddr gets `AVCodecParameters.sample_rate` address.
|
||||
// GetSampleRateAddr gets `AVCodecParameters.sample_rate` address.
|
||||
func (par *AVCodecParameters) GetSampleRateAddr() *int32 {
|
||||
return (*int32)(&par.sample_rate)
|
||||
}
|
||||
|
||||
// Custom: GetBlockAlign gets `AVCodecParameters.block_align` value.
|
||||
// GetBlockAlign gets `AVCodecParameters.block_align` value.
|
||||
func (par *AVCodecParameters) GetBlockAlign() int32 {
|
||||
return (int32)(par.block_align)
|
||||
}
|
||||
|
||||
// Custom: SetBlockAlign sets `AVCodecParameters.block_align` value.
|
||||
// SetBlockAlign sets `AVCodecParameters.block_align` value.
|
||||
func (par *AVCodecParameters) SetBlockAlign(v int32) {
|
||||
par.block_align = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetBlockAlignAddr gets `AVCodecParameters.block_align` address.
|
||||
// GetBlockAlignAddr gets `AVCodecParameters.block_align` address.
|
||||
func (par *AVCodecParameters) GetBlockAlignAddr() *int32 {
|
||||
return (*int32)(&par.block_align)
|
||||
}
|
||||
|
||||
// Custom: GetFrameSize gets `AVCodecParameters.frame_size` value.
|
||||
// GetFrameSize gets `AVCodecParameters.frame_size` value.
|
||||
func (par *AVCodecParameters) GetFrameSize() int32 {
|
||||
return (int32)(par.frame_size)
|
||||
}
|
||||
|
||||
// Custom: SetFrameSize sets `AVCodecParameters.frame_size` value.
|
||||
// SetFrameSize sets `AVCodecParameters.frame_size` value.
|
||||
func (par *AVCodecParameters) SetFrameSize(v int32) {
|
||||
par.frame_size = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetFrameSizeAddr gets `AVCodecParameters.frame_size` address.
|
||||
// GetFrameSizeAddr gets `AVCodecParameters.frame_size` address.
|
||||
func (par *AVCodecParameters) GetFrameSizeAddr() *int32 {
|
||||
return (*int32)(&par.frame_size)
|
||||
}
|
||||
|
||||
// Custom: GetInitialPadding gets `AVCodecParameters.initial_padding` value.
|
||||
// GetInitialPadding gets `AVCodecParameters.initial_padding` value.
|
||||
func (par *AVCodecParameters) GetInitialPadding() int32 {
|
||||
return (int32)(par.initial_padding)
|
||||
}
|
||||
|
||||
// Custom: SetInitialPadding sets `AVCodecParameters.initial_padding` value.
|
||||
// SetInitialPadding sets `AVCodecParameters.initial_padding` value.
|
||||
func (par *AVCodecParameters) SetInitialPadding(v int32) {
|
||||
par.initial_padding = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetInitialPaddingAddr gets `AVCodecParameters.initial_padding` address.
|
||||
// GetInitialPaddingAddr gets `AVCodecParameters.initial_padding` address.
|
||||
func (par *AVCodecParameters) GetInitialPaddingAddr() *int32 {
|
||||
return (*int32)(&par.initial_padding)
|
||||
}
|
||||
|
||||
// Custom: GetTrailingPadding gets `AVCodecParameters.trailing_padding` value.
|
||||
// GetTrailingPadding gets `AVCodecParameters.trailing_padding` value.
|
||||
func (par *AVCodecParameters) GetTrailingPadding() int32 {
|
||||
return (int32)(par.trailing_padding)
|
||||
}
|
||||
|
||||
// Custom: SetTrailingPadding sets `AVCodecParameters.trailing_padding` value.
|
||||
// SetTrailingPadding sets `AVCodecParameters.trailing_padding` value.
|
||||
func (par *AVCodecParameters) SetTrailingPadding(v int32) {
|
||||
par.trailing_padding = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetTrailingPaddingAddr gets `AVCodecParameters.trailing_padding` address.
|
||||
// GetTrailingPaddingAddr gets `AVCodecParameters.trailing_padding` address.
|
||||
func (par *AVCodecParameters) GetTrailingPaddingAddr() *int32 {
|
||||
return (*int32)(&par.trailing_padding)
|
||||
}
|
||||
|
||||
// Custom: GetSeekPreroll gets `AVCodecParameters.seek_preroll` value.
|
||||
// GetSeekPreroll gets `AVCodecParameters.seek_preroll` value.
|
||||
func (par *AVCodecParameters) GetSeekPreroll() int32 {
|
||||
return (int32)(par.seek_preroll)
|
||||
}
|
||||
|
||||
// Custom: SetSeekPreroll sets `AVCodecParameters.seek_preroll` value.
|
||||
// SetSeekPreroll sets `AVCodecParameters.seek_preroll` value.
|
||||
func (par *AVCodecParameters) SetSeekPreroll(v int32) {
|
||||
par.seek_preroll = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetSeekPrerollAddr gets `AVCodecParameters.seek_preroll` address.
|
||||
// GetSeekPrerollAddr gets `AVCodecParameters.seek_preroll` address.
|
||||
func (par *AVCodecParameters) GetSeekPrerollAddr() *int32 {
|
||||
return (*int32)(&par.seek_preroll)
|
||||
}
|
||||
|
156
avcodec_dirac.go
156
avcodec_dirac.go
@@ -34,32 +34,32 @@ const (
|
||||
// DiracVersionInfo
|
||||
type DiracVersionInfo C.struct_DiracVersionInfo
|
||||
|
||||
// Custom: GetMajor gets `DiracVersionInfo.major` value.
|
||||
// GetMajor gets `DiracVersionInfo.major` value.
|
||||
func (dvi *DiracVersionInfo) GetMajor() int32 {
|
||||
return (int32)(dvi.major)
|
||||
}
|
||||
|
||||
// Custom: SetMajor sets `DiracVersionInfo.major` value.
|
||||
// SetMajor sets `DiracVersionInfo.major` value.
|
||||
func (dvi *DiracVersionInfo) SetMajor(v int32) {
|
||||
dvi.major = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetMajorAddr gets `DiracVersionInfo.major` address.
|
||||
// GetMajorAddr gets `DiracVersionInfo.major` address.
|
||||
func (dvi *DiracVersionInfo) GetMajorAddr() *int32 {
|
||||
return (*int32)(&dvi.major)
|
||||
}
|
||||
|
||||
// Custom: GetMinor gets `DiracVersionInfo.minor` value.
|
||||
// GetMinor gets `DiracVersionInfo.minor` value.
|
||||
func (dvi *DiracVersionInfo) GetMinor() int32 {
|
||||
return (int32)(dvi.minor)
|
||||
}
|
||||
|
||||
// Custom: SetMinor sets `DiracVersionInfo.minor` value.
|
||||
// SetMinor sets `DiracVersionInfo.minor` value.
|
||||
func (dvi *DiracVersionInfo) SetMinor(v int32) {
|
||||
dvi.minor = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetMinorAddr gets `DiracVersionInfo.minor` address.
|
||||
// GetMinorAddr gets `DiracVersionInfo.minor` address.
|
||||
func (dvi *DiracVersionInfo) GetMinorAddr() *int32 {
|
||||
return (*int32)(&dvi.minor)
|
||||
}
|
||||
@@ -67,362 +67,362 @@ func (dvi *DiracVersionInfo) GetMinorAddr() *int32 {
|
||||
// AVDiracSeqHeader
|
||||
type AVDiracSeqHeader C.struct_AVDiracSeqHeader
|
||||
|
||||
// Custom: GetWidth gets `AVDiracSeqHeader.width` value.
|
||||
// GetWidth gets `AVDiracSeqHeader.width` value.
|
||||
func (dsh *AVDiracSeqHeader) GetWidth() uint32 {
|
||||
return (uint32)(dsh.width)
|
||||
}
|
||||
|
||||
// Custom: SetWidth sets `AVDiracSeqHeader.width` value.
|
||||
// SetWidth sets `AVDiracSeqHeader.width` value.
|
||||
func (dsh *AVDiracSeqHeader) SetWidth(v uint32) {
|
||||
dsh.width = (C.uint)(v)
|
||||
}
|
||||
|
||||
// Custom: GetWidthAddr gets `AVDiracSeqHeader.width` address.
|
||||
// GetWidthAddr gets `AVDiracSeqHeader.width` address.
|
||||
func (dsh *AVDiracSeqHeader) GetWidthAddr() *uint32 {
|
||||
return (*uint32)(&dsh.width)
|
||||
}
|
||||
|
||||
// Custom: GetHeight gets `AVDiracSeqHeader.height` value.
|
||||
// GetHeight gets `AVDiracSeqHeader.height` value.
|
||||
func (dsh *AVDiracSeqHeader) GetHeight() uint32 {
|
||||
return (uint32)(dsh.height)
|
||||
}
|
||||
|
||||
// Custom: SetHeight sets `AVDiracSeqHeader.height` value.
|
||||
// SetHeight sets `AVDiracSeqHeader.height` value.
|
||||
func (dsh *AVDiracSeqHeader) SetHeight(v uint32) {
|
||||
dsh.height = (C.uint)(v)
|
||||
}
|
||||
|
||||
// Custom: GetHeightAddr gets `AVDiracSeqHeader.height` address.
|
||||
// GetHeightAddr gets `AVDiracSeqHeader.height` address.
|
||||
func (dsh *AVDiracSeqHeader) GetHeightAddr() *uint32 {
|
||||
return (*uint32)(&dsh.height)
|
||||
}
|
||||
|
||||
// Custom: GetChromaFormat gets `AVDiracSeqHeader.chroma_format` value.
|
||||
// GetChromaFormat gets `AVDiracSeqHeader.chroma_format` value.
|
||||
func (dsh *AVDiracSeqHeader) GetChromaFormat() uint8 {
|
||||
return (uint8)(dsh.chroma_format)
|
||||
}
|
||||
|
||||
// Custom: SetChromaFormat sets `AVDiracSeqHeader.chroma_format` value.
|
||||
// SetChromaFormat sets `AVDiracSeqHeader.chroma_format` value.
|
||||
func (dsh *AVDiracSeqHeader) SetChromaFormat(v uint8) {
|
||||
dsh.chroma_format = (C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetChromaFormatAddr gets `AVDiracSeqHeader.chroma_format` address.
|
||||
// GetChromaFormatAddr gets `AVDiracSeqHeader.chroma_format` address.
|
||||
func (dsh *AVDiracSeqHeader) GetChromaFormatAddr() *uint8 {
|
||||
return (*uint8)(&dsh.chroma_format)
|
||||
}
|
||||
|
||||
// Custom: GetInterlaced gets `AVDiracSeqHeader.interlaced` value.
|
||||
// GetInterlaced gets `AVDiracSeqHeader.interlaced` value.
|
||||
func (dsh *AVDiracSeqHeader) GetInterlaced() uint8 {
|
||||
return (uint8)(dsh.interlaced)
|
||||
}
|
||||
|
||||
// Custom: SetInterlaced sets `AVDiracSeqHeader.interlaced` value.
|
||||
// SetInterlaced sets `AVDiracSeqHeader.interlaced` value.
|
||||
func (dsh *AVDiracSeqHeader) SetInterlaced(v uint8) {
|
||||
dsh.interlaced = (C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetInterlacedAddr gets `AVDiracSeqHeader.interlaced` address.
|
||||
// GetInterlacedAddr gets `AVDiracSeqHeader.interlaced` address.
|
||||
func (dsh *AVDiracSeqHeader) GetInterlacedAddr() *uint8 {
|
||||
return (*uint8)(&dsh.interlaced)
|
||||
}
|
||||
|
||||
// Custom: GetTopFieldFirst gets `AVDiracSeqHeader.top_field_first` value.
|
||||
// GetTopFieldFirst gets `AVDiracSeqHeader.top_field_first` value.
|
||||
func (dsh *AVDiracSeqHeader) GetTopFieldFirst() uint8 {
|
||||
return (uint8)(dsh.top_field_first)
|
||||
}
|
||||
|
||||
// Custom: SetTopFieldFirst sets `AVDiracSeqHeader.top_field_first` value.
|
||||
// SetTopFieldFirst sets `AVDiracSeqHeader.top_field_first` value.
|
||||
func (dsh *AVDiracSeqHeader) SetTopFieldFirst(v uint8) {
|
||||
dsh.top_field_first = (C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetTopFieldFirstAddr gets `AVDiracSeqHeader.top_field_first` address.
|
||||
// GetTopFieldFirstAddr gets `AVDiracSeqHeader.top_field_first` address.
|
||||
func (dsh *AVDiracSeqHeader) GetTopFieldFirstAddr() *uint8 {
|
||||
return (*uint8)(&dsh.top_field_first)
|
||||
}
|
||||
|
||||
// Custom: GetFrameRateIndex gets `AVDiracSeqHeader.frame_rate_index` value.
|
||||
// GetFrameRateIndex gets `AVDiracSeqHeader.frame_rate_index` value.
|
||||
func (dsh *AVDiracSeqHeader) GetFrameRateIndex() uint8 {
|
||||
return (uint8)(dsh.frame_rate_index)
|
||||
}
|
||||
|
||||
// Custom: SetFrameRateIndex sets `AVDiracSeqHeader.frame_rate_index` value.
|
||||
// SetFrameRateIndex sets `AVDiracSeqHeader.frame_rate_index` value.
|
||||
func (dsh *AVDiracSeqHeader) SetFrameRateIndex(v uint8) {
|
||||
dsh.frame_rate_index = (C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetFrameRateIndexAddr gets `AVDiracSeqHeader.frame_rate_index` address.
|
||||
// GetFrameRateIndexAddr gets `AVDiracSeqHeader.frame_rate_index` address.
|
||||
func (dsh *AVDiracSeqHeader) GetFrameRateIndexAddr() *uint8 {
|
||||
return (*uint8)(&dsh.frame_rate_index)
|
||||
}
|
||||
|
||||
// Custom: GetAspectRatioIndex gets `AVDiracSeqHeader.aspect_ratio_index` value.
|
||||
// GetAspectRatioIndex gets `AVDiracSeqHeader.aspect_ratio_index` value.
|
||||
func (dsh *AVDiracSeqHeader) GetAspectRatioIndex() uint8 {
|
||||
return (uint8)(dsh.aspect_ratio_index)
|
||||
}
|
||||
|
||||
// Custom: SetAspectRatioIndex sets `AVDiracSeqHeader.aspect_ratio_index` value.
|
||||
// SetAspectRatioIndex sets `AVDiracSeqHeader.aspect_ratio_index` value.
|
||||
func (dsh *AVDiracSeqHeader) SetAspectRatioIndex(v uint8) {
|
||||
dsh.aspect_ratio_index = (C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetAspectRatioIndexAddr gets `AVDiracSeqHeader.aspect_ratio_index` address.
|
||||
// GetAspectRatioIndexAddr gets `AVDiracSeqHeader.aspect_ratio_index` address.
|
||||
func (dsh *AVDiracSeqHeader) GetAspectRatioIndexAddr() *uint8 {
|
||||
return (*uint8)(&dsh.aspect_ratio_index)
|
||||
}
|
||||
|
||||
// Custom: GetCleanWidth gets `AVDiracSeqHeader.clean_width` value.
|
||||
// GetCleanWidth gets `AVDiracSeqHeader.clean_width` value.
|
||||
func (dsh *AVDiracSeqHeader) GetCleanWidth() uint16 {
|
||||
return (uint16)(dsh.clean_width)
|
||||
}
|
||||
|
||||
// Custom: SetCleanWidth sets `AVDiracSeqHeader.clean_width` value.
|
||||
// SetCleanWidth sets `AVDiracSeqHeader.clean_width` value.
|
||||
func (dsh *AVDiracSeqHeader) SetCleanWidth(v uint16) {
|
||||
dsh.clean_width = (C.uint16_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetCleanWidthAddr gets `AVDiracSeqHeader.clean_width` address.
|
||||
// GetCleanWidthAddr gets `AVDiracSeqHeader.clean_width` address.
|
||||
func (dsh *AVDiracSeqHeader) GetCleanWidthAddr() *uint16 {
|
||||
return (*uint16)(&dsh.clean_width)
|
||||
}
|
||||
|
||||
// Custom: GetCleanHeight gets `AVDiracSeqHeader.clean_height` value.
|
||||
// GetCleanHeight gets `AVDiracSeqHeader.clean_height` value.
|
||||
func (dsh *AVDiracSeqHeader) GetCleanHeight() uint16 {
|
||||
return (uint16)(dsh.clean_height)
|
||||
}
|
||||
|
||||
// Custom: SetCleanHeight sets `AVDiracSeqHeader.clean_height` value.
|
||||
// SetCleanHeight sets `AVDiracSeqHeader.clean_height` value.
|
||||
func (dsh *AVDiracSeqHeader) SetCleanHeight(v uint16) {
|
||||
dsh.clean_height = (C.uint16_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetCleanHeightAddr gets `AVDiracSeqHeader.clean_height` address.
|
||||
// GetCleanHeightAddr gets `AVDiracSeqHeader.clean_height` address.
|
||||
func (dsh *AVDiracSeqHeader) GetCleanHeightAddr() *uint16 {
|
||||
return (*uint16)(&dsh.clean_height)
|
||||
}
|
||||
|
||||
// Custom: GetCleanLeftOffset gets `AVDiracSeqHeader.clean_left_offset` value.
|
||||
// GetCleanLeftOffset gets `AVDiracSeqHeader.clean_left_offset` value.
|
||||
func (dsh *AVDiracSeqHeader) GetCleanLeftOffset() uint16 {
|
||||
return (uint16)(dsh.clean_left_offset)
|
||||
}
|
||||
|
||||
// Custom: SetCleanLeftOffset sets `AVDiracSeqHeader.clean_left_offset` value.
|
||||
// SetCleanLeftOffset sets `AVDiracSeqHeader.clean_left_offset` value.
|
||||
func (dsh *AVDiracSeqHeader) SetCleanLeftOffset(v uint16) {
|
||||
dsh.clean_left_offset = (C.uint16_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetCleanLeftOffsetAddr gets `AVDiracSeqHeader.clean_left_offset` address.
|
||||
// GetCleanLeftOffsetAddr gets `AVDiracSeqHeader.clean_left_offset` address.
|
||||
func (dsh *AVDiracSeqHeader) GetCleanLeftOffsetAddr() *uint16 {
|
||||
return (*uint16)(&dsh.clean_left_offset)
|
||||
}
|
||||
|
||||
// Custom: GetCleanRightOffset gets `AVDiracSeqHeader.clean_right_offset` value.
|
||||
// GetCleanRightOffset gets `AVDiracSeqHeader.clean_right_offset` value.
|
||||
func (dsh *AVDiracSeqHeader) GetCleanRightOffset() uint16 {
|
||||
return (uint16)(dsh.clean_right_offset)
|
||||
}
|
||||
|
||||
// Custom: SetCleanRightOffset sets `AVDiracSeqHeader.clean_right_offset` value.
|
||||
// SetCleanRightOffset sets `AVDiracSeqHeader.clean_right_offset` value.
|
||||
func (dsh *AVDiracSeqHeader) SetCleanRightOffset(v uint16) {
|
||||
dsh.clean_right_offset = (C.uint16_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetCleanRightOffsetAddr gets `AVDiracSeqHeader.clean_right_offset` address.
|
||||
// GetCleanRightOffsetAddr gets `AVDiracSeqHeader.clean_right_offset` address.
|
||||
func (dsh *AVDiracSeqHeader) GetCleanRightOffsetAddr() *uint16 {
|
||||
return (*uint16)(&dsh.clean_right_offset)
|
||||
}
|
||||
|
||||
// Custom: GetPixelRangeIndex gets `AVDiracSeqHeader.pixel_range_index` value.
|
||||
// GetPixelRangeIndex gets `AVDiracSeqHeader.pixel_range_index` value.
|
||||
func (dsh *AVDiracSeqHeader) GetPixelRangeIndex() uint8 {
|
||||
return (uint8)(dsh.pixel_range_index)
|
||||
}
|
||||
|
||||
// Custom: SetPixelRangeIndex sets `AVDiracSeqHeader.pixel_range_index` value.
|
||||
// SetPixelRangeIndex sets `AVDiracSeqHeader.pixel_range_index` value.
|
||||
func (dsh *AVDiracSeqHeader) SetPixelRangeIndex(v uint8) {
|
||||
dsh.pixel_range_index = (C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetPixelRangeIndexAddr gets `AVDiracSeqHeader.pixel_range_index` address.
|
||||
// GetPixelRangeIndexAddr gets `AVDiracSeqHeader.pixel_range_index` address.
|
||||
func (dsh *AVDiracSeqHeader) GetPixelRangeIndexAddr() *uint8 {
|
||||
return (*uint8)(&dsh.pixel_range_index)
|
||||
}
|
||||
|
||||
// Custom: GetColorSpecIndex gets `AVDiracSeqHeader.color_spec_index` value.
|
||||
// GetColorSpecIndex gets `AVDiracSeqHeader.color_spec_index` value.
|
||||
func (dsh *AVDiracSeqHeader) GetColorSpecIndex() uint8 {
|
||||
return (uint8)(dsh.color_spec_index)
|
||||
}
|
||||
|
||||
// Custom: SetColorSpecIndex sets `AVDiracSeqHeader.color_spec_index` value.
|
||||
// SetColorSpecIndex sets `AVDiracSeqHeader.color_spec_index` value.
|
||||
func (dsh *AVDiracSeqHeader) SetColorSpecIndex(v uint8) {
|
||||
dsh.color_spec_index = (C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetColorSpecIndexAddr gets `AVDiracSeqHeader.color_spec_index` address.
|
||||
// GetColorSpecIndexAddr gets `AVDiracSeqHeader.color_spec_index` address.
|
||||
func (dsh *AVDiracSeqHeader) GetColorSpecIndexAddr() *uint8 {
|
||||
return (*uint8)(&dsh.color_spec_index)
|
||||
}
|
||||
|
||||
// Custom: GetProfile gets `AVDiracSeqHeader.profile` value.
|
||||
// GetProfile gets `AVDiracSeqHeader.profile` value.
|
||||
func (dsh *AVDiracSeqHeader) GetProfile() int32 {
|
||||
return (int32)(dsh.profile)
|
||||
}
|
||||
|
||||
// Custom: SetProfile sets `AVDiracSeqHeader.profile` value.
|
||||
// SetProfile sets `AVDiracSeqHeader.profile` value.
|
||||
func (dsh *AVDiracSeqHeader) SetProfile(v int32) {
|
||||
dsh.profile = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetProfileAddr gets `AVDiracSeqHeader.profile` address.
|
||||
// GetProfileAddr gets `AVDiracSeqHeader.profile` address.
|
||||
func (dsh *AVDiracSeqHeader) GetProfileAddr() *int32 {
|
||||
return (*int32)(&dsh.profile)
|
||||
}
|
||||
|
||||
// Custom: GetLevel gets `AVDiracSeqHeader.level` value.
|
||||
// GetLevel gets `AVDiracSeqHeader.level` value.
|
||||
func (dsh *AVDiracSeqHeader) GetLevel() int32 {
|
||||
return (int32)(dsh.level)
|
||||
}
|
||||
|
||||
// Custom: SetLevel sets `AVDiracSeqHeader.level` value.
|
||||
// SetLevel sets `AVDiracSeqHeader.level` value.
|
||||
func (dsh *AVDiracSeqHeader) SetLevel(v int32) {
|
||||
dsh.level = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetLevelAddr gets `AVDiracSeqHeader.level` address.
|
||||
// GetLevelAddr gets `AVDiracSeqHeader.level` address.
|
||||
func (dsh *AVDiracSeqHeader) GetLevelAddr() *int32 {
|
||||
return (*int32)(&dsh.level)
|
||||
}
|
||||
|
||||
// Custom: GetFramerate gets `AVDiracSeqHeader.framerate` value.
|
||||
// GetFramerate gets `AVDiracSeqHeader.framerate` value.
|
||||
func (dsh *AVDiracSeqHeader) GetFramerate() AVRational {
|
||||
return (AVRational)(dsh.framerate)
|
||||
}
|
||||
|
||||
// Custom: SetFramerate sets `AVDiracSeqHeader.framerate` value.
|
||||
// SetFramerate sets `AVDiracSeqHeader.framerate` value.
|
||||
func (dsh *AVDiracSeqHeader) SetFramerate(v AVRational) {
|
||||
dsh.framerate = (C.struct_AVRational)(v)
|
||||
}
|
||||
|
||||
// Custom: GetFramerateAddr gets `AVDiracSeqHeader.framerate` address.
|
||||
// GetFramerateAddr gets `AVDiracSeqHeader.framerate` address.
|
||||
func (dsh *AVDiracSeqHeader) GetFramerateAddr() *AVRational {
|
||||
return (*AVRational)(&dsh.framerate)
|
||||
}
|
||||
|
||||
// Custom: GetSampleAspectRatio gets `AVDiracSeqHeader.sample_aspect_ratio` value.
|
||||
// GetSampleAspectRatio gets `AVDiracSeqHeader.sample_aspect_ratio` value.
|
||||
func (dsh *AVDiracSeqHeader) GetSampleAspectRatio() AVRational {
|
||||
return (AVRational)(dsh.sample_aspect_ratio)
|
||||
}
|
||||
|
||||
// Custom: SetSampleAspectRatio sets `AVDiracSeqHeader.sample_aspect_ratio` value.
|
||||
// SetSampleAspectRatio sets `AVDiracSeqHeader.sample_aspect_ratio` value.
|
||||
func (dsh *AVDiracSeqHeader) SetSampleAspectRatio(v AVRational) {
|
||||
dsh.sample_aspect_ratio = (C.struct_AVRational)(v)
|
||||
}
|
||||
|
||||
// Custom: GetSampleAspectRatioAddr gets `AVDiracSeqHeader.sample_aspect_ratio` address.
|
||||
// GetSampleAspectRatioAddr gets `AVDiracSeqHeader.sample_aspect_ratio` address.
|
||||
func (dsh *AVDiracSeqHeader) GetSampleAspectRatioAddr() *AVRational {
|
||||
return (*AVRational)(&dsh.sample_aspect_ratio)
|
||||
}
|
||||
|
||||
// Custom: GetPixFmt gets `AVDiracSeqHeader.pix_fmt` value.
|
||||
// GetPixFmt gets `AVDiracSeqHeader.pix_fmt` value.
|
||||
func (dsh *AVDiracSeqHeader) GetPixFmt() AVPixelFormat {
|
||||
return (AVPixelFormat)(dsh.pix_fmt)
|
||||
}
|
||||
|
||||
// Custom: SetPixFmt sets `AVDiracSeqHeader.pix_fmt` value.
|
||||
// SetPixFmt sets `AVDiracSeqHeader.pix_fmt` value.
|
||||
func (dsh *AVDiracSeqHeader) SetPixFmt(v AVPixelFormat) {
|
||||
dsh.pix_fmt = (C.enum_AVPixelFormat)(v)
|
||||
}
|
||||
|
||||
// Custom: GetPixFmtAddr gets `AVDiracSeqHeader.pix_fmt` address.
|
||||
// GetPixFmtAddr gets `AVDiracSeqHeader.pix_fmt` address.
|
||||
func (dsh *AVDiracSeqHeader) GetPixFmtAddr() *AVPixelFormat {
|
||||
return (*AVPixelFormat)(&dsh.pix_fmt)
|
||||
}
|
||||
|
||||
// Custom: GetColorRange gets `AVDiracSeqHeader.colorrange` value.
|
||||
// GetColorRange gets `AVDiracSeqHeader.colorrange` value.
|
||||
func (dsh *AVDiracSeqHeader) GetColorRange() AVColorRange {
|
||||
return (AVColorRange)(dsh.color_range)
|
||||
}
|
||||
|
||||
// Custom: SetColorRange sets `AVDiracSeqHeader.colorrange` value.
|
||||
// SetColorRange sets `AVDiracSeqHeader.colorrange` value.
|
||||
func (dsh *AVDiracSeqHeader) SetColorRange(v AVColorRange) {
|
||||
dsh.color_range = (C.enum_AVColorRange)(v)
|
||||
}
|
||||
|
||||
// Custom: GetColorRangeAddr gets `AVDiracSeqHeader.colorrange` address.
|
||||
// GetColorRangeAddr gets `AVDiracSeqHeader.colorrange` address.
|
||||
func (dsh *AVDiracSeqHeader) GetColorRangeAddr() *AVColorRange {
|
||||
return (*AVColorRange)(&dsh.color_range)
|
||||
}
|
||||
|
||||
// Custom: GetColorPrimaries gets `AVDiracSeqHeader.color_primaries` value.
|
||||
// GetColorPrimaries gets `AVDiracSeqHeader.color_primaries` value.
|
||||
func (dsh *AVDiracSeqHeader) GetColorPrimaries() AVColorPrimaries {
|
||||
return (AVColorPrimaries)(dsh.color_primaries)
|
||||
}
|
||||
|
||||
// Custom: SetColorPrimaries sets `AVDiracSeqHeader.color_primaries` value.
|
||||
// SetColorPrimaries sets `AVDiracSeqHeader.color_primaries` value.
|
||||
func (dsh *AVDiracSeqHeader) SetColorPrimaries(v AVColorPrimaries) {
|
||||
dsh.color_primaries = (C.enum_AVColorPrimaries)(v)
|
||||
}
|
||||
|
||||
// Custom: GetColorPrimariesAddr gets `AVDiracSeqHeader.color_primaries` address.
|
||||
// GetColorPrimariesAddr gets `AVDiracSeqHeader.color_primaries` address.
|
||||
func (dsh *AVDiracSeqHeader) GetColorPrimariesAddr() *AVColorPrimaries {
|
||||
return (*AVColorPrimaries)(&dsh.color_primaries)
|
||||
}
|
||||
|
||||
// Custom: GetColorTrc gets `AVDiracSeqHeader.color_trc` value.
|
||||
// GetColorTrc gets `AVDiracSeqHeader.color_trc` value.
|
||||
func (dsh *AVDiracSeqHeader) GetColorTrc() AVColorTransferCharacteristic {
|
||||
return (AVColorTransferCharacteristic)(dsh.color_trc)
|
||||
}
|
||||
|
||||
// Custom: SetColorTrc sets `AVDiracSeqHeader.color_trc` value.
|
||||
// SetColorTrc sets `AVDiracSeqHeader.color_trc` value.
|
||||
func (dsh *AVDiracSeqHeader) SetColorTrc(v AVColorTransferCharacteristic) {
|
||||
dsh.color_trc = (C.enum_AVColorTransferCharacteristic)(v)
|
||||
}
|
||||
|
||||
// Custom: GetColorTrcAddr gets `AVDiracSeqHeader.color_trc` address.
|
||||
// GetColorTrcAddr gets `AVDiracSeqHeader.color_trc` address.
|
||||
func (dsh *AVDiracSeqHeader) GetColorTrcAddr() *AVColorTransferCharacteristic {
|
||||
return (*AVColorTransferCharacteristic)(&dsh.color_trc)
|
||||
}
|
||||
|
||||
// Custom: GetColorspace gets `AVDiracSeqHeader.colorspace` value.
|
||||
// GetColorspace gets `AVDiracSeqHeader.colorspace` value.
|
||||
func (dsh *AVDiracSeqHeader) GetColorspace() AVColorSpace {
|
||||
return (AVColorSpace)(dsh.colorspace)
|
||||
}
|
||||
|
||||
// Custom: SetColorspace sets `AVDiracSeqHeader.colorspace` value.
|
||||
// SetColorspace sets `AVDiracSeqHeader.colorspace` value.
|
||||
func (dsh *AVDiracSeqHeader) SetColorspace(v AVColorSpace) {
|
||||
dsh.colorspace = (C.enum_AVColorSpace)(v)
|
||||
}
|
||||
|
||||
// Custom: GetColorspaceAddr gets `AVDiracSeqHeader.colorspace` address.
|
||||
// GetColorspaceAddr gets `AVDiracSeqHeader.colorspace` address.
|
||||
func (dsh *AVDiracSeqHeader) GetColorspaceAddr() *AVColorSpace {
|
||||
return (*AVColorSpace)(&dsh.colorspace)
|
||||
}
|
||||
|
||||
// Custom: GetVersion gets `AVDiracSeqHeader.version` value.
|
||||
// GetVersion gets `AVDiracSeqHeader.version` value.
|
||||
func (dsh *AVDiracSeqHeader) GetVersion() DiracVersionInfo {
|
||||
return (DiracVersionInfo)(dsh.version)
|
||||
}
|
||||
|
||||
// Custom: SetVersion sets `AVDiracSeqHeader.version` value.
|
||||
// SetVersion sets `AVDiracSeqHeader.version` value.
|
||||
func (dsh *AVDiracSeqHeader) SetVersion(v DiracVersionInfo) {
|
||||
dsh.version = (C.struct_DiracVersionInfo)(v)
|
||||
}
|
||||
|
||||
// Custom: GetVersionAddr gets `AVDiracSeqHeader.version` address.
|
||||
// GetVersionAddr gets `AVDiracSeqHeader.version` address.
|
||||
func (dsh *AVDiracSeqHeader) GetVersionAddr() *DiracVersionInfo {
|
||||
return (*DiracVersionInfo)(&dsh.version)
|
||||
}
|
||||
|
||||
// Custom: GetBitDepth gets `AVDiracSeqHeader.bit_depth` value.
|
||||
// GetBitDepth gets `AVDiracSeqHeader.bit_depth` value.
|
||||
func (dsh *AVDiracSeqHeader) GetBitDepth() int32 {
|
||||
return (int32)(dsh.bit_depth)
|
||||
}
|
||||
|
||||
// Custom: SetBitDepth sets `AVDiracSeqHeader.bit_depth` value.
|
||||
// SetBitDepth sets `AVDiracSeqHeader.bit_depth` value.
|
||||
func (dsh *AVDiracSeqHeader) SetBitDepth(v int32) {
|
||||
dsh.bit_depth = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetBitDepthAddr gets `AVDiracSeqHeader.bit_depth` address.
|
||||
// GetBitDepthAddr gets `AVDiracSeqHeader.bit_depth` address.
|
||||
func (dsh *AVDiracSeqHeader) GetBitDepthAddr() *int32 {
|
||||
return (*int32)(&dsh.bit_depth)
|
||||
}
|
||||
|
@@ -13,265 +13,265 @@ const (
|
||||
// AVDVProfile
|
||||
type AVDVProfile C.struct_AVDVProfile
|
||||
|
||||
// Custom: GetDsf gets `AVDVProfile.dsf` value.
|
||||
// GetDsf gets `AVDVProfile.dsf` value.
|
||||
func (dvp *AVDVProfile) GetDsf() int32 {
|
||||
return (int32)(dvp.dsf)
|
||||
}
|
||||
|
||||
// Custom: SetDsf sets `AVDVProfile.dsf` value.
|
||||
// SetDsf sets `AVDVProfile.dsf` value.
|
||||
func (dvp *AVDVProfile) SetDsf(v int32) {
|
||||
dvp.dsf = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetDsfAddr gets `AVDVProfile.dsf` address.
|
||||
// GetDsfAddr gets `AVDVProfile.dsf` address.
|
||||
func (dvp *AVDVProfile) GetDsfAddr() *int32 {
|
||||
return (*int32)(&dvp.dsf)
|
||||
}
|
||||
|
||||
// Custom: GetVideoStype gets `AVDVProfile.video_stype` value.
|
||||
// GetVideoStype gets `AVDVProfile.video_stype` value.
|
||||
func (dvp *AVDVProfile) GetVideoStype() int32 {
|
||||
return (int32)(dvp.video_stype)
|
||||
}
|
||||
|
||||
// Custom: SetVideoStype sets `AVDVProfile.video_stype` value.
|
||||
// SetVideoStype sets `AVDVProfile.video_stype` value.
|
||||
func (dvp *AVDVProfile) SetVideoStype(v int32) {
|
||||
dvp.video_stype = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetVideoStypeAddr gets `AVDVProfile.video_stype` address.
|
||||
// GetVideoStypeAddr gets `AVDVProfile.video_stype` address.
|
||||
func (dvp *AVDVProfile) GetVideoStypeAddr() *int32 {
|
||||
return (*int32)(&dvp.video_stype)
|
||||
}
|
||||
|
||||
// Custom: GetFrameSize gets `AVDVProfile.frame_size` value.
|
||||
// GetFrameSize gets `AVDVProfile.frame_size` value.
|
||||
func (dvp *AVDVProfile) GetFrameSize() int32 {
|
||||
return (int32)(dvp.frame_size)
|
||||
}
|
||||
|
||||
// Custom: SetFrameSize sets `AVDVProfile.frame_size` value.
|
||||
// SetFrameSize sets `AVDVProfile.frame_size` value.
|
||||
func (dvp *AVDVProfile) SetFrameSize(v int32) {
|
||||
dvp.frame_size = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetFrameSizeAddr gets `AVDVProfile.frame_size` address.
|
||||
// GetFrameSizeAddr gets `AVDVProfile.frame_size` address.
|
||||
func (dvp *AVDVProfile) GetFrameSizeAddr() *int32 {
|
||||
return (*int32)(&dvp.frame_size)
|
||||
}
|
||||
|
||||
// Custom: GetDifsegSize gets `AVDVProfile.difseg_size` value.
|
||||
// GetDifsegSize gets `AVDVProfile.difseg_size` value.
|
||||
func (dvp *AVDVProfile) GetDifsegSize() int32 {
|
||||
return (int32)(dvp.difseg_size)
|
||||
}
|
||||
|
||||
// Custom: SetDifsegSize sets `AVDVProfile.difseg_size` value.
|
||||
// SetDifsegSize sets `AVDVProfile.difseg_size` value.
|
||||
func (dvp *AVDVProfile) SetDifsegSize(v int32) {
|
||||
dvp.difseg_size = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetDifsegSizeAddr gets `AVDVProfile.difseg_size` address.
|
||||
// GetDifsegSizeAddr gets `AVDVProfile.difseg_size` address.
|
||||
func (dvp *AVDVProfile) GetDifsegSizeAddr() *int32 {
|
||||
return (*int32)(&dvp.difseg_size)
|
||||
}
|
||||
|
||||
// Custom: GetNDifchan gets `AVDVProfile.n_difchan` value.
|
||||
// GetNDifchan gets `AVDVProfile.n_difchan` value.
|
||||
func (dvp *AVDVProfile) GetNDifchan() int32 {
|
||||
return (int32)(dvp.n_difchan)
|
||||
}
|
||||
|
||||
// Custom: SetNDifchan sets `AVDVProfile.n_difchan` value.
|
||||
// SetNDifchan sets `AVDVProfile.n_difchan` value.
|
||||
func (dvp *AVDVProfile) SetNDifchan(v int32) {
|
||||
dvp.n_difchan = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetNDifchanAddr gets `AVDVProfile.n_difchan` address.
|
||||
// GetNDifchanAddr gets `AVDVProfile.n_difchan` address.
|
||||
func (dvp *AVDVProfile) GetNDifchanAddr() *int32 {
|
||||
return (*int32)(&dvp.n_difchan)
|
||||
}
|
||||
|
||||
// Custom: GetTimeBase gets `AVDVProfile.time_base` value.
|
||||
// GetTimeBase gets `AVDVProfile.time_base` value.
|
||||
func (dvp *AVDVProfile) GetTimeBase() AVRational {
|
||||
return (AVRational)(dvp.time_base)
|
||||
}
|
||||
|
||||
// Custom: SetTimeBase sets `AVDVProfile.time_base` value.
|
||||
// SetTimeBase sets `AVDVProfile.time_base` value.
|
||||
func (dvp *AVDVProfile) SetTimeBase(v AVRational) {
|
||||
dvp.time_base = (C.struct_AVRational)(v)
|
||||
}
|
||||
|
||||
// Custom: GetTimeBaseAddr gets `AVDVProfile.time_base` address.
|
||||
// GetTimeBaseAddr gets `AVDVProfile.time_base` address.
|
||||
func (dvp *AVDVProfile) GetTimeBaseAddr() *AVRational {
|
||||
return (*AVRational)(&dvp.time_base)
|
||||
}
|
||||
|
||||
// Custom: GetLtcDivisor gets `AVDVProfile.ltc_divisor` value.
|
||||
// GetLtcDivisor gets `AVDVProfile.ltc_divisor` value.
|
||||
func (dvp *AVDVProfile) GetLtcDivisor() int32 {
|
||||
return (int32)(dvp.ltc_divisor)
|
||||
}
|
||||
|
||||
// Custom: SetLtcDivisor sets `AVDVProfile.ltc_divisor` value.
|
||||
// SetLtcDivisor sets `AVDVProfile.ltc_divisor` value.
|
||||
func (dvp *AVDVProfile) SetLtcDivisor(v int32) {
|
||||
dvp.ltc_divisor = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetLtcDivisorAddr gets `AVDVProfile.ltc_divisor` address.
|
||||
// GetLtcDivisorAddr gets `AVDVProfile.ltc_divisor` address.
|
||||
func (dvp *AVDVProfile) GetLtcDivisorAddr() *int32 {
|
||||
return (*int32)(&dvp.ltc_divisor)
|
||||
}
|
||||
|
||||
// Custom: GetHeight gets `AVDVProfile.height` value.
|
||||
// GetHeight gets `AVDVProfile.height` value.
|
||||
func (dvp *AVDVProfile) GetHeight() int32 {
|
||||
return (int32)(dvp.height)
|
||||
}
|
||||
|
||||
// Custom: SetHeight sets `AVDVProfile.height` value.
|
||||
// SetHeight sets `AVDVProfile.height` value.
|
||||
func (dvp *AVDVProfile) SetHeight(v int32) {
|
||||
dvp.height = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetHeightAddr gets `AVDVProfile.height` address.
|
||||
// GetHeightAddr gets `AVDVProfile.height` address.
|
||||
func (dvp *AVDVProfile) GetHeightAddr() *int32 {
|
||||
return (*int32)(&dvp.height)
|
||||
}
|
||||
|
||||
// Custom: GetWidth gets `AVDVProfile.width` value.
|
||||
// GetWidth gets `AVDVProfile.width` value.
|
||||
func (dvp *AVDVProfile) GetWidth() int32 {
|
||||
return (int32)(dvp.width)
|
||||
}
|
||||
|
||||
// Custom: SetWidth sets `AVDVProfile.width` value.
|
||||
// SetWidth sets `AVDVProfile.width` value.
|
||||
func (dvp *AVDVProfile) SetWidth(v int32) {
|
||||
dvp.width = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetWidthAddr gets `AVDVProfile.width` address.
|
||||
// GetWidthAddr gets `AVDVProfile.width` address.
|
||||
func (dvp *AVDVProfile) GetWidthAddr() *int32 {
|
||||
return (*int32)(&dvp.width)
|
||||
}
|
||||
|
||||
// Custom: GetSar gets `AVDVProfile.sar` value.
|
||||
// GetSar gets `AVDVProfile.sar` value.
|
||||
func (dvp *AVDVProfile) GetSar() []AVRational {
|
||||
return unsafe.Slice((*AVRational)(&dvp.sar[0]), 2)
|
||||
}
|
||||
|
||||
// Custom: SetSar sets `AVDVProfile.sar` value.
|
||||
// SetSar sets `AVDVProfile.sar` value.
|
||||
func (dvp *AVDVProfile) SetSar(v []AVRational) {
|
||||
for i := 0; i < FFMIN(len(v), 2); i++ {
|
||||
dvp.sar[i] = (C.struct_AVRational)(v[i])
|
||||
}
|
||||
}
|
||||
|
||||
// Custom: GetSarAddr gets `AVDVProfile.sar` address.
|
||||
// GetSarAddr gets `AVDVProfile.sar` address.
|
||||
func (dvp *AVDVProfile) GetSarAddr() **AVRational {
|
||||
return (**AVRational)(unsafe.Pointer(&dvp.sar))
|
||||
}
|
||||
|
||||
// Custom: GetPixFmt gets `AVDVProfile.pix_fmt` value.
|
||||
// GetPixFmt gets `AVDVProfile.pix_fmt` value.
|
||||
func (dvp *AVDVProfile) GetPixFmt() AVPixelFormat {
|
||||
return (AVPixelFormat)(dvp.pix_fmt)
|
||||
}
|
||||
|
||||
// Custom: SetPixFmt sets `AVDVProfile.pix_fmt` value.
|
||||
// SetPixFmt sets `AVDVProfile.pix_fmt` value.
|
||||
func (dvp *AVDVProfile) SetPixFmt(v AVPixelFormat) {
|
||||
dvp.pix_fmt = (C.enum_AVPixelFormat)(v)
|
||||
}
|
||||
|
||||
// Custom: GetPixFmtAddr gets `AVDVProfile.pix_fmt` address.
|
||||
// GetPixFmtAddr gets `AVDVProfile.pix_fmt` address.
|
||||
func (dvp *AVDVProfile) GetPixFmtAddr() *AVPixelFormat {
|
||||
return (*AVPixelFormat)(&dvp.pix_fmt)
|
||||
}
|
||||
|
||||
// Custom: GetBpm gets `AVDVProfile.bpm` value.
|
||||
// GetBpm gets `AVDVProfile.bpm` value.
|
||||
func (dvp *AVDVProfile) GetBpm() int32 {
|
||||
return (int32)(dvp.bpm)
|
||||
}
|
||||
|
||||
// Custom: SetBpm sets `AVDVProfile.bpm` value.
|
||||
// SetBpm sets `AVDVProfile.bpm` value.
|
||||
func (dvp *AVDVProfile) SetBpm(v int32) {
|
||||
dvp.bpm = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetBpmAddr gets `AVDVProfile.bpm` address.
|
||||
// GetBpmAddr gets `AVDVProfile.bpm` address.
|
||||
func (dvp *AVDVProfile) GetBpmAddr() *int32 {
|
||||
return (*int32)(&dvp.bpm)
|
||||
}
|
||||
|
||||
// Custom: GetBlockSizes gets `AVDVProfile.block_sizes` value.
|
||||
// GetBlockSizes gets `AVDVProfile.block_sizes` value.
|
||||
func (dvp *AVDVProfile) GetBlockSizes() *uint8 {
|
||||
return (*uint8)(dvp.block_sizes)
|
||||
}
|
||||
|
||||
// Custom: SetBlockSizes sets `AVDVProfile.block_sizes` value.
|
||||
// SetBlockSizes sets `AVDVProfile.block_sizes` value.
|
||||
func (dvp *AVDVProfile) SetBlockSizes(v *uint8) {
|
||||
dvp.block_sizes = (*C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetBlockSizesAddr gets `AVDVProfile.block_sizes` address.
|
||||
// GetBlockSizesAddr gets `AVDVProfile.block_sizes` address.
|
||||
func (dvp *AVDVProfile) GetBlockSizesAddr() **uint8 {
|
||||
return (**uint8)(unsafe.Pointer(&dvp.block_sizes))
|
||||
}
|
||||
|
||||
// Custom: GetAudioStride gets `AVDVProfile.audio_stride` value.
|
||||
// GetAudioStride gets `AVDVProfile.audio_stride` value.
|
||||
func (dvp *AVDVProfile) GetAudioStride() int32 {
|
||||
return (int32)(dvp.audio_stride)
|
||||
}
|
||||
|
||||
// Custom: SetAudioStride sets `AVDVProfile.audio_stride` value.
|
||||
// SetAudioStride sets `AVDVProfile.audio_stride` value.
|
||||
func (dvp *AVDVProfile) SetAudioStride(v int32) {
|
||||
dvp.audio_stride = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetAudioStrideAddr gets `AVDVProfile.audio_stride` address.
|
||||
// GetAudioStrideAddr gets `AVDVProfile.audio_stride` address.
|
||||
func (dvp *AVDVProfile) GetAudioStrideAddr() *int32 {
|
||||
return (*int32)(&dvp.audio_stride)
|
||||
}
|
||||
|
||||
// Custom: GetAudioMinSamples gets `AVDVProfile.audio_min_samples` value.
|
||||
// GetAudioMinSamples gets `AVDVProfile.audio_min_samples` value.
|
||||
func (dvp *AVDVProfile) GetAudioMinSamples() []int32 {
|
||||
return unsafe.Slice((*int32)(&dvp.audio_min_samples[0]), 3)
|
||||
}
|
||||
|
||||
// Custom: SetAudioMinSamples sets `AVDVProfile.audio_min_samples` value.
|
||||
// SetAudioMinSamples sets `AVDVProfile.audio_min_samples` value.
|
||||
func (dvp *AVDVProfile) SetAudioMinSamples(v []int32) {
|
||||
for i := 0; i < FFMIN(len(v), 3); i++ {
|
||||
dvp.audio_min_samples[i] = (C.int)(v[i])
|
||||
}
|
||||
}
|
||||
|
||||
// Custom: GetAudioMinSamplesAddr gets `AVDVProfile.audio_min_samples` address.
|
||||
// GetAudioMinSamplesAddr gets `AVDVProfile.audio_min_samples` address.
|
||||
func (dvp *AVDVProfile) GetAudioMinSamplesAddr() **int32 {
|
||||
return (**int32)(unsafe.Pointer(&dvp.audio_min_samples))
|
||||
}
|
||||
|
||||
// Custom: GetAudioSamplesDist gets `AVDVProfile.audio_samples_dist` value.
|
||||
// GetAudioSamplesDist gets `AVDVProfile.audio_samples_dist` value.
|
||||
func (dvp *AVDVProfile) GetAudioSamplesDist() []int32 {
|
||||
return unsafe.Slice((*int32)(&dvp.audio_samples_dist[0]), 5)
|
||||
}
|
||||
|
||||
// Custom: SetAudioSamplesDist sets `AVDVProfile.audio_samples_dist` value.
|
||||
// SetAudioSamplesDist sets `AVDVProfile.audio_samples_dist` value.
|
||||
func (dvp *AVDVProfile) SetAudioSamplesDist(v []int32) {
|
||||
for i := 0; i < FFMIN(len(v), 5); i++ {
|
||||
dvp.audio_samples_dist[i] = (C.int)(v[i])
|
||||
}
|
||||
}
|
||||
|
||||
// Custom: GetAudioSamplesDistAddr gets `AVDVProfile.audio_samples_dist` address.
|
||||
// GetAudioSamplesDistAddr gets `AVDVProfile.audio_samples_dist` address.
|
||||
func (dvp *AVDVProfile) GetAudioSamplesDistAddr() **int32 {
|
||||
return (**int32)(unsafe.Pointer(&dvp.audio_samples_dist))
|
||||
}
|
||||
|
||||
// Custom: GetAudioShuffle gets `AVDVProfile.audio_shuffle` value.
|
||||
// GetAudioShuffle gets `AVDVProfile.audio_shuffle` value.
|
||||
func (dvp *AVDVProfile) GetAudioShuffle() []uint8 {
|
||||
return unsafe.Slice((*uint8)(&dvp.audio_shuffle[0]), 9)
|
||||
}
|
||||
|
||||
// Custom: SetAudioShuffle sets `AVDVProfile.audio_shuffle` value.
|
||||
// SetAudioShuffle sets `AVDVProfile.audio_shuffle` value.
|
||||
func (dvp *AVDVProfile) SetAudioShuffle(v []uint8) {
|
||||
for i := 0; i < FFMIN(len(v), 9); i++ {
|
||||
dvp.audio_shuffle[i] = (C.uint8_t)(v[i])
|
||||
}
|
||||
}
|
||||
|
||||
// Custom: GetAudioShuffleAddr gets `AVDVProfile.audio_shuffle` address.
|
||||
// GetAudioShuffleAddr gets `AVDVProfile.audio_shuffle` address.
|
||||
func (dvp *AVDVProfile) GetAudioShuffleAddr() **uint8 {
|
||||
return (**uint8)(unsafe.Pointer(&dvp.audio_shuffle))
|
||||
}
|
||||
|
@@ -45,54 +45,54 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
// Deprecated: No use
|
||||
// Deprecated: No use.
|
||||
AV_PKT_DATA_QUALITY_FACTOR = AVPacketSideDataType(C.AV_PKT_DATA_QUALITY_FACTOR)
|
||||
)
|
||||
|
||||
// AVPacketSideData
|
||||
type AVPacketSideData C.struct_AVPacketSideData
|
||||
|
||||
// Custom: GetData gets `AVPacketSideData.data` value.
|
||||
// GetData gets `AVPacketSideData.data` value.
|
||||
func (psd *AVPacketSideData) GetData() *uint8 {
|
||||
return (*uint8)(psd.data)
|
||||
}
|
||||
|
||||
// Custom: SetData sets `AVPacketSideData.data` value.
|
||||
// SetData sets `AVPacketSideData.data` value.
|
||||
func (psd *AVPacketSideData) SetData(v *uint8) {
|
||||
psd.data = (*C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetDataAddr gets `AVPacketSideData.data` address.
|
||||
// GetDataAddr gets `AVPacketSideData.data` address.
|
||||
func (psd *AVPacketSideData) GetDataAddr() **uint8 {
|
||||
return (**uint8)(unsafe.Pointer(&psd.data))
|
||||
}
|
||||
|
||||
// Custom: GetSize gets `AVPacketSideData.size` value.
|
||||
// GetSize gets `AVPacketSideData.size` value.
|
||||
func (psd *AVPacketSideData) GetSize() int32 {
|
||||
return (int32)(psd.size)
|
||||
}
|
||||
|
||||
// Custom: SetSize sets `AVPacketSideData.size` value.
|
||||
// SetSize sets `AVPacketSideData.size` value.
|
||||
func (psd *AVPacketSideData) SetSize(v int32) {
|
||||
psd.size = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetSizeAddr gets `AVPacketSideData.size` address.
|
||||
// GetSizeAddr gets `AVPacketSideData.size` address.
|
||||
func (psd *AVPacketSideData) GetSizeAddr() *int32 {
|
||||
return (*int32)(&psd.size)
|
||||
}
|
||||
|
||||
// Custom: GetType gets `AVPacketSideData.type` value.
|
||||
// GetType gets `AVPacketSideData.type` value.
|
||||
func (psd *AVPacketSideData) GetType() AVPacketSideDataType {
|
||||
return (AVPacketSideDataType)(psd._type)
|
||||
}
|
||||
|
||||
// Custom: SetType sets `AVPacketSideData.type` value.
|
||||
// SetType sets `AVPacketSideData.type` value.
|
||||
func (psd *AVPacketSideData) SetType(v AVPacketSideDataType) {
|
||||
psd._type = (C.enum_AVPacketSideDataType)(v)
|
||||
}
|
||||
|
||||
// Custom: GetTypeAddr gets `AVPacketSideData.type` address.
|
||||
// GetTypeAddr gets `AVPacketSideData.type` address.
|
||||
func (psd *AVPacketSideData) GetTypeAddr() *AVPacketSideDataType {
|
||||
return (*AVPacketSideDataType)(&psd._type)
|
||||
}
|
||||
@@ -100,200 +100,208 @@ func (psd *AVPacketSideData) GetTypeAddr() *AVPacketSideDataType {
|
||||
// AVPacket
|
||||
type AVPacket C.struct_AVPacket
|
||||
|
||||
// Custom: GetBuf gets `AVPacket.buf` value.
|
||||
// GetBuf gets `AVPacket.buf` value.
|
||||
func (pkt *AVPacket) GetBuf() *AVBufferRef {
|
||||
return (*AVBufferRef)(pkt.buf)
|
||||
}
|
||||
|
||||
// Custom: SetBuf sets `AVPacket.buf` value.
|
||||
// SetBuf sets `AVPacket.buf` value.
|
||||
func (pkt *AVPacket) SetBuf(v *AVBufferRef) {
|
||||
pkt.buf = (*C.struct_AVBufferRef)(v)
|
||||
}
|
||||
|
||||
// Custom: GetBufAddr gets `AVPacket.buf` address.
|
||||
// GetBufAddr gets `AVPacket.buf` address.
|
||||
func (pkt *AVPacket) GetBufAddr() **AVBufferRef {
|
||||
return (**AVBufferRef)(unsafe.Pointer(&pkt.buf))
|
||||
}
|
||||
|
||||
// Custom: GetPts gets `AVPacket.pts` value.
|
||||
// GetPts gets `AVPacket.pts` value.
|
||||
func (pkt *AVPacket) GetPts() int64 {
|
||||
return (int64)(pkt.pts)
|
||||
}
|
||||
|
||||
// Custom: SetPts sets `AVPacket.pts` value.
|
||||
// SetPts sets `AVPacket.pts` value.
|
||||
func (pkt *AVPacket) SetPts(v int64) {
|
||||
pkt.pts = (C.int64_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetPtsAddr gets `AVPacket.pts` address.
|
||||
// GetPtsAddr gets `AVPacket.pts` address.
|
||||
func (pkt *AVPacket) GetPtsAddr() *int64 {
|
||||
return (*int64)(&pkt.pts)
|
||||
}
|
||||
|
||||
// Custom: GetDts gets `AVPacket.dts` value.
|
||||
// GetDts gets `AVPacket.dts` value.
|
||||
func (pkt *AVPacket) GetDts() int64 {
|
||||
return (int64)(pkt.dts)
|
||||
}
|
||||
|
||||
// Custom: SetDts sets `AVPacket.dts` value.
|
||||
// SetDts sets `AVPacket.dts` value.
|
||||
func (pkt *AVPacket) SetDts(v int64) {
|
||||
pkt.dts = (C.int64_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetDtsAddr gets `AVPacket.dts` address.
|
||||
// GetDtsAddr gets `AVPacket.dts` address.
|
||||
func (pkt *AVPacket) GetDtsAddr() *int64 {
|
||||
return (*int64)(&pkt.dts)
|
||||
}
|
||||
|
||||
// Custom: GetData gets `AVPacket.data` value.
|
||||
// GetData gets `AVPacket.data` value.
|
||||
func (pkt *AVPacket) GetData() *uint8 {
|
||||
return (*uint8)(pkt.data)
|
||||
}
|
||||
|
||||
// Custom: SetData sets `AVPacket.data` value.
|
||||
// SetData sets `AVPacket.data` value.
|
||||
func (pkt *AVPacket) SetData(v *uint8) {
|
||||
pkt.data = (*C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetDataAddr gets `AVPacket.data` address.
|
||||
// GetDataAddr gets `AVPacket.data` address.
|
||||
func (pkt *AVPacket) GetDataAddr() **uint8 {
|
||||
return (**uint8)(unsafe.Pointer(&pkt.data))
|
||||
}
|
||||
|
||||
// Custom: GetSize gets `AVPacket.size` value.
|
||||
// GetSize gets `AVPacket.size` value.
|
||||
func (pkt *AVPacket) GetSize() int32 {
|
||||
return (int32)(pkt.size)
|
||||
}
|
||||
|
||||
// Custom: SetSize sets `AVPacket.size` value.
|
||||
// SetSize sets `AVPacket.size` value.
|
||||
func (pkt *AVPacket) SetSize(v int32) {
|
||||
pkt.size = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetSizeAddr gets `AVPacket.size` address.
|
||||
// GetSizeAddr gets `AVPacket.size` address.
|
||||
func (pkt *AVPacket) GetSizeAddr() *int32 {
|
||||
return (*int32)(&pkt.size)
|
||||
}
|
||||
|
||||
// Custom: GetStreamIndex gets `AVPacket.stream_index` value.
|
||||
// GetStreamIndex gets `AVPacket.stream_index` value.
|
||||
func (pkt *AVPacket) GetStreamIndex() int32 {
|
||||
return (int32)(pkt.stream_index)
|
||||
}
|
||||
|
||||
// Custom: SetStreamIndex sets `AVPacket.stream_index` value.
|
||||
// SetStreamIndex sets `AVPacket.stream_index` value.
|
||||
func (pkt *AVPacket) SetStreamIndex(v int32) {
|
||||
pkt.stream_index = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetStreamIndexAddr gets `AVPacket.stream_index` address.
|
||||
// GetStreamIndexAddr gets `AVPacket.stream_index` address.
|
||||
func (pkt *AVPacket) GetStreamIndexAddr() *int32 {
|
||||
return (*int32)(&pkt.stream_index)
|
||||
}
|
||||
|
||||
// Custom: GetFlags gets `AVPacket.flags` value.
|
||||
// GetFlags gets `AVPacket.flags` value.
|
||||
func (pkt *AVPacket) GetFlags() int32 {
|
||||
return (int32)(pkt.flags)
|
||||
}
|
||||
|
||||
// Custom: SetFlags sets `AVPacket.flags` value.
|
||||
// SetFlags sets `AVPacket.flags` value.
|
||||
func (pkt *AVPacket) SetFlags(v int32) {
|
||||
pkt.flags = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetFlagsAddr gets `AVPacket.flags` address.
|
||||
// GetFlagsAddr gets `AVPacket.flags` address.
|
||||
func (pkt *AVPacket) GetFlagsAddr() *int32 {
|
||||
return (*int32)(&pkt.flags)
|
||||
}
|
||||
|
||||
// Custom: GetSideData gets `AVPacket.side_data` value.
|
||||
// GetSideData gets `AVPacket.side_data` value.
|
||||
func (pkt *AVPacket) GetSideData() *AVPacketSideData {
|
||||
return (*AVPacketSideData)(pkt.side_data)
|
||||
}
|
||||
|
||||
// Custom: SetSideData sets `AVPacket.side_data` value.
|
||||
// SetSideData sets `AVPacket.side_data` value.
|
||||
func (pkt *AVPacket) SetSideData(v *AVPacketSideData) {
|
||||
pkt.side_data = (*C.struct_AVPacketSideData)(v)
|
||||
}
|
||||
|
||||
// Custom: GetSideDataAddr gets `AVPacket.side_data` address.
|
||||
// GetSideDataAddr gets `AVPacket.side_data` address.
|
||||
func (pkt *AVPacket) GetSideDataAddr() **AVPacketSideData {
|
||||
return (**AVPacketSideData)(unsafe.Pointer(&pkt.side_data))
|
||||
}
|
||||
|
||||
// Custom: GetSideDataElems gets `AVPacket.side_data_elems` value.
|
||||
// GetSideDataElems gets `AVPacket.side_data_elems` value.
|
||||
func (pkt *AVPacket) GetSideDataElems() int32 {
|
||||
return (int32)(pkt.side_data_elems)
|
||||
}
|
||||
|
||||
// Custom: SetSideDataElems sets `AVPacket.side_data_elems` value.
|
||||
// SetSideDataElems sets `AVPacket.side_data_elems` value.
|
||||
func (pkt *AVPacket) SetSideDataElems(v int32) {
|
||||
pkt.side_data_elems = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetSideDataElemsAddr gets `AVPacket.side_data_elems` address.
|
||||
// GetSideDataElemsAddr gets `AVPacket.side_data_elems` address.
|
||||
func (pkt *AVPacket) GetSideDataElemsAddr() *int32 {
|
||||
return (*int32)(&pkt.side_data_elems)
|
||||
}
|
||||
|
||||
// Custom: GetDuration gets `AVPacket.duration` value.
|
||||
// GetDuration gets `AVPacket.duration` value.
|
||||
func (pkt *AVPacket) GetDuration() int64 {
|
||||
return (int64)(pkt.duration)
|
||||
}
|
||||
|
||||
// Custom: SetDuration sets `AVPacket.duration` value.
|
||||
// SetDuration sets `AVPacket.duration` value.
|
||||
func (pkt *AVPacket) SetDuration(v int64) {
|
||||
pkt.duration = (C.int64_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetDurationAddr gets `AVPacket.duration` address.
|
||||
// GetDurationAddr gets `AVPacket.duration` address.
|
||||
func (pkt *AVPacket) GetDurationAddr() *int64 {
|
||||
return (*int64)(&pkt.duration)
|
||||
}
|
||||
|
||||
// Custom: GetPos gets `AVPacket.pos` value.
|
||||
// GetPos gets `AVPacket.pos` value.
|
||||
func (pkt *AVPacket) GetPos() int64 {
|
||||
return (int64)(pkt.pos)
|
||||
}
|
||||
|
||||
// Custom: SetPos sets `AVPacket.pos` value.
|
||||
// SetPos sets `AVPacket.pos` value.
|
||||
func (pkt *AVPacket) SetPos(v int64) {
|
||||
pkt.pos = (C.int64_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetPosAddr gets `AVPacket.pos` address.
|
||||
// GetPosAddr gets `AVPacket.pos` address.
|
||||
func (pkt *AVPacket) GetPosAddr() *int64 {
|
||||
return (*int64)(&pkt.pos)
|
||||
}
|
||||
|
||||
// Custom: GetConvergenceDuration gets `AVPacket.convergence_duration` value.
|
||||
// Deprecated: No use.
|
||||
//
|
||||
// GetConvergenceDuration gets `AVPacket.convergence_duration` value.
|
||||
func (pkt *AVPacket) GetConvergenceDuration() int64 {
|
||||
return (int64)(pkt.convergence_duration)
|
||||
}
|
||||
|
||||
// Custom: SetConvergenceDuration sets `AVPacket.convergence_duration` value.
|
||||
// Deprecated: No use.
|
||||
//
|
||||
// SetConvergenceDuration sets `AVPacket.convergence_duration` value.
|
||||
func (pkt *AVPacket) SetConvergenceDuration(v int64) {
|
||||
pkt.convergence_duration = (C.int64_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetConvergenceDurationAddr gets `AVPacket.convergence_duration` address.
|
||||
// Deprecated: No use.
|
||||
//
|
||||
// GetConvergenceDurationAddr gets `AVPacket.convergence_duration` address.
|
||||
func (pkt *AVPacket) GetConvergenceDurationAddr() *int64 {
|
||||
return (*int64)(&pkt.convergence_duration)
|
||||
}
|
||||
|
||||
// Deprecated: No use.
|
||||
//
|
||||
// AVPacketList
|
||||
type AVPacketList C.struct_AVPacketList
|
||||
|
||||
// Custom: Getgets `AVPacketList.next` value.
|
||||
// Getgets `AVPacketList.next` value.
|
||||
func (pl *AVPacketList) Get() *AVPacketList {
|
||||
return (*AVPacketList)(pl.next)
|
||||
}
|
||||
|
||||
// Custom: Set sets `AVPacketList.next` value.
|
||||
// Set sets `AVPacketList.next` value.
|
||||
func (pl *AVPacketList) Set(v *AVPacketList) {
|
||||
pl.next = (*C.struct_AVPacketList)(v)
|
||||
}
|
||||
|
||||
// Custom: GetAddr gets `AVPacketList.next` address.
|
||||
// GetAddr gets `AVPacketList.next` address.
|
||||
func (pl *AVPacketList) GetAddr() **AVPacketList {
|
||||
return (**AVPacketList)(unsafe.Pointer(&pl.next))
|
||||
}
|
||||
@@ -333,6 +341,13 @@ func AvPacketFree(pkt **AVPacket) {
|
||||
C.av_packet_free((**C.struct_AVPacket)(unsafe.Pointer(pkt)))
|
||||
}
|
||||
|
||||
// Deprecated: No use.
|
||||
//
|
||||
// AvInitPacket initializes optional fields of a packet with default values.
|
||||
func AvInitPacket(pkt *AVPacket) {
|
||||
C.av_init_packet((*C.struct_AVPacket)(pkt))
|
||||
}
|
||||
|
||||
// AvNewPacket allocates the payload of a packet and initialize its fields with
|
||||
// default values.
|
||||
func AvNewPacket(pkt *AVPacket, size int32) int32 {
|
||||
@@ -356,23 +371,28 @@ func AvPacketFromData(pkt *AVPacket, data *uint8, size int32) int32 {
|
||||
}
|
||||
|
||||
// Deprecated: Use AVPacketRef() or AVPacketMakeRefcounted() instead.
|
||||
//
|
||||
// AvDupPacket
|
||||
func AvDupPacket(pkt *AVPacket) {
|
||||
C.av_dup_packet((*C.struct_AVPacket)(pkt))
|
||||
}
|
||||
|
||||
// Deprecated: Use AVPacketRef instead.
|
||||
//
|
||||
// AvCopyPacket copies packet, including contents
|
||||
func AvCopyPacket(dst, src *AVPacket) int32 {
|
||||
return (int32)(C.av_copy_packet((*C.struct_AVPacket)(dst), (*C.struct_AVPacket)(src)))
|
||||
}
|
||||
|
||||
// Deprecated: Use AVPacketCopyProps instead.
|
||||
//
|
||||
// AvCopyPacketSideData copies packet side data
|
||||
func AvCopyPacketSideData(dst, src *AVPacket) int32 {
|
||||
return (int32)(C.av_copy_packet_side_data((*C.struct_AVPacket)(dst), (*C.struct_AVPacket)(src)))
|
||||
}
|
||||
|
||||
// Deprecated: Use AVPacketUnref() instead.
|
||||
//
|
||||
// AvFreePacket frees a packet.
|
||||
func AvFreePacket(pkt *AVPacket) {
|
||||
C.av_free_packet((*C.struct_AVPacket)(pkt))
|
||||
@@ -402,12 +422,16 @@ func AvPacketGetSideData(pkt *AVPacket, _type AVPacketSideDataType, size *int32)
|
||||
(C.enum_AVPacketSideDataType)(_type), (*C.int)(size)))
|
||||
}
|
||||
|
||||
// Deprecated: No use
|
||||
// Deprecated: No use.
|
||||
//
|
||||
// AvPacketMergeSideData
|
||||
func AvPacketMergeSideData(pkt *AVPacket) int32 {
|
||||
return (int32)(C.av_packet_merge_side_data((*C.struct_AVPacket)(pkt)))
|
||||
}
|
||||
|
||||
// Deprecated: No use
|
||||
// Deprecated: No use.
|
||||
//
|
||||
// AvPacketSplitSideData
|
||||
func AvPacketSplitSideData(pkt *AVPacket) int32 {
|
||||
return (int32)(C.av_packet_split_side_data((*C.struct_AVPacket)(pkt)))
|
||||
}
|
||||
|
@@ -7,5 +7,7 @@ package ffmpeg
|
||||
*/
|
||||
import "C"
|
||||
|
||||
// Deprecated: No use
|
||||
// Deprecated: No use.
|
||||
//
|
||||
// VaapiContext
|
||||
type VaapiContext C.struct_vaapi_context
|
||||
|
@@ -11,5 +11,7 @@ const (
|
||||
AV_XVMC_ID = C.AV_XVMC_ID
|
||||
)
|
||||
|
||||
// Deprecated: No use
|
||||
// Deprecated: No use.
|
||||
//
|
||||
// XvmcPixFmt
|
||||
type XvmcPixFmt C.struct_xvmc_pix_fmt
|
||||
|
122
avdevice.go
122
avdevice.go
@@ -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)
|
||||
}
|
||||
|
360
avfilter.go
360
avfilter.go
File diff suppressed because it is too large
Load Diff
@@ -19,14 +19,16 @@ const (
|
||||
// AVBufferSinkParams
|
||||
type AVBufferSinkParams C.struct_AVBufferSinkParams
|
||||
|
||||
// Custom: GetPixelFmts gets `AVBufferSinkParams.pixel_fmts` value.
|
||||
// GetPixelFmts gets `AVBufferSinkParams.pixel_fmts` value.
|
||||
func (bsp *AVBufferSinkParams) GetPixelFmts() []AVPixelFormat {
|
||||
return SliceTrunc((*AVPixelFormat)(bsp.pixel_fmts), func(pf AVPixelFormat) bool {
|
||||
return pf == AV_PIX_FMT_NONE
|
||||
})
|
||||
}
|
||||
|
||||
// Deprecated: No use
|
||||
// Deprecated: No use.
|
||||
//
|
||||
// AvBuffersinkParamsAlloc creates an AVBufferSinkParams structure.
|
||||
func AvBuffersinkParamsAlloc() *AVBufferSinkParams {
|
||||
return (*AVBufferSinkParams)(C.av_buffersink_params_alloc())
|
||||
}
|
||||
@@ -34,40 +36,42 @@ func AvBuffersinkParamsAlloc() *AVBufferSinkParams {
|
||||
// AVABufferSinkParams
|
||||
type AVABufferSinkParams C.struct_AVABufferSinkParams
|
||||
|
||||
// Custom: GetSampleFmts gets `AVABufferSinkParams.sample_fmts` value.
|
||||
// GetSampleFmts gets `AVABufferSinkParams.sample_fmts` value.
|
||||
func (absp *AVABufferSinkParams) GetSampleFmts() []AVSampleFormat {
|
||||
return SliceTrunc((*AVSampleFormat)(absp.sample_fmts), func(sf AVSampleFormat) bool {
|
||||
return sf == AV_SAMPLE_FMT_NONE
|
||||
})
|
||||
}
|
||||
|
||||
// Custom: GetChannelLayouts gets `AVABufferSinkParams.channel_layouts` value.
|
||||
// GetChannelLayouts gets `AVABufferSinkParams.channel_layouts` value.
|
||||
func (absp *AVABufferSinkParams) GetChannelLayouts() []int64 {
|
||||
return SliceTrunc((*int64)(absp.channel_layouts), func(i int64) bool {
|
||||
return i == -1
|
||||
})
|
||||
}
|
||||
|
||||
// Custom: GetChannelCounts gets `AVABufferSinkParams.channel_counts` value.
|
||||
// GetChannelCounts gets `AVABufferSinkParams.channel_counts` value.
|
||||
func (absp *AVABufferSinkParams) GetChannelCounts() []int32 {
|
||||
return SliceTrunc((*int32)(absp.channel_counts), func(i int32) bool {
|
||||
return i == -1
|
||||
})
|
||||
}
|
||||
|
||||
// Custom: GetAllChannelCounts gets `AVABufferSinkParams.all_channel_counts` value.
|
||||
// GetAllChannelCounts gets `AVABufferSinkParams.all_channel_counts` value.
|
||||
func (absp *AVABufferSinkParams) GetAllChannelCounts() int32 {
|
||||
return (int32)(absp.all_channel_counts)
|
||||
}
|
||||
|
||||
// Custom: GetSampleRates gets `AVABufferSinkParams.sample_rates` value.
|
||||
// GetSampleRates gets `AVABufferSinkParams.sample_rates` value.
|
||||
func (absp *AVABufferSinkParams) GetSampleRates() []int32 {
|
||||
return SliceTrunc((*int32)(absp.sample_rates), func(i int32) bool {
|
||||
return i == -1
|
||||
})
|
||||
}
|
||||
|
||||
// Deprecated: No use
|
||||
// Deprecated: No use.
|
||||
//
|
||||
// AvAbuffersinkParamsAlloc creates an AVABufferSinkParams structure.
|
||||
func AvAbuffersinkParamsAlloc() *AVABufferSinkParams {
|
||||
return (*AVABufferSinkParams)(C.av_abuffersink_params_alloc())
|
||||
}
|
||||
|
@@ -20,137 +20,137 @@ func AvBuffersrcGetNbFailedRequests(bufferSrc *AVFilterContext) uint32 {
|
||||
// AVBufferSrcParameters
|
||||
type AVBufferSrcParameters C.struct_AVBufferSrcParameters
|
||||
|
||||
// Custom: GetFormat gets `AVBufferSrcParameters.format` value.
|
||||
// GetFormat gets `AVBufferSrcParameters.format` value.
|
||||
func (bsrc *AVBufferSrcParameters) GetFormat() int32 {
|
||||
return (int32)(bsrc.format)
|
||||
}
|
||||
|
||||
// Custom: SetFormat sets `AVBufferSrcParameters.format` value.
|
||||
// SetFormat sets `AVBufferSrcParameters.format` value.
|
||||
func (bsrc *AVBufferSrcParameters) SetFormat(v int32) {
|
||||
bsrc.format = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetFormatAddr gets `AVBufferSrcParameters.format` address.
|
||||
// GetFormatAddr gets `AVBufferSrcParameters.format` address.
|
||||
func (bsrc *AVBufferSrcParameters) GetFormatAddr() *int32 {
|
||||
return (*int32)(&bsrc.format)
|
||||
}
|
||||
|
||||
// Custom: GetTimeBase gets `AVBufferSrcParameters.time_base` value.
|
||||
// GetTimeBase gets `AVBufferSrcParameters.time_base` value.
|
||||
func (bsrc *AVBufferSrcParameters) GetTimeBase() AVRational {
|
||||
return (AVRational)(bsrc.time_base)
|
||||
}
|
||||
|
||||
// Custom: SetTimeBase sets `AVBufferSrcParameters.time_base` value.
|
||||
// SetTimeBase sets `AVBufferSrcParameters.time_base` value.
|
||||
func (bsrc *AVBufferSrcParameters) SetTimeBase(v AVRational) {
|
||||
bsrc.time_base = (C.struct_AVRational)(v)
|
||||
}
|
||||
|
||||
// Custom: GetTimeBaseAddr gets `AVBufferSrcParameters.time_base` address.
|
||||
// GetTimeBaseAddr gets `AVBufferSrcParameters.time_base` address.
|
||||
func (bsrc *AVBufferSrcParameters) GetTimeBaseAddr() *AVRational {
|
||||
return (*AVRational)(&bsrc.time_base)
|
||||
}
|
||||
|
||||
// Custom: GetWidth gets `AVBufferSrcParameters.width` value.
|
||||
// GetWidth gets `AVBufferSrcParameters.width` value.
|
||||
func (bsrc *AVBufferSrcParameters) GetWidth() int32 {
|
||||
return (int32)(bsrc.width)
|
||||
}
|
||||
|
||||
// Custom: SetWidth sets `AVBufferSrcParameters.width` value.
|
||||
// SetWidth sets `AVBufferSrcParameters.width` value.
|
||||
func (bsrc *AVBufferSrcParameters) SetWidth(v int32) {
|
||||
bsrc.width = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetWidthAddr gets `AVBufferSrcParameters.width` address.
|
||||
// GetWidthAddr gets `AVBufferSrcParameters.width` address.
|
||||
func (bsrc *AVBufferSrcParameters) GetWidthAddr() *int32 {
|
||||
return (*int32)(&bsrc.width)
|
||||
}
|
||||
|
||||
// Custom: GetHeight gets `AVBufferSrcParameters.height` value.
|
||||
// GetHeight gets `AVBufferSrcParameters.height` value.
|
||||
func (bsrc *AVBufferSrcParameters) GetHeight() int32 {
|
||||
return (int32)(bsrc.height)
|
||||
}
|
||||
|
||||
// Custom: SetHeight sets `AVBufferSrcParameters.height` value.
|
||||
// SetHeight sets `AVBufferSrcParameters.height` value.
|
||||
func (bsrc *AVBufferSrcParameters) SetHeight(v int32) {
|
||||
bsrc.height = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetHeightAddr gets `AVBufferSrcParameters.height` address.
|
||||
// GetHeightAddr gets `AVBufferSrcParameters.height` address.
|
||||
func (bsrc *AVBufferSrcParameters) GetHeightAddr() *int32 {
|
||||
return (*int32)(&bsrc.height)
|
||||
}
|
||||
|
||||
// Custom: GetSampleAspectRatio gets `AVBufferSrcParameters.sample_aspect_ratio` value.
|
||||
// GetSampleAspectRatio gets `AVBufferSrcParameters.sample_aspect_ratio` value.
|
||||
func (bsrc *AVBufferSrcParameters) GetSampleAspectRatio() AVRational {
|
||||
return (AVRational)(bsrc.sample_aspect_ratio)
|
||||
}
|
||||
|
||||
// Custom: SetSampleAspectRatio sets `AVBufferSrcParameters.sample_aspect_ratio` value.
|
||||
// SetSampleAspectRatio sets `AVBufferSrcParameters.sample_aspect_ratio` value.
|
||||
func (bsrc *AVBufferSrcParameters) SetSampleAspectRatio(v AVRational) {
|
||||
bsrc.sample_aspect_ratio = (C.struct_AVRational)(v)
|
||||
}
|
||||
|
||||
// Custom: GetSampleAspectRatioAddr gets `AVBufferSrcParameters.sample_aspect_ratio` address.
|
||||
// GetSampleAspectRatioAddr gets `AVBufferSrcParameters.sample_aspect_ratio` address.
|
||||
func (bsrc *AVBufferSrcParameters) GetSampleAspectRatioAddr() *AVRational {
|
||||
return (*AVRational)(&bsrc.sample_aspect_ratio)
|
||||
}
|
||||
|
||||
// Custom: GetFrameRate gets `AVBufferSrcParameters.frame_rate` value.
|
||||
// GetFrameRate gets `AVBufferSrcParameters.frame_rate` value.
|
||||
func (bsrc *AVBufferSrcParameters) GetFrameRate() AVRational {
|
||||
return (AVRational)(bsrc.frame_rate)
|
||||
}
|
||||
|
||||
// Custom: SetFrameRate sets `AVBufferSrcParameters.frame_rate` value.
|
||||
// SetFrameRate sets `AVBufferSrcParameters.frame_rate` value.
|
||||
func (bsrc *AVBufferSrcParameters) SetFrameRate(v AVRational) {
|
||||
bsrc.frame_rate = (C.struct_AVRational)(v)
|
||||
}
|
||||
|
||||
// Custom: GetFrameRateAddr gets `AVBufferSrcParameters.frame_rate` address.
|
||||
// GetFrameRateAddr gets `AVBufferSrcParameters.frame_rate` address.
|
||||
func (bsrc *AVBufferSrcParameters) GetFrameRateAddr() *AVRational {
|
||||
return (*AVRational)(&bsrc.frame_rate)
|
||||
}
|
||||
|
||||
// Custom: GetHwFramesCtx gets `AVBufferSrcParameters.hw_frames_ctx` value.
|
||||
// GetHwFramesCtx gets `AVBufferSrcParameters.hw_frames_ctx` value.
|
||||
func (bsrc *AVBufferSrcParameters) GetHwFramesCtx() *AVBufferRef {
|
||||
return (*AVBufferRef)(bsrc.hw_frames_ctx)
|
||||
}
|
||||
|
||||
// Custom: SetHwFramesCtx sets `AVBufferSrcParameters.hw_frames_ctx` value.
|
||||
// SetHwFramesCtx sets `AVBufferSrcParameters.hw_frames_ctx` value.
|
||||
func (bsrc *AVBufferSrcParameters) SetHwFramesCtx(v *AVBufferRef) {
|
||||
bsrc.hw_frames_ctx = (*C.struct_AVBufferRef)(v)
|
||||
}
|
||||
|
||||
// Custom: GetHwFramesCtxAddr gets `AVBufferSrcParameters.hw_frames_ctx` address.
|
||||
// GetHwFramesCtxAddr gets `AVBufferSrcParameters.hw_frames_ctx` address.
|
||||
func (bsrc *AVBufferSrcParameters) GetHwFramesCtxAddr() **AVBufferRef {
|
||||
return (**AVBufferRef)(unsafe.Pointer(&bsrc.hw_frames_ctx))
|
||||
}
|
||||
|
||||
// Custom: GetSampleRate gets `AVBufferSrcParameters.sample_rate` value.
|
||||
// GetSampleRate gets `AVBufferSrcParameters.sample_rate` value.
|
||||
func (bsrc *AVBufferSrcParameters) GetSampleRate() int32 {
|
||||
return (int32)(bsrc.sample_rate)
|
||||
}
|
||||
|
||||
// Custom: SetSampleRate sets `AVBufferSrcParameters.sample_rate` value.
|
||||
// SetSampleRate sets `AVBufferSrcParameters.sample_rate` value.
|
||||
func (bsrc *AVBufferSrcParameters) SetSampleRate(v int32) {
|
||||
bsrc.sample_rate = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetSampleRateAddr gets `AVBufferSrcParameters.sample_rate` address.
|
||||
// GetSampleRateAddr gets `AVBufferSrcParameters.sample_rate` address.
|
||||
func (bsrc *AVBufferSrcParameters) GetSampleRateAddr() *int32 {
|
||||
return (*int32)(&bsrc.sample_rate)
|
||||
}
|
||||
|
||||
// Custom: GetChannelLayout gets `AVBufferSrcParameters.channel_layout` value.
|
||||
// GetChannelLayout gets `AVBufferSrcParameters.channel_layout` value.
|
||||
func (bsrc *AVBufferSrcParameters) GetChannelLayout() uint64 {
|
||||
return (uint64)(bsrc.channel_layout)
|
||||
}
|
||||
|
||||
// Custom: SetChannelLayout sets `AVBufferSrcParameters.channel_layout` value.
|
||||
// SetChannelLayout sets `AVBufferSrcParameters.channel_layout` value.
|
||||
func (bsrc *AVBufferSrcParameters) SetChannelLayout(v uint64) {
|
||||
bsrc.channel_layout = (C.uint64_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetChannelLayoutAddr gets `AVBufferSrcParameters.channel_layout` address.
|
||||
// GetChannelLayoutAddr gets `AVBufferSrcParameters.channel_layout` address.
|
||||
func (bsrc *AVBufferSrcParameters) GetChannelLayoutAddr() *uint64 {
|
||||
return (*uint64)(&bsrc.channel_layout)
|
||||
}
|
||||
|
903
avformat.go
903
avformat.go
File diff suppressed because it is too large
Load Diff
246
avformat_avio.go
246
avformat_avio.go
@@ -29,32 +29,32 @@ type AVIOInterruptCB C.struct_AVIOInterruptCB
|
||||
// AVIOInterruptCallbackFunc
|
||||
type AVIOInterruptCallbackFunc = C.avio_interrupt_callback_func
|
||||
|
||||
// Custom: GetCallback gets `AVIOInterruptCB.callback` value.
|
||||
// GetCallback gets `AVIOInterruptCB.callback` value.
|
||||
func (icb *AVIOInterruptCB) GetCallback() AVIOInterruptCallbackFunc {
|
||||
return (AVIOInterruptCallbackFunc)(icb.callback)
|
||||
}
|
||||
|
||||
// Custom: SetCallback sets `AVIOInterruptCB.callback` value.
|
||||
// SetCallback sets `AVIOInterruptCB.callback` value.
|
||||
func (icb *AVIOInterruptCB) SetCallback(v AVIOInterruptCallbackFunc) {
|
||||
icb.callback = (C.avio_interrupt_callback_func)(v)
|
||||
}
|
||||
|
||||
// Custom: GetCallbackAddr gets `AVIOInterruptCB.callback` address.
|
||||
// GetCallbackAddr gets `AVIOInterruptCB.callback` address.
|
||||
func (icb *AVIOInterruptCB) GetCallbackAddr() *AVIOInterruptCallbackFunc {
|
||||
return (*AVIOInterruptCallbackFunc)(&icb.callback)
|
||||
}
|
||||
|
||||
// Custom: GetOpaque gets `AVIOInterruptCB.opaque` value.
|
||||
// GetOpaque gets `AVIOInterruptCB.opaque` value.
|
||||
func (icb *AVIOInterruptCB) GetOpaque() unsafe.Pointer {
|
||||
return icb.opaque
|
||||
}
|
||||
|
||||
// Custom: SetOpaque sets `AVIOInterruptCB.opaque` value.
|
||||
// SetOpaque sets `AVIOInterruptCB.opaque` value.
|
||||
func (icb *AVIOInterruptCB) SetOpaque(v CVoidPointer) {
|
||||
icb.opaque = VoidPointer(v)
|
||||
}
|
||||
|
||||
// Custom: GetOpaqueAddr gets `AVIOInterruptCB.opaque` address.
|
||||
// GetOpaqueAddr gets `AVIOInterruptCB.opaque` address.
|
||||
func (icb *AVIOInterruptCB) GetOpaqueAddr() *unsafe.Pointer {
|
||||
return &icb.opaque
|
||||
}
|
||||
@@ -79,142 +79,142 @@ const (
|
||||
// AVIODirEntry
|
||||
type AVIODirEntry C.struct_AVIODirEntry
|
||||
|
||||
// Custom: GetName gets `AVIODirEntry.name` value.
|
||||
// GetName gets `AVIODirEntry.name` value.
|
||||
func (de *AVIODirEntry) GetName() string {
|
||||
return C.GoString(de.name)
|
||||
}
|
||||
|
||||
// Custom: GetType gets `AVIODirEntry.type` value.
|
||||
// GetType gets `AVIODirEntry.type` value.
|
||||
func (de *AVIODirEntry) GetType() int32 {
|
||||
return (int32)(de._type)
|
||||
}
|
||||
|
||||
// Custom: SetType sets `AVIODirEntry.type` value.
|
||||
// SetType sets `AVIODirEntry.type` value.
|
||||
func (de *AVIODirEntry) SetType(v int32) {
|
||||
de._type = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetTypeAddr gets `AVIODirEntry.type` address.
|
||||
// GetTypeAddr gets `AVIODirEntry.type` address.
|
||||
func (de *AVIODirEntry) GetTypeAddr() *int32 {
|
||||
return (*int32)(&de._type)
|
||||
}
|
||||
|
||||
// Custom: GetUtf8 gets `AVIODirEntry.utf8` value.
|
||||
// GetUtf8 gets `AVIODirEntry.utf8` value.
|
||||
func (de *AVIODirEntry) GetUtf8() int32 {
|
||||
return (int32)(de.utf8)
|
||||
}
|
||||
|
||||
// Custom: SetUtf8 sets `AVIODirEntry.utf8` value.
|
||||
// SetUtf8 sets `AVIODirEntry.utf8` value.
|
||||
func (de *AVIODirEntry) SetUtf8(v int32) {
|
||||
de.utf8 = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetUtf8Addr gets `AVIODirEntry.utf8` address.
|
||||
// GetUtf8Addr gets `AVIODirEntry.utf8` address.
|
||||
func (de *AVIODirEntry) GetUtf8Addr() *int32 {
|
||||
return (*int32)(&de.utf8)
|
||||
}
|
||||
|
||||
// Custom: GetSize gets `AVIODirEntry.size` value.
|
||||
// GetSize gets `AVIODirEntry.size` value.
|
||||
func (de *AVIODirEntry) GetSize() int64 {
|
||||
return (int64)(de.size)
|
||||
}
|
||||
|
||||
// Custom: SetSize sets `AVIODirEntry.size` value.
|
||||
// SetSize sets `AVIODirEntry.size` value.
|
||||
func (de *AVIODirEntry) SetSize(v int64) {
|
||||
de.size = (C.int64_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetSizeAddr gets `AVIODirEntry.size` address.
|
||||
// GetSizeAddr gets `AVIODirEntry.size` address.
|
||||
func (de *AVIODirEntry) GetSizeAddr() *int64 {
|
||||
return (*int64)(&de.size)
|
||||
}
|
||||
|
||||
// Custom: GetModificationTimestamp gets `AVIODirEntry.modification_timestamp` value.
|
||||
// GetModificationTimestamp gets `AVIODirEntry.modification_timestamp` value.
|
||||
func (de *AVIODirEntry) GetModificationTimestamp() int64 {
|
||||
return (int64)(de.modification_timestamp)
|
||||
}
|
||||
|
||||
// Custom: SetModificationTimestamp sets `AVIODirEntry.modification_timestamp` value.
|
||||
// SetModificationTimestamp sets `AVIODirEntry.modification_timestamp` value.
|
||||
func (de *AVIODirEntry) SetModificationTimestamp(v int64) {
|
||||
de.modification_timestamp = (C.int64_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetModificationTimestampAddr gets `AVIODirEntry.modification_timestamp` address.
|
||||
// GetModificationTimestampAddr gets `AVIODirEntry.modification_timestamp` address.
|
||||
func (de *AVIODirEntry) GetModificationTimestampAddr() *int64 {
|
||||
return (*int64)(&de.modification_timestamp)
|
||||
}
|
||||
|
||||
// Custom: GetAccessTimestamp gets `AVIODirEntry.access_timestamp` value.
|
||||
// GetAccessTimestamp gets `AVIODirEntry.access_timestamp` value.
|
||||
func (de *AVIODirEntry) GetAccessTimestamp() int64 {
|
||||
return (int64)(de.access_timestamp)
|
||||
}
|
||||
|
||||
// Custom: SetAccessTimestamp sets `AVIODirEntry.access_timestamp` value.
|
||||
// SetAccessTimestamp sets `AVIODirEntry.access_timestamp` value.
|
||||
func (de *AVIODirEntry) SetAccessTimestamp(v int64) {
|
||||
de.access_timestamp = (C.int64_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetAccessTimestampAddr gets `AVIODirEntry.access_timestamp` address.
|
||||
// GetAccessTimestampAddr gets `AVIODirEntry.access_timestamp` address.
|
||||
func (de *AVIODirEntry) GetAccessTimestampAddr() *int64 {
|
||||
return (*int64)(&de.access_timestamp)
|
||||
}
|
||||
|
||||
// Custom: GetStatusChangeTimestamp gets `AVIODirEntry.status_change_timestamp` value.
|
||||
// GetStatusChangeTimestamp gets `AVIODirEntry.status_change_timestamp` value.
|
||||
func (de *AVIODirEntry) GetStatusChangeTimestamp() int64 {
|
||||
return (int64)(de.status_change_timestamp)
|
||||
}
|
||||
|
||||
// Custom: SetStatusChangeTimestamp sets `AVIODirEntry.status_change_timestamp` value.
|
||||
// SetStatusChangeTimestamp sets `AVIODirEntry.status_change_timestamp` value.
|
||||
func (de *AVIODirEntry) SetStatusChangeTimestamp(v int64) {
|
||||
de.status_change_timestamp = (C.int64_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetStatusChangeTimestampAddr gets `AVIODirEntry.status_change_timestamp` address.
|
||||
// GetStatusChangeTimestampAddr gets `AVIODirEntry.status_change_timestamp` address.
|
||||
func (de *AVIODirEntry) GetStatusChangeTimestampAddr() *int64 {
|
||||
return (*int64)(&de.status_change_timestamp)
|
||||
}
|
||||
|
||||
// Custom: GetUserId gets `AVIODirEntry.user_id` value.
|
||||
// GetUserId gets `AVIODirEntry.user_id` value.
|
||||
func (de *AVIODirEntry) GetUserId() int64 {
|
||||
return (int64)(de.user_id)
|
||||
}
|
||||
|
||||
// Custom: SetUserId sets `AVIODirEntry.user_id` value.
|
||||
// SetUserId sets `AVIODirEntry.user_id` value.
|
||||
func (de *AVIODirEntry) SetUserId(v int64) {
|
||||
de.user_id = (C.int64_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetUserIdAddr gets `AVIODirEntry.user_id` address.
|
||||
// GetUserIdAddr gets `AVIODirEntry.user_id` address.
|
||||
func (de *AVIODirEntry) GetUserIdAddr() *int64 {
|
||||
return (*int64)(&de.user_id)
|
||||
}
|
||||
|
||||
// Custom: GetGroupId gets `AVIODirEntry.group_id` value.
|
||||
// GetGroupId gets `AVIODirEntry.group_id` value.
|
||||
func (de *AVIODirEntry) GetGroupId() int64 {
|
||||
return (int64)(de.group_id)
|
||||
}
|
||||
|
||||
// Custom: SetGroupId sets `AVIODirEntry.group_id` value.
|
||||
// SetGroupId sets `AVIODirEntry.group_id` value.
|
||||
func (de *AVIODirEntry) SetGroupId(v int64) {
|
||||
de.group_id = (C.int64_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetGroupIdAddr gets `AVIODirEntry.group_id` address.
|
||||
// GetGroupIdAddr gets `AVIODirEntry.group_id` address.
|
||||
func (de *AVIODirEntry) GetGroupIdAddr() *int64 {
|
||||
return (*int64)(&de.group_id)
|
||||
}
|
||||
|
||||
// Custom: GetFilemode gets `AVIODirEntry.filemode` value.
|
||||
// GetFilemode gets `AVIODirEntry.filemode` value.
|
||||
func (de *AVIODirEntry) GetFilemode() int64 {
|
||||
return (int64)(de.filemode)
|
||||
}
|
||||
|
||||
// Custom: SetFilemode sets `AVIODirEntry.filemode` value.
|
||||
// SetFilemode sets `AVIODirEntry.filemode` value.
|
||||
func (de *AVIODirEntry) SetFilemode(v int64) {
|
||||
de.filemode = (C.int64_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetFilemodeAddr gets `AVIODirEntry.filemode` address.
|
||||
// GetFilemodeAddr gets `AVIODirEntry.filemode` address.
|
||||
func (de *AVIODirEntry) GetFilemodeAddr() *int64 {
|
||||
return (*int64)(&de.filemode)
|
||||
}
|
||||
@@ -225,17 +225,17 @@ type AVIODirContext C.struct_AVIODirContext
|
||||
// URLContext
|
||||
type URLContext C.struct_URLContext
|
||||
|
||||
// Custom: GetURLContext gets `AVIODirContext.url_context` value.
|
||||
// GetURLContext gets `AVIODirContext.url_context` value.
|
||||
func (dc *AVIODirContext) GetURLContext() *URLContext {
|
||||
return (*URLContext)(dc.url_context)
|
||||
}
|
||||
|
||||
// Custom: SetURLContext sets `AVIODirContext.url_context` value.
|
||||
// SetURLContext sets `AVIODirContext.url_context` value.
|
||||
func (dc *AVIODirContext) SetURLContext(v *URLContext) {
|
||||
dc.url_context = (*C.struct_URLContext)(v)
|
||||
}
|
||||
|
||||
// Custom: GetURLContextAddr gets `AVIODirContext.url_context` address.
|
||||
// GetURLContextAddr gets `AVIODirContext.url_context` address.
|
||||
func (dc *AVIODirContext) GetURLContextAddr() **URLContext {
|
||||
return (**URLContext)(unsafe.Pointer(&dc.url_context))
|
||||
}
|
||||
@@ -255,417 +255,417 @@ const (
|
||||
// AVIOContext
|
||||
type AVIOContext C.struct_AVIOContext
|
||||
|
||||
// Custom: GetAvClass gets `AVIOContext.av_class` value.
|
||||
// GetAvClass gets `AVIOContext.av_class` value.
|
||||
func (ctx *AVIOContext) GetAvClass() *AVClass {
|
||||
return (*AVClass)(ctx.av_class)
|
||||
}
|
||||
|
||||
// Custom: SetAvClass sets `AVIOContext.av_class` value.
|
||||
// SetAvClass sets `AVIOContext.av_class` value.
|
||||
func (ctx *AVIOContext) SetAvClass(v *AVClass) {
|
||||
ctx.av_class = (*C.struct_AVClass)(v)
|
||||
}
|
||||
|
||||
// Custom: GetAvClassAddr gets `AVIOContext.av_class` address.
|
||||
// GetAvClassAddr gets `AVIOContext.av_class` address.
|
||||
func (ctx *AVIOContext) GetAvClassAddr() **AVClass {
|
||||
return (**AVClass)(unsafe.Pointer(&ctx.av_class))
|
||||
}
|
||||
|
||||
// Custom: GetBuffer gets `AVIOContext.buffer` value.
|
||||
// GetBuffer gets `AVIOContext.buffer` value.
|
||||
func (ctx *AVIOContext) GetBuffer() *uint8 {
|
||||
return (*uint8)(ctx.buffer)
|
||||
}
|
||||
|
||||
// Custom: SetBuffer sets `AVIOContext.buffer` value.
|
||||
// SetBuffer sets `AVIOContext.buffer` value.
|
||||
func (ctx *AVIOContext) SetBuffer(v *uint8) {
|
||||
ctx.buffer = (*C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetBufferAddr gets `AVIOContext.buffer` address.
|
||||
// GetBufferAddr gets `AVIOContext.buffer` address.
|
||||
func (ctx *AVIOContext) GetBufferAddr() **uint8 {
|
||||
return (**uint8)(unsafe.Pointer(&ctx.buffer))
|
||||
}
|
||||
|
||||
// Custom: GetBufferSize gets `AVIOContext.buffer_size` value.
|
||||
// GetBufferSize gets `AVIOContext.buffer_size` value.
|
||||
func (ctx *AVIOContext) GetBufferSize() int32 {
|
||||
return (int32)(ctx.buffer_size)
|
||||
}
|
||||
|
||||
// Custom: SetBufferSize sets `AVIOContext.buffer_size` value.
|
||||
// SetBufferSize sets `AVIOContext.buffer_size` value.
|
||||
func (ctx *AVIOContext) SetBufferSize(v int32) {
|
||||
ctx.buffer_size = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetBufferSizeAddr gets `AVIOContext.buffer_size` address.
|
||||
// GetBufferSizeAddr gets `AVIOContext.buffer_size` address.
|
||||
func (ctx *AVIOContext) GetBufferSizeAddr() *int32 {
|
||||
return (*int32)(&ctx.buffer_size)
|
||||
}
|
||||
|
||||
// Custom: GetBufPtr gets `AVIOContext.buf_ptr` value.
|
||||
// GetBufPtr gets `AVIOContext.buf_ptr` value.
|
||||
func (ctx *AVIOContext) GetBufPtr() *uint8 {
|
||||
return (*uint8)(ctx.buf_ptr)
|
||||
}
|
||||
|
||||
// Custom: SetBufPtr sets `AVIOContext.buf_ptr` value.
|
||||
// SetBufPtr sets `AVIOContext.buf_ptr` value.
|
||||
func (ctx *AVIOContext) SetBufPtr(v *uint8) {
|
||||
ctx.buf_ptr = (*C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetBufPtrAddr gets `AVIOContext.buf_ptr` address.
|
||||
// GetBufPtrAddr gets `AVIOContext.buf_ptr` address.
|
||||
func (ctx *AVIOContext) GetBufPtrAddr() **uint8 {
|
||||
return (**uint8)(unsafe.Pointer(&ctx.buf_ptr))
|
||||
}
|
||||
|
||||
// Custom: GetBufEnd gets `AVIOContext.buf_end` value.
|
||||
// GetBufEnd gets `AVIOContext.buf_end` value.
|
||||
func (ctx *AVIOContext) GetBufEnd() *uint8 {
|
||||
return (*uint8)(ctx.buf_end)
|
||||
}
|
||||
|
||||
// Custom: SetBufEnd sets `AVIOContext.buf_end` value.
|
||||
// SetBufEnd sets `AVIOContext.buf_end` value.
|
||||
func (ctx *AVIOContext) SetBufEnd(v *uint8) {
|
||||
ctx.buf_end = (*C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetBufEndAddr gets `AVIOContext.buf_end` address.
|
||||
// GetBufEndAddr gets `AVIOContext.buf_end` address.
|
||||
func (ctx *AVIOContext) GetBufEndAddr() **uint8 {
|
||||
return (**uint8)(unsafe.Pointer(&ctx.buf_end))
|
||||
}
|
||||
|
||||
// Custom: GetOpaque gets `AVIOContext.opaque` value.
|
||||
// GetOpaque gets `AVIOContext.opaque` value.
|
||||
func (ctx *AVIOContext) GetOpaque() unsafe.Pointer {
|
||||
return ctx.opaque
|
||||
}
|
||||
|
||||
// Custom: SetOpaque sets `AVIOContext.opaque` value.
|
||||
// SetOpaque sets `AVIOContext.opaque` value.
|
||||
func (ctx *AVIOContext) SetOpaque(v CVoidPointer) {
|
||||
ctx.opaque = VoidPointer(v)
|
||||
}
|
||||
|
||||
// Custom: GetOpaqueAddr gets `AVIOContext.opaque` address.
|
||||
// GetOpaqueAddr gets `AVIOContext.opaque` address.
|
||||
func (ctx *AVIOContext) GetOpaqueAddr() *unsafe.Pointer {
|
||||
return (*unsafe.Pointer)(&ctx.opaque)
|
||||
}
|
||||
|
||||
// Custom: GetPos gets `AVIOContext.pos` value.
|
||||
// GetPos gets `AVIOContext.pos` value.
|
||||
func (ctx *AVIOContext) GetPos() int64 {
|
||||
return (int64)(ctx.pos)
|
||||
}
|
||||
|
||||
// Custom: SetPos sets `AVIOContext.pos` value.
|
||||
// SetPos sets `AVIOContext.pos` value.
|
||||
func (ctx *AVIOContext) SetPos(v int64) {
|
||||
ctx.pos = (C.int64_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetPosAddr gets `AVIOContext.pos` address.
|
||||
// GetPosAddr gets `AVIOContext.pos` address.
|
||||
func (ctx *AVIOContext) GetPosAddr() *int64 {
|
||||
return (*int64)(&ctx.pos)
|
||||
}
|
||||
|
||||
// Custom: GetEofReached gets `AVIOContext.eof_reached` value.
|
||||
// GetEofReached gets `AVIOContext.eof_reached` value.
|
||||
func (ctx *AVIOContext) GetEofReached() int32 {
|
||||
return (int32)(ctx.eof_reached)
|
||||
}
|
||||
|
||||
// Custom: SetEofReached sets `AVIOContext.eof_reached` value.
|
||||
// SetEofReached sets `AVIOContext.eof_reached` value.
|
||||
func (ctx *AVIOContext) SetEofReached(v int32) {
|
||||
ctx.eof_reached = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetEofReachedAddr gets `AVIOContext.eof_reached` address.
|
||||
// GetEofReachedAddr gets `AVIOContext.eof_reached` address.
|
||||
func (ctx *AVIOContext) GetEofReachedAddr() *int32 {
|
||||
return (*int32)(&ctx.eof_reached)
|
||||
}
|
||||
|
||||
// Custom: GetWriteFlag gets `AVIOContext.write_flag` value.
|
||||
// GetWriteFlag gets `AVIOContext.write_flag` value.
|
||||
func (ctx *AVIOContext) GetWriteFlag() int32 {
|
||||
return (int32)(ctx.write_flag)
|
||||
}
|
||||
|
||||
// Custom: SetWriteFlag sets `AVIOContext.write_flag` value.
|
||||
// SetWriteFlag sets `AVIOContext.write_flag` value.
|
||||
func (ctx *AVIOContext) SetWriteFlag(v int32) {
|
||||
ctx.write_flag = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetWriteFlagAddr gets `AVIOContext.write_flag` address.
|
||||
// GetWriteFlagAddr gets `AVIOContext.write_flag` address.
|
||||
func (ctx *AVIOContext) GetWriteFlagAddr() *int32 {
|
||||
return (*int32)(&ctx.write_flag)
|
||||
}
|
||||
|
||||
// Custom: GetMaxPacketSize gets `AVIOContext.max_packet_size` value.
|
||||
// GetMaxPacketSize gets `AVIOContext.max_packet_size` value.
|
||||
func (ctx *AVIOContext) GetMaxPacketSize() int32 {
|
||||
return (int32)(ctx.max_packet_size)
|
||||
}
|
||||
|
||||
// Custom: SetMaxPacketSize sets `AVIOContext.max_packet_size` value.
|
||||
// SetMaxPacketSize sets `AVIOContext.max_packet_size` value.
|
||||
func (ctx *AVIOContext) SetMaxPacketSize(v int32) {
|
||||
ctx.max_packet_size = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetMaxPacketSizeAddr gets `AVIOContext.max_packet_size` address.
|
||||
// GetMaxPacketSizeAddr gets `AVIOContext.max_packet_size` address.
|
||||
func (ctx *AVIOContext) GetMaxPacketSizeAddr() *int32 {
|
||||
return (*int32)(&ctx.max_packet_size)
|
||||
}
|
||||
|
||||
// Custom: GetChecksum gets `AVIOContext.checksum` value.
|
||||
// GetChecksum gets `AVIOContext.checksum` value.
|
||||
func (ctx *AVIOContext) GetChecksum() uint32 {
|
||||
return (uint32)(ctx.checksum)
|
||||
}
|
||||
|
||||
// Custom: SetChecksum sets `AVIOContext.checksum` value.
|
||||
// SetChecksum sets `AVIOContext.checksum` value.
|
||||
func (ctx *AVIOContext) SetChecksum(v uint32) {
|
||||
ctx.checksum = (C.ulong)(v)
|
||||
}
|
||||
|
||||
// Custom: GetChecksumAddr gets `AVIOContext.checksum` address.
|
||||
// GetChecksumAddr gets `AVIOContext.checksum` address.
|
||||
func (ctx *AVIOContext) GetChecksumAddr() *uint32 {
|
||||
return (*uint32)(unsafe.Pointer(&ctx.checksum))
|
||||
}
|
||||
|
||||
// Custom: GetChecksumPtr gets `AVIOContext.checksum_ptr` value.
|
||||
// GetChecksumPtr gets `AVIOContext.checksum_ptr` value.
|
||||
func (ctx *AVIOContext) GetChecksumPtr() *uint8 {
|
||||
return (*uint8)(ctx.checksum_ptr)
|
||||
}
|
||||
|
||||
// Custom: SetChecksumPtr sets `AVIOContext.checksum_ptr` value.
|
||||
// SetChecksumPtr sets `AVIOContext.checksum_ptr` value.
|
||||
func (ctx *AVIOContext) SetChecksumPtr(v *uint8) {
|
||||
ctx.checksum_ptr = (*C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetChecksumPtrAddr gets `AVIOContext.checksum_ptr` address.
|
||||
// GetChecksumPtrAddr gets `AVIOContext.checksum_ptr` address.
|
||||
func (ctx *AVIOContext) GetChecksumPtrAddr() **uint8 {
|
||||
return (**uint8)(unsafe.Pointer(&ctx.checksum_ptr))
|
||||
}
|
||||
|
||||
// Custom: GetError gets `AVIOContext.error` value.
|
||||
// GetError gets `AVIOContext.error` value.
|
||||
func (ctx *AVIOContext) GetError() int32 {
|
||||
return (int32)(ctx.error)
|
||||
}
|
||||
|
||||
// Custom: SetError sets `AVIOContext.error` value.
|
||||
// SetError sets `AVIOContext.error` value.
|
||||
func (ctx *AVIOContext) SetError(v int32) {
|
||||
ctx.error = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetErrorAddr gets `AVIOContext.error` address.
|
||||
// GetErrorAddr gets `AVIOContext.error` address.
|
||||
func (ctx *AVIOContext) GetErrorAddr() *int32 {
|
||||
return (*int32)(&ctx.error)
|
||||
}
|
||||
|
||||
// Custom: GetSeekable gets `AVIOContext.seekable` value.
|
||||
// GetSeekable gets `AVIOContext.seekable` value.
|
||||
func (ctx *AVIOContext) GetSeekable() int32 {
|
||||
return (int32)(ctx.seekable)
|
||||
}
|
||||
|
||||
// Custom: SetSeekable sets `AVIOContext.seekable` value.
|
||||
// SetSeekable sets `AVIOContext.seekable` value.
|
||||
func (ctx *AVIOContext) SetSeekable(v int32) {
|
||||
ctx.seekable = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetSeekableAddr gets `AVIOContext.seekable` address.
|
||||
// GetSeekableAddr gets `AVIOContext.seekable` address.
|
||||
func (ctx *AVIOContext) GetSeekableAddr() *int32 {
|
||||
return (*int32)(&ctx.seekable)
|
||||
}
|
||||
|
||||
// Custom: GetMaxsize gets `AVIOContext.maxsize` value.
|
||||
// GetMaxsize gets `AVIOContext.maxsize` value.
|
||||
func (ctx *AVIOContext) GetMaxsize() int64 {
|
||||
return (int64)(ctx.maxsize)
|
||||
}
|
||||
|
||||
// Custom: SetMaxsize sets `AVIOContext.maxsize` value.
|
||||
// SetMaxsize sets `AVIOContext.maxsize` value.
|
||||
func (ctx *AVIOContext) SetMaxsize(v int64) {
|
||||
ctx.maxsize = (C.int64_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetMaxsizeAddr gets `AVIOContext.maxsize` address.
|
||||
// GetMaxsizeAddr gets `AVIOContext.maxsize` address.
|
||||
func (ctx *AVIOContext) GetMaxsizeAddr() *int64 {
|
||||
return (*int64)(&ctx.maxsize)
|
||||
}
|
||||
|
||||
// Custom: GetDirect gets `AVIOContext.direct` value.
|
||||
// GetDirect gets `AVIOContext.direct` value.
|
||||
func (ctx *AVIOContext) GetDirect() int32 {
|
||||
return (int32)(ctx.direct)
|
||||
}
|
||||
|
||||
// Custom: SetDirect sets `AVIOContext.direct` value.
|
||||
// SetDirect sets `AVIOContext.direct` value.
|
||||
func (ctx *AVIOContext) SetDirect(v int32) {
|
||||
ctx.direct = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetDirectAddr gets `AVIOContext.direct` address.
|
||||
// GetDirectAddr gets `AVIOContext.direct` address.
|
||||
func (ctx *AVIOContext) GetDirectAddr() *int32 {
|
||||
return (*int32)(&ctx.direct)
|
||||
}
|
||||
|
||||
// Custom: GetBytesRead gets `AVIOContext.bytes_read` value.
|
||||
// GetBytesRead gets `AVIOContext.bytes_read` value.
|
||||
func (ctx *AVIOContext) GetBytesRead() int64 {
|
||||
return (int64)(ctx.bytes_read)
|
||||
}
|
||||
|
||||
// Custom: SetBytesRead sets `AVIOContext.bytes_read` value.
|
||||
// SetBytesRead sets `AVIOContext.bytes_read` value.
|
||||
func (ctx *AVIOContext) SetBytesRead(v int64) {
|
||||
ctx.bytes_read = (C.int64_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetBytesReadAddr gets `AVIOContext.bytes_read` address.
|
||||
// GetBytesReadAddr gets `AVIOContext.bytes_read` address.
|
||||
func (ctx *AVIOContext) GetBytesReadAddr() *int64 {
|
||||
return (*int64)(&ctx.bytes_read)
|
||||
}
|
||||
|
||||
// Custom: GetSeekCount gets `AVIOContext.seek_count` value.
|
||||
// GetSeekCount gets `AVIOContext.seek_count` value.
|
||||
func (ctx *AVIOContext) GetSeekCount() int32 {
|
||||
return (int32)(ctx.seek_count)
|
||||
}
|
||||
|
||||
// Custom: SetSeekCount sets `AVIOContext.seek_count` value.
|
||||
// SetSeekCount sets `AVIOContext.seek_count` value.
|
||||
func (ctx *AVIOContext) SetSeekCount(v int32) {
|
||||
ctx.seek_count = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetSeekCountAddr gets `AVIOContext.seek_count` address.
|
||||
// GetSeekCountAddr gets `AVIOContext.seek_count` address.
|
||||
func (ctx *AVIOContext) GetSeekCountAddr() *int32 {
|
||||
return (*int32)(&ctx.seek_count)
|
||||
}
|
||||
|
||||
// Custom: GetWriteoutCount gets `AVIOContext.writeout_count` value.
|
||||
// GetWriteoutCount gets `AVIOContext.writeout_count` value.
|
||||
func (ctx *AVIOContext) GetWriteoutCount() int32 {
|
||||
return (int32)(ctx.writeout_count)
|
||||
}
|
||||
|
||||
// Custom: SetWriteoutCount sets `AVIOContext.writeout_count` value.
|
||||
// SetWriteoutCount sets `AVIOContext.writeout_count` value.
|
||||
func (ctx *AVIOContext) SetWriteoutCount(v int32) {
|
||||
ctx.writeout_count = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetWriteoutCountAddr gets `AVIOContext.writeout_count` address.
|
||||
// GetWriteoutCountAddr gets `AVIOContext.writeout_count` address.
|
||||
func (ctx *AVIOContext) GetWriteoutCountAddr() *int32 {
|
||||
return (*int32)(&ctx.writeout_count)
|
||||
}
|
||||
|
||||
// Custom: GetOrigBufferSize gets `AVIOContext.orig_buffer_size` value.
|
||||
// GetOrigBufferSize gets `AVIOContext.orig_buffer_size` value.
|
||||
func (ctx *AVIOContext) GetOrigBufferSize() int32 {
|
||||
return (int32)(ctx.orig_buffer_size)
|
||||
}
|
||||
|
||||
// Custom: SetOrigBufferSize sets `AVIOContext.orig_buffer_size` value.
|
||||
// SetOrigBufferSize sets `AVIOContext.orig_buffer_size` value.
|
||||
func (ctx *AVIOContext) SetOrigBufferSize(v int32) {
|
||||
ctx.orig_buffer_size = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetOrigBufferSizeAddr gets `AVIOContext.orig_buffer_size` address.
|
||||
// GetOrigBufferSizeAddr gets `AVIOContext.orig_buffer_size` address.
|
||||
func (ctx *AVIOContext) GetOrigBufferSizeAddr() *int32 {
|
||||
return (*int32)(&ctx.orig_buffer_size)
|
||||
}
|
||||
|
||||
// Custom: GetShortSeekThreshold gets `AVIOContext.short_seek_threshold` value.
|
||||
// GetShortSeekThreshold gets `AVIOContext.short_seek_threshold` value.
|
||||
func (ctx *AVIOContext) GetShortSeekThreshold() int32 {
|
||||
return (int32)(ctx.short_seek_threshold)
|
||||
}
|
||||
|
||||
// Custom: SetShortSeekThreshold sets `AVIOContext.short_seek_threshold` value.
|
||||
// SetShortSeekThreshold sets `AVIOContext.short_seek_threshold` value.
|
||||
func (ctx *AVIOContext) SetShortSeekThreshold(v int32) {
|
||||
ctx.short_seek_threshold = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetShortSeekThresholdAddr gets `AVIOContext.short_seek_threshold` address.
|
||||
// GetShortSeekThresholdAddr gets `AVIOContext.short_seek_threshold` address.
|
||||
func (ctx *AVIOContext) GetShortSeekThresholdAddr() *int32 {
|
||||
return (*int32)(&ctx.short_seek_threshold)
|
||||
}
|
||||
|
||||
// Custom: GetProtocolWhitelist gets `AVIOContext.protocol_whitelist` value.
|
||||
// GetProtocolWhitelist gets `AVIOContext.protocol_whitelist` value.
|
||||
func (ctx *AVIOContext) GetProtocolWhitelist() string {
|
||||
return C.GoString(ctx.protocol_whitelist)
|
||||
}
|
||||
|
||||
// Custom: GetProtocolBlacklist gets `AVIOContext.protocol_blacklist` value.
|
||||
// GetProtocolBlacklist gets `AVIOContext.protocol_blacklist` value.
|
||||
func (ctx *AVIOContext) GetProtocolBlacklist() string {
|
||||
return C.GoString(ctx.protocol_blacklist)
|
||||
}
|
||||
|
||||
// Custom: GetIgnoreBoundaryPoint gets `AVIOContext.ignore_boundary_point` value.
|
||||
// GetIgnoreBoundaryPoint gets `AVIOContext.ignore_boundary_point` value.
|
||||
func (ctx *AVIOContext) GetIgnoreBoundaryPoint() int32 {
|
||||
return (int32)(ctx.ignore_boundary_point)
|
||||
}
|
||||
|
||||
// Custom: SetIgnoreBoundaryPoint sets `AVIOContext.ignore_boundary_point` value.
|
||||
// SetIgnoreBoundaryPoint sets `AVIOContext.ignore_boundary_point` value.
|
||||
func (ctx *AVIOContext) SetIgnoreBoundaryPoint(v int32) {
|
||||
ctx.ignore_boundary_point = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetIgnoreBoundaryPointAddr gets `AVIOContext.ignore_boundary_point` address.
|
||||
// GetIgnoreBoundaryPointAddr gets `AVIOContext.ignore_boundary_point` address.
|
||||
func (ctx *AVIOContext) GetIgnoreBoundaryPointAddr() *int32 {
|
||||
return (*int32)(&ctx.ignore_boundary_point)
|
||||
}
|
||||
|
||||
// Custom: GetCurrentType gets `AVIOContext.currenttype` value.
|
||||
// GetCurrentType gets `AVIOContext.currenttype` value.
|
||||
func (ctx *AVIOContext) GetCurrentType() AVIODataMarkerType {
|
||||
return (AVIODataMarkerType)(ctx.current_type)
|
||||
}
|
||||
|
||||
// Custom: SetCurrentType sets `AVIOContext.currenttype` value.
|
||||
// SetCurrentType sets `AVIOContext.currenttype` value.
|
||||
func (ctx *AVIOContext) SetCurrentType(v AVIODataMarkerType) {
|
||||
ctx.current_type = (C.enum_AVIODataMarkerType)(v)
|
||||
}
|
||||
|
||||
// Custom: GetCurrentTypeAddr gets `AVIOContext.currenttype` address.
|
||||
// GetCurrentTypeAddr gets `AVIOContext.currenttype` address.
|
||||
func (ctx *AVIOContext) GetCurrentTypeAddr() *AVIODataMarkerType {
|
||||
return (*AVIODataMarkerType)(&ctx.current_type)
|
||||
}
|
||||
|
||||
// Custom: GetLastTime gets `AVIOContext.last_time` value.
|
||||
// GetLastTime gets `AVIOContext.last_time` value.
|
||||
func (ctx *AVIOContext) GetLastTime() int64 {
|
||||
return (int64)(ctx.last_time)
|
||||
}
|
||||
|
||||
// Custom: SetLastTime sets `AVIOContext.last_time` value.
|
||||
// SetLastTime sets `AVIOContext.last_time` value.
|
||||
func (ctx *AVIOContext) SetLastTime(v int64) {
|
||||
ctx.last_time = (C.int64_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetLastTimeAddr gets `AVIOContext.last_time` address.
|
||||
// GetLastTimeAddr gets `AVIOContext.last_time` address.
|
||||
func (ctx *AVIOContext) GetLastTimeAddr() *int64 {
|
||||
return (*int64)(&ctx.last_time)
|
||||
}
|
||||
|
||||
// Custom: GetWritten gets `AVIOContext.written` value.
|
||||
// GetWritten gets `AVIOContext.written` value.
|
||||
func (ctx *AVIOContext) GetWritten() int64 {
|
||||
return (int64)(ctx.written)
|
||||
}
|
||||
|
||||
// Custom: SetWritten sets `AVIOContext.written` value.
|
||||
// SetWritten sets `AVIOContext.written` value.
|
||||
func (ctx *AVIOContext) SetWritten(v int64) {
|
||||
ctx.written = (C.int64_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetWrittenAddr gets `AVIOContext.written` address.
|
||||
// GetWrittenAddr gets `AVIOContext.written` address.
|
||||
func (ctx *AVIOContext) GetWrittenAddr() *int64 {
|
||||
return (*int64)(&ctx.written)
|
||||
}
|
||||
|
||||
// Custom: GetBufPtrMax gets `AVIOContext.buf_ptr_max` value.
|
||||
// GetBufPtrMax gets `AVIOContext.buf_ptr_max` value.
|
||||
func (ctx *AVIOContext) GetBufPtrMax() *uint8 {
|
||||
return (*uint8)(ctx.buf_ptr_max)
|
||||
}
|
||||
|
||||
// Custom: SetBufPtrMax sets `AVIOContext.buf_ptr_max` value.
|
||||
// SetBufPtrMax sets `AVIOContext.buf_ptr_max` value.
|
||||
func (ctx *AVIOContext) SetBufPtrMax(v *uint8) {
|
||||
ctx.buf_ptr_max = (*C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetBufPtrMaxAddr gets `AVIOContext.buf_ptr_max` address.
|
||||
// GetBufPtrMaxAddr gets `AVIOContext.buf_ptr_max` address.
|
||||
func (ctx *AVIOContext) GetBufPtrMaxAddr() **uint8 {
|
||||
return (**uint8)(unsafe.Pointer(&ctx.buf_ptr_max))
|
||||
}
|
||||
|
||||
// Custom: GetMinPacketSize gets `AVIOContext.min_packet_size` value.
|
||||
// GetMinPacketSize gets `AVIOContext.min_packet_size` value.
|
||||
func (ctx *AVIOContext) GetMinPacketSize() int32 {
|
||||
return (int32)(ctx.min_packet_size)
|
||||
}
|
||||
|
||||
// Custom: SetMinPacketSize sets `AVIOContext.min_packet_size` value.
|
||||
// SetMinPacketSize sets `AVIOContext.min_packet_size` value.
|
||||
func (ctx *AVIOContext) SetMinPacketSize(v int32) {
|
||||
ctx.min_packet_size = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetMinPacketSizeAddr gets `AVIOContext.min_packet_size` address.
|
||||
// GetMinPacketSizeAddr gets `AVIOContext.min_packet_size` address.
|
||||
func (ctx *AVIOContext) GetMinPacketSizeAddr() *int32 {
|
||||
return (*int32)(&ctx.min_packet_size)
|
||||
}
|
||||
@@ -727,13 +727,13 @@ func AvIOFreeDirectoryEntry(entry **AVIODirEntry) {
|
||||
C.avio_free_directory_entry((**C.struct_AVIODirEntry)(unsafe.Pointer(entry)))
|
||||
}
|
||||
|
||||
// typedef int (*avio_context_read_packet_func)(void *opaque, uint8_t *buf, int buf_size)
|
||||
// typedef int (*avio_context_read_packet_func)(void *opaque, uint8_t *buf, int buf_size);
|
||||
type AVIOContextReadPacketFunc = C.avio_context_read_packet_func
|
||||
|
||||
// typedef int (*avio_context_write_packet_func)(void *opaque, uint8_t *buf, int buf_size)
|
||||
// typedef int (*avio_context_write_packet_func)(void *opaque, uint8_t *buf, int buf_size);
|
||||
type AVIOContextWritePacketFunc = C.avio_context_write_packet_func
|
||||
|
||||
// typedef int64_t (*avio_context_seek_func)(void *opaque, int64_t offset, int whence)
|
||||
// typedef int64_t (*avio_context_seek_func)(void *opaque, int64_t offset, int whence);
|
||||
type AVIOContextSeekFunc = C.avio_context_seek_func
|
||||
|
||||
// AvIOAllocContext sllocates and initialize an AVIOContext for buffered I/O. It must be later
|
||||
|
@@ -93,12 +93,12 @@ func AvXIfNull(p, x unsafe.Pointer) unsafe.Pointer {
|
||||
}
|
||||
|
||||
// AvIntListLengthForSize computes the length of an integer list.
|
||||
func AvIntListLengthForSize(elsize uint32, list CVoidPointer, term uint64) uint32 {
|
||||
func AvIntListLengthForSize[T Integer](elsize uint32, list CVoidPointer, term T) uint32 {
|
||||
return (uint32)(C.av_int_list_length_for_size((C.uint)(elsize), VoidPointer(list), (C.uint64_t)(term)))
|
||||
}
|
||||
|
||||
// AvIntListLength
|
||||
func AvIntListLength[T any](list *T, term uint64) uint32 {
|
||||
func AvIntListLength[U, V Integer](list *U, term V) uint32 {
|
||||
elsize := unsafe.Sizeof(*list)
|
||||
return (uint32)(C.av_int_list_length_for_size((C.uint)(elsize), (unsafe.Pointer)(list), (C.uint64_t)(term)))
|
||||
}
|
||||
|
@@ -11,7 +11,7 @@ func AvBase64Decode(out *uint8, in *int8, outSize int32) int32 {
|
||||
}
|
||||
|
||||
// AV_BASE64_DECODE_SIZE
|
||||
func AV_BASE64_DECODE_SIZE[T HelperInteger](x T) T {
|
||||
func AV_BASE64_DECODE_SIZE[T Integer](x T) T {
|
||||
return x * 3 / 4
|
||||
}
|
||||
|
||||
@@ -21,6 +21,6 @@ func AvBase64Encode(out *int8, outSize int32, in *uint8, inSize int32) *int8 {
|
||||
}
|
||||
|
||||
// AV_BASE64_SIZE
|
||||
func AV_BASE64_SIZE[T HelperInteger](x T) T {
|
||||
func AV_BASE64_SIZE[T Integer](x T) T {
|
||||
return (x+2)/3*4 + 1
|
||||
}
|
||||
|
@@ -12,24 +12,24 @@ const (
|
||||
|
||||
type AVBlowfish C.struct_AVBlowfish
|
||||
|
||||
// Custom: GetP gets `AVBlowfish.p` value.
|
||||
// GetP gets `AVBlowfish.p` value.
|
||||
func (bf *AVBlowfish) GetP() []uint32 {
|
||||
return unsafe.Slice((*uint32)(&bf.p[0]), AV_BF_ROUNDS+2)
|
||||
}
|
||||
|
||||
// Custom: SetP sets `AVBlowfish.p` value.
|
||||
// SetP sets `AVBlowfish.p` value.
|
||||
func (bf *AVBlowfish) SetP(v []uint32) {
|
||||
for i := 0; i < FFMIN(len(v), AV_BF_ROUNDS+2); i++ {
|
||||
bf.p[i] = (C.uint32_t)(v[i])
|
||||
}
|
||||
}
|
||||
|
||||
// Custom: GetPAddr gets `AVBlowfish.p` address.
|
||||
// GetPAddr gets `AVBlowfish.p` address.
|
||||
func (bf *AVBlowfish) GetPAddr() **uint32 {
|
||||
return (**uint32)(unsafe.Pointer(&bf.p))
|
||||
}
|
||||
|
||||
// Custom: GetS gets `AVBlowfish.s` value.
|
||||
// GetS gets `AVBlowfish.s` value.
|
||||
func (bf *AVBlowfish) GetS() (v [][]uint32) {
|
||||
for i := 0; i < 4; i++ {
|
||||
v = append(v, unsafe.Slice((*uint32)(&bf.s[i][0]), 256))
|
||||
@@ -37,7 +37,7 @@ func (bf *AVBlowfish) GetS() (v [][]uint32) {
|
||||
return v
|
||||
}
|
||||
|
||||
// Custom: SetS sets `AVBlowfish.s` value.
|
||||
// SetS sets `AVBlowfish.s` value.
|
||||
func (bf *AVBlowfish) SetS(v [][]uint32) {
|
||||
for i := 0; i < FFMIN(len(v), 4); i++ {
|
||||
for j := 0; j < FFMIN(len(v[i]), 256); j++ {
|
||||
@@ -46,7 +46,7 @@ func (bf *AVBlowfish) SetS(v [][]uint32) {
|
||||
}
|
||||
}
|
||||
|
||||
// Custom: GetSAddr gets `AVBlowfish.s` address.
|
||||
// GetSAddr gets `AVBlowfish.s` address.
|
||||
func (bf *AVBlowfish) GetSAddr() **uint32 {
|
||||
return (**uint32)(unsafe.Pointer(&bf.s))
|
||||
}
|
||||
|
@@ -17,17 +17,17 @@ type AVBuffer C.struct_AVBuffer
|
||||
// AVBufferRef
|
||||
type AVBufferRef C.struct_AVBufferRef
|
||||
|
||||
// Custom: GetBuffer gets `AVBufferRef.buffer` value.
|
||||
// GetBuffer gets `AVBufferRef.buffer` value.
|
||||
func (bf *AVBufferRef) GetBuffer() *AVBuffer {
|
||||
return (*AVBuffer)(bf.buffer)
|
||||
}
|
||||
|
||||
// Custom: GetData gets `AVBufferRef.data` value.
|
||||
// GetData gets `AVBufferRef.data` value.
|
||||
func (bf *AVBufferRef) GetData() *uint8 {
|
||||
return (*uint8)(bf.data)
|
||||
}
|
||||
|
||||
// Custom: GetSize gets `AVBufferRef.size` value.
|
||||
// GetSize gets `AVBufferRef.size` value.
|
||||
func (bf *AVBufferRef) GetSize() int32 {
|
||||
return (int32)(bf.size)
|
||||
}
|
||||
|
@@ -14,7 +14,7 @@ func AV_NE[T any](be, le T) T {
|
||||
}
|
||||
|
||||
// RSHIFT
|
||||
func RSHIFT[U, V HelperInteger](a U, b V) U {
|
||||
func RSHIFT[U, V Integer](a U, b V) U {
|
||||
if a > 0 {
|
||||
return ((a) + ((1 << (b)) >> 1)) >> b
|
||||
}
|
||||
@@ -22,7 +22,7 @@ func RSHIFT[U, V HelperInteger](a U, b V) U {
|
||||
}
|
||||
|
||||
// ROUNDED_DIV
|
||||
func ROUNDED_DIV[T HelperInteger](a, b T) T {
|
||||
func ROUNDED_DIV[T Integer](a, b T) T {
|
||||
if a >= 0 {
|
||||
return ((a) + ((b) >> 1)) / b
|
||||
}
|
||||
@@ -30,17 +30,17 @@ func ROUNDED_DIV[T HelperInteger](a, b T) T {
|
||||
}
|
||||
|
||||
// AV_CEIL_RSHIFT
|
||||
func AV_CEIL_RSHIFT[U, V HelperInteger](a U, b V) U {
|
||||
func AV_CEIL_RSHIFT[U, V Integer](a U, b V) U {
|
||||
return -((-(a)) >> (b))
|
||||
}
|
||||
|
||||
// FF_CEIL_RSHIFT
|
||||
func FF_CEIL_RSHIFT[U, V HelperInteger](a U, b V) U {
|
||||
func FF_CEIL_RSHIFT[U, V Integer](a U, b V) U {
|
||||
return AV_CEIL_RSHIFT(a, b)
|
||||
}
|
||||
|
||||
// FFUDIV
|
||||
func FFUDIV[T HelperInteger](a, b T) T {
|
||||
func FFUDIV[T Integer](a, b T) T {
|
||||
if a > 0 {
|
||||
return a / b
|
||||
}
|
||||
@@ -48,18 +48,18 @@ func FFUDIV[T HelperInteger](a, b T) T {
|
||||
}
|
||||
|
||||
// FFUMOD
|
||||
func FFUMOD[T HelperInteger](a, b T) T {
|
||||
func FFUMOD[T Integer](a, b T) T {
|
||||
return a - b*FFUDIV(a, b)
|
||||
}
|
||||
|
||||
func FFABS[T HelperSingedInteger](a T) T {
|
||||
func FFABS[T SingedInteger](a T) T {
|
||||
if a >= 0 {
|
||||
return a
|
||||
}
|
||||
return -a
|
||||
}
|
||||
|
||||
func FFSIGNT[T HelperSingedInteger](a T) T {
|
||||
func FFSIGNT[T SingedInteger](a T) T {
|
||||
if a > 0 {
|
||||
return 1
|
||||
}
|
||||
@@ -67,7 +67,7 @@ func FFSIGNT[T HelperSingedInteger](a T) T {
|
||||
}
|
||||
|
||||
// FFNABS
|
||||
func FFNABS[T HelperSingedInteger](a T) T {
|
||||
func FFNABS[T SingedInteger](a T) T {
|
||||
if a <= 0 {
|
||||
return a
|
||||
}
|
||||
@@ -75,7 +75,7 @@ func FFNABS[T HelperSingedInteger](a T) T {
|
||||
}
|
||||
|
||||
// FFABSU
|
||||
func FFABSU[T HelperSingedInteger](a T) uint32 {
|
||||
func FFABSU[T SingedInteger](a T) uint32 {
|
||||
if a <= 0 {
|
||||
return -(uint32)(a)
|
||||
}
|
||||
@@ -83,7 +83,7 @@ func FFABSU[T HelperSingedInteger](a T) uint32 {
|
||||
}
|
||||
|
||||
// FFABS64U
|
||||
func FFABS64U[T HelperSingedInteger](a T) uint64 {
|
||||
func FFABS64U[T SingedInteger](a T) uint64 {
|
||||
if a <= 0 {
|
||||
return -(uint64)(a)
|
||||
}
|
||||
@@ -91,7 +91,7 @@ func FFABS64U[T HelperSingedInteger](a T) uint64 {
|
||||
}
|
||||
|
||||
// FFDIFFSIGN
|
||||
func FFDIFFSIGN[T HelperInteger](x, y T) int {
|
||||
func FFDIFFSIGN[T Integer](x, y T) int {
|
||||
if x > y {
|
||||
return 1
|
||||
} else if x < y {
|
||||
@@ -101,25 +101,25 @@ func FFDIFFSIGN[T HelperInteger](x, y T) int {
|
||||
}
|
||||
}
|
||||
|
||||
func FFMAX[T HelperInteger](a, b T) T {
|
||||
func FFMAX[T Integer](a, b T) T {
|
||||
if a > b {
|
||||
return a
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func FFMAX3[T HelperInteger](a, b, c T) T {
|
||||
func FFMAX3[T Integer](a, b, c T) T {
|
||||
return FFMAX(FFMAX(a, b), c)
|
||||
}
|
||||
|
||||
func FFMIN[T HelperInteger](a, b T) T {
|
||||
func FFMIN[T Integer](a, b T) T {
|
||||
if a > b {
|
||||
return b
|
||||
}
|
||||
return a
|
||||
}
|
||||
|
||||
func FFMIN3[T HelperInteger](a, b, c T) T {
|
||||
func FFMIN3[T Integer](a, b, c T) T {
|
||||
return FFMIN(FFMIN(a, b), c)
|
||||
}
|
||||
|
||||
|
@@ -65,11 +65,15 @@ func AvForceCpuFlags(flags int32) {
|
||||
}
|
||||
|
||||
// Deprecated: Use AvForceCpuFlags() and AvGetCpuFlags() instead
|
||||
//
|
||||
// AvSetCpuFlagsMask set a mask on flags returned by AvGetCpuFlags().
|
||||
func AvSetCpuFlagsMask(mask int32) {
|
||||
C.av_set_cpu_flags_mask((C.int)(mask))
|
||||
}
|
||||
|
||||
// Deprecated: Use AvParseCpuCaps() when possible.
|
||||
//
|
||||
// AvParseCpuFlags parses CPU flags from a string.
|
||||
func AvParseCpuFlags(str string) int32 {
|
||||
strPtr, strFunc := StringCasting(str)
|
||||
defer strFunc()
|
||||
|
@@ -9,7 +9,7 @@ import "unsafe"
|
||||
// AVDES
|
||||
type AVDES C.struct_AVDES
|
||||
|
||||
// Custom: GetRoundKeys gets `AVDES.round_keys` value.
|
||||
// GetRoundKeys gets `AVDES.round_keys` value.
|
||||
func (d *AVDES) GetRoundKeys() (v [][]uint64) {
|
||||
for i := 0; i < 3; i++ {
|
||||
v = append(v, unsafe.Slice((*uint64)(&d.round_keys[i][0]), 16))
|
||||
@@ -17,7 +17,7 @@ func (d *AVDES) GetRoundKeys() (v [][]uint64) {
|
||||
return v
|
||||
}
|
||||
|
||||
// Custom: SetRoundKeys sets `AVDES.round_keys` value.
|
||||
// SetRoundKeys sets `AVDES.round_keys` value.
|
||||
func (d *AVDES) SetRoundKeys(v [][]uint64) {
|
||||
for i := 0; i < FFMIN(len(v), 3); i++ {
|
||||
for j := 0; j < FFMIN(len(v[i]), 16); j++ {
|
||||
@@ -26,22 +26,22 @@ func (d *AVDES) SetRoundKeys(v [][]uint64) {
|
||||
}
|
||||
}
|
||||
|
||||
// Custom: GetRoundKeysAddr gets `AVDES.round_keys` address.
|
||||
// GetRoundKeysAddr gets `AVDES.round_keys` address.
|
||||
func (d *AVDES) GetRoundKeysAddr() **uint64 {
|
||||
return (**uint64)(unsafe.Pointer(&d.round_keys))
|
||||
}
|
||||
|
||||
// Custom: GetTripleDes gets `AVDES.triple_des` value.
|
||||
// GetTripleDes gets `AVDES.triple_des` value.
|
||||
func (d *AVDES) GetTripleDes() int32 {
|
||||
return (int32)(d.triple_des)
|
||||
}
|
||||
|
||||
// Custom: SetTripleDes sets `AVDES.triple_des` value.
|
||||
// SetTripleDes sets `AVDES.triple_des` value.
|
||||
func (d *AVDES) SetTripleDes(v int32) {
|
||||
d.triple_des = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetTripleDesAddr gets `AVDES.triple_des` address.
|
||||
// GetTripleDesAddr gets `AVDES.triple_des` address.
|
||||
func (d *AVDES) GetTripleDesAddr() *int32 {
|
||||
return (*int32)(&d.triple_des)
|
||||
}
|
||||
|
@@ -18,12 +18,12 @@ const (
|
||||
|
||||
type AVDictionaryEntry C.struct_AVDictionaryEntry
|
||||
|
||||
// Custom: GetKey gets `AVDictionaryEntry.key` value.
|
||||
// GetKey gets `AVDictionaryEntry.key` value.
|
||||
func (e *AVDictionaryEntry) GetKey() string {
|
||||
return C.GoString(e.key)
|
||||
}
|
||||
|
||||
// Custom: GetValue gets `AVDictionaryEntry.value` value.
|
||||
// GetValue gets `AVDictionaryEntry.value` value.
|
||||
func (e *AVDictionaryEntry) GetValue() string {
|
||||
return C.GoString(e.value)
|
||||
}
|
||||
|
@@ -9,124 +9,124 @@ import "unsafe"
|
||||
// AVDOVIDecoderConfigurationRecord
|
||||
type AVDOVIDecoderConfigurationRecord C.struct_AVDOVIDecoderConfigurationRecord
|
||||
|
||||
// Custom: GetDvVersionMajor gets `AVDOVIDecoderConfigurationRecord.dv_version_major` value.
|
||||
// GetDvVersionMajor gets `AVDOVIDecoderConfigurationRecord.dv_version_major` value.
|
||||
func (dcr *AVDOVIDecoderConfigurationRecord) GetDvVersionMajor() uint8 {
|
||||
return (uint8)(dcr.dv_version_major)
|
||||
}
|
||||
|
||||
// Custom: SetDvVersionMajor sets `AVDOVIDecoderConfigurationRecord.dv_version_major` value.
|
||||
// SetDvVersionMajor sets `AVDOVIDecoderConfigurationRecord.dv_version_major` value.
|
||||
func (dcr *AVDOVIDecoderConfigurationRecord) SetDvVersionMajor(v uint8) {
|
||||
dcr.dv_version_major = (C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetDvVersionMajorAddr gets `AVDOVIDecoderConfigurationRecord.dv_version_major` address.
|
||||
// GetDvVersionMajorAddr gets `AVDOVIDecoderConfigurationRecord.dv_version_major` address.
|
||||
func (dcr *AVDOVIDecoderConfigurationRecord) GetDvVersionMajorAddr() *uint8 {
|
||||
return (*uint8)(&dcr.dv_version_major)
|
||||
}
|
||||
|
||||
// Custom: GetDvVersionMinor gets `AVDOVIDecoderConfigurationRecord.dv_version_minor` value.
|
||||
// GetDvVersionMinor gets `AVDOVIDecoderConfigurationRecord.dv_version_minor` value.
|
||||
func (dcr *AVDOVIDecoderConfigurationRecord) GetDvVersionMinor() uint8 {
|
||||
return (uint8)(dcr.dv_version_minor)
|
||||
}
|
||||
|
||||
// Custom: SetDvVersionMinor sets `AVDOVIDecoderConfigurationRecord.dv_version_minor` value.
|
||||
// SetDvVersionMinor sets `AVDOVIDecoderConfigurationRecord.dv_version_minor` value.
|
||||
func (dcr *AVDOVIDecoderConfigurationRecord) SetDvVersionMinor(v uint8) {
|
||||
dcr.dv_version_minor = (C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetDvVersionMinorAddr gets `AVDOVIDecoderConfigurationRecord.dv_version_minor` address.
|
||||
// GetDvVersionMinorAddr gets `AVDOVIDecoderConfigurationRecord.dv_version_minor` address.
|
||||
func (dcr *AVDOVIDecoderConfigurationRecord) GetDvVersionMinorAddr() *uint8 {
|
||||
return (*uint8)(&dcr.dv_version_minor)
|
||||
}
|
||||
|
||||
// Custom: GetDvProfile gets `AVDOVIDecoderConfigurationRecord.dv_profile` value.
|
||||
// GetDvProfile gets `AVDOVIDecoderConfigurationRecord.dv_profile` value.
|
||||
func (dcr *AVDOVIDecoderConfigurationRecord) GetDvProfile() uint8 {
|
||||
return (uint8)(dcr.dv_profile)
|
||||
}
|
||||
|
||||
// Custom: SetDvProfile sets `AVDOVIDecoderConfigurationRecord.dv_profile` value.
|
||||
// SetDvProfile sets `AVDOVIDecoderConfigurationRecord.dv_profile` value.
|
||||
func (dcr *AVDOVIDecoderConfigurationRecord) SetDvProfile(v uint8) {
|
||||
dcr.dv_profile = (C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetDvProfileAddr gets `AVDOVIDecoderConfigurationRecord.dv_profile` address.
|
||||
// GetDvProfileAddr gets `AVDOVIDecoderConfigurationRecord.dv_profile` address.
|
||||
func (dcr *AVDOVIDecoderConfigurationRecord) GetDvProfileAddr() *uint8 {
|
||||
return (*uint8)(&dcr.dv_profile)
|
||||
}
|
||||
|
||||
// Custom: GetDvLevel gets `AVDOVIDecoderConfigurationRecord.dv_level` value.
|
||||
// GetDvLevel gets `AVDOVIDecoderConfigurationRecord.dv_level` value.
|
||||
func (dcr *AVDOVIDecoderConfigurationRecord) GetDvLevel() uint8 {
|
||||
return (uint8)(dcr.dv_level)
|
||||
}
|
||||
|
||||
// Custom: SetDvLevel sets `AVDOVIDecoderConfigurationRecord.dv_level` value.
|
||||
// SetDvLevel sets `AVDOVIDecoderConfigurationRecord.dv_level` value.
|
||||
func (dcr *AVDOVIDecoderConfigurationRecord) SetDvLevel(v uint8) {
|
||||
dcr.dv_level = (C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetDvLevelAddr gets `AVDOVIDecoderConfigurationRecord.dv_level` address.
|
||||
// GetDvLevelAddr gets `AVDOVIDecoderConfigurationRecord.dv_level` address.
|
||||
func (dcr *AVDOVIDecoderConfigurationRecord) GetDvLevelAddr() *uint8 {
|
||||
return (*uint8)(&dcr.dv_level)
|
||||
}
|
||||
|
||||
// Custom: GetRpuPresentFlag gets `AVDOVIDecoderConfigurationRecord.rpu_present_flag` value.
|
||||
// GetRpuPresentFlag gets `AVDOVIDecoderConfigurationRecord.rpu_present_flag` value.
|
||||
func (dcr *AVDOVIDecoderConfigurationRecord) GetRpuPresentFlag() uint8 {
|
||||
return (uint8)(dcr.rpu_present_flag)
|
||||
}
|
||||
|
||||
// Custom: SetRpuPresentFlag sets `AVDOVIDecoderConfigurationRecord.rpu_present_flag` value.
|
||||
// SetRpuPresentFlag sets `AVDOVIDecoderConfigurationRecord.rpu_present_flag` value.
|
||||
func (dcr *AVDOVIDecoderConfigurationRecord) SetRpuPresentFlag(v uint8) {
|
||||
dcr.rpu_present_flag = (C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetRpuPresentFlagAddr gets `AVDOVIDecoderConfigurationRecord.rpu_present_flag` address.
|
||||
// GetRpuPresentFlagAddr gets `AVDOVIDecoderConfigurationRecord.rpu_present_flag` address.
|
||||
func (dcr *AVDOVIDecoderConfigurationRecord) GetRpuPresentFlagAddr() *uint8 {
|
||||
return (*uint8)(&dcr.rpu_present_flag)
|
||||
}
|
||||
|
||||
// Custom: GetElPresentFlag gets `AVDOVIDecoderConfigurationRecord.el_present_flag` value.
|
||||
// GetElPresentFlag gets `AVDOVIDecoderConfigurationRecord.el_present_flag` value.
|
||||
func (dcr *AVDOVIDecoderConfigurationRecord) GetElPresentFlag() uint8 {
|
||||
return (uint8)(dcr.el_present_flag)
|
||||
}
|
||||
|
||||
// Custom: SetElPresentFlag sets `AVDOVIDecoderConfigurationRecord.el_present_flag` value.
|
||||
// SetElPresentFlag sets `AVDOVIDecoderConfigurationRecord.el_present_flag` value.
|
||||
func (dcr *AVDOVIDecoderConfigurationRecord) SetElPresentFlag(v uint8) {
|
||||
dcr.el_present_flag = (C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetElPresentFlagAddr gets `AVDOVIDecoderConfigurationRecord.el_present_flag` address.
|
||||
// GetElPresentFlagAddr gets `AVDOVIDecoderConfigurationRecord.el_present_flag` address.
|
||||
func (dcr *AVDOVIDecoderConfigurationRecord) GetElPresentFlagAddr() *uint8 {
|
||||
return (*uint8)(&dcr.el_present_flag)
|
||||
}
|
||||
|
||||
// Custom: GetBlPresentFlag gets `AVDOVIDecoderConfigurationRecord.bl_present_flag` value.
|
||||
// GetBlPresentFlag gets `AVDOVIDecoderConfigurationRecord.bl_present_flag` value.
|
||||
func (dcr *AVDOVIDecoderConfigurationRecord) GetBlPresentFlag() uint8 {
|
||||
return (uint8)(dcr.bl_present_flag)
|
||||
}
|
||||
|
||||
// Custom: SetBlPresentFlag sets `AVDOVIDecoderConfigurationRecord.bl_present_flag` value.
|
||||
// SetBlPresentFlag sets `AVDOVIDecoderConfigurationRecord.bl_present_flag` value.
|
||||
func (dcr *AVDOVIDecoderConfigurationRecord) SetBlPresentFlag(v uint8) {
|
||||
dcr.bl_present_flag = (C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetBlPresentFlagAddr gets `AVDOVIDecoderConfigurationRecord.bl_present_flag` address.
|
||||
// GetBlPresentFlagAddr gets `AVDOVIDecoderConfigurationRecord.bl_present_flag` address.
|
||||
func (dcr *AVDOVIDecoderConfigurationRecord) GetBlPresentFlagAddr() *uint8 {
|
||||
return (*uint8)(&dcr.bl_present_flag)
|
||||
}
|
||||
|
||||
// Custom: GetDvBlSignalCompatibilityId
|
||||
// GetDvBlSignalCompatibilityId
|
||||
// gets `AVDOVIDecoderConfigurationRecord.dv_bl_signal_compatibility_id` value.
|
||||
func (dcr *AVDOVIDecoderConfigurationRecord) GetDvBlSignalCompatibilityId() uint8 {
|
||||
return (uint8)(dcr.dv_bl_signal_compatibility_id)
|
||||
}
|
||||
|
||||
// Custom: SetDvBlSignalCompatibilityId
|
||||
// SetDvBlSignalCompatibilityId
|
||||
// sets `AVDOVIDecoderConfigurationRecord.dv_bl_signal_compatibility_id` value.
|
||||
func (dcr *AVDOVIDecoderConfigurationRecord) SetDvBlSignalCompatibilityId(v uint8) {
|
||||
dcr.dv_bl_signal_compatibility_id = (C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetDvBlSignalCompatibilityIdAddr
|
||||
// GetDvBlSignalCompatibilityIdAddr
|
||||
// gets `AVDOVIDecoderConfigurationRecord.dv_bl_signal_compatibility_id` address.
|
||||
func (dcr *AVDOVIDecoderConfigurationRecord) GetDvBlSignalCompatibilityIdAddr() *uint8 {
|
||||
return (*uint8)(&dcr.dv_bl_signal_compatibility_id)
|
||||
|
@@ -19,92 +19,92 @@ const (
|
||||
// AVDownmixInfo
|
||||
type AVDownmixInfo C.struct_AVDownmixInfo
|
||||
|
||||
// Custom: GetPreferredDownmixType gets `AVDownmixInfo.preferred_downmixtype` value.
|
||||
// GetPreferredDownmixType gets `AVDownmixInfo.preferred_downmixtype` value.
|
||||
func (di *AVDownmixInfo) GetPreferredDownmixType() AVDownmixType {
|
||||
return (AVDownmixType)(di.preferred_downmix_type)
|
||||
}
|
||||
|
||||
// Custom: SetPreferredDownmixType sets `AVDownmixInfo.preferred_downmixtype` value.
|
||||
// SetPreferredDownmixType sets `AVDownmixInfo.preferred_downmixtype` value.
|
||||
func (di *AVDownmixInfo) SetPreferredDownmixType(v AVDownmixType) {
|
||||
di.preferred_downmix_type = (C.enum_AVDownmixType)(v)
|
||||
}
|
||||
|
||||
// Custom: GetPreferredDownmixTypeAddr gets `AVDownmixInfo.preferred_downmixtype` address.
|
||||
// GetPreferredDownmixTypeAddr gets `AVDownmixInfo.preferred_downmixtype` address.
|
||||
func (di *AVDownmixInfo) GetPreferredDownmixTypeAddr() *AVDownmixType {
|
||||
return (*AVDownmixType)(&di.preferred_downmix_type)
|
||||
}
|
||||
|
||||
// Custom: GetCenterMixLevel gets `AVDownmixInfo.center_mix_level` value.
|
||||
// GetCenterMixLevel gets `AVDownmixInfo.center_mix_level` value.
|
||||
func (di *AVDownmixInfo) GetCenterMixLevel() float64 {
|
||||
return (float64)(di.center_mix_level)
|
||||
}
|
||||
|
||||
// Custom: SetCenterMixLevel sets `AVDownmixInfo.center_mix_level` value.
|
||||
// SetCenterMixLevel sets `AVDownmixInfo.center_mix_level` value.
|
||||
func (di *AVDownmixInfo) SetCenterMixLevel(v float64) {
|
||||
di.center_mix_level = (C.double)(v)
|
||||
}
|
||||
|
||||
// Custom: GetCenterMixLevelAddr gets `AVDownmixInfo.center_mix_level` address.
|
||||
// GetCenterMixLevelAddr gets `AVDownmixInfo.center_mix_level` address.
|
||||
func (di *AVDownmixInfo) GetCenterMixLevelAddr() *float64 {
|
||||
return (*float64)(&di.center_mix_level)
|
||||
}
|
||||
|
||||
// Custom: GetCenterMixLevelLtrt gets `AVDownmixInfo.center_mix_level_ltrt` value.
|
||||
// GetCenterMixLevelLtrt gets `AVDownmixInfo.center_mix_level_ltrt` value.
|
||||
func (di *AVDownmixInfo) GetCenterMixLevelLtrt() float64 {
|
||||
return (float64)(di.center_mix_level_ltrt)
|
||||
}
|
||||
|
||||
// Custom: SetCenterMixLevelLtrt sets `AVDownmixInfo.center_mix_level_ltrt` value.
|
||||
// SetCenterMixLevelLtrt sets `AVDownmixInfo.center_mix_level_ltrt` value.
|
||||
func (di *AVDownmixInfo) SetCenterMixLevelLtrt(v float64) {
|
||||
di.center_mix_level_ltrt = (C.double)(v)
|
||||
}
|
||||
|
||||
// Custom: GetCenterMixLevelLtrtAddr gets `AVDownmixInfo.center_mix_level_ltrt` address.
|
||||
// GetCenterMixLevelLtrtAddr gets `AVDownmixInfo.center_mix_level_ltrt` address.
|
||||
func (di *AVDownmixInfo) GetCenterMixLevelLtrtAddr() *float64 {
|
||||
return (*float64)(&di.center_mix_level_ltrt)
|
||||
}
|
||||
|
||||
// Custom: GetSurroundMixLevel gets `AVDownmixInfo.surround_mix_level` value.
|
||||
// GetSurroundMixLevel gets `AVDownmixInfo.surround_mix_level` value.
|
||||
func (di *AVDownmixInfo) GetSurroundMixLevel() float64 {
|
||||
return (float64)(di.surround_mix_level)
|
||||
}
|
||||
|
||||
// Custom: SetSurroundMixLevel sets `AVDownmixInfo.surround_mix_level` value.
|
||||
// SetSurroundMixLevel sets `AVDownmixInfo.surround_mix_level` value.
|
||||
func (di *AVDownmixInfo) SetSurroundMixLevel(v float64) {
|
||||
di.surround_mix_level = (C.double)(v)
|
||||
}
|
||||
|
||||
// Custom: GetSurroundMixLevelAddr gets `AVDownmixInfo.surround_mix_level` address.
|
||||
// GetSurroundMixLevelAddr gets `AVDownmixInfo.surround_mix_level` address.
|
||||
func (di *AVDownmixInfo) GetSurroundMixLevelAddr() *float64 {
|
||||
return (*float64)(&di.surround_mix_level)
|
||||
}
|
||||
|
||||
// Custom: GetSurroundMixLevelLtrt gets `AVDownmixInfo.surround_mix_level_ltrt` value.
|
||||
// GetSurroundMixLevelLtrt gets `AVDownmixInfo.surround_mix_level_ltrt` value.
|
||||
func (di *AVDownmixInfo) GetSurroundMixLevelLtrt() float64 {
|
||||
return (float64)(di.surround_mix_level_ltrt)
|
||||
}
|
||||
|
||||
// Custom: SetSurroundMixLevelLtrt sets `AVDownmixInfo.surround_mix_level_ltrt` value.
|
||||
// SetSurroundMixLevelLtrt sets `AVDownmixInfo.surround_mix_level_ltrt` value.
|
||||
func (di *AVDownmixInfo) SetSurroundMixLevelLtrt(v float64) {
|
||||
di.surround_mix_level_ltrt = (C.double)(v)
|
||||
}
|
||||
|
||||
// Custom: GetSurroundMixLevelLtrtAddr gets `AVDownmixInfo.surround_mix_level_ltrt` address.
|
||||
// GetSurroundMixLevelLtrtAddr gets `AVDownmixInfo.surround_mix_level_ltrt` address.
|
||||
func (di *AVDownmixInfo) GetSurroundMixLevelLtrtAddr() *float64 {
|
||||
return (*float64)(&di.surround_mix_level_ltrt)
|
||||
}
|
||||
|
||||
// Custom: GetLfeMixLevel gets `AVDownmixInfo.lfe_mix_level` value.
|
||||
// GetLfeMixLevel gets `AVDownmixInfo.lfe_mix_level` value.
|
||||
func (di *AVDownmixInfo) GetLfeMixLevel() float64 {
|
||||
return (float64)(di.lfe_mix_level)
|
||||
}
|
||||
|
||||
// Custom: SetLfeMixLevel sets `AVDownmixInfo.lfe_mix_level` value.
|
||||
// SetLfeMixLevel sets `AVDownmixInfo.lfe_mix_level` value.
|
||||
func (di *AVDownmixInfo) SetLfeMixLevel(v float64) {
|
||||
di.lfe_mix_level = (C.double)(v)
|
||||
}
|
||||
|
||||
// Custom: GetLfeMixLevelAddr gets `AVDownmixInfo.lfe_mix_level` address.
|
||||
// GetLfeMixLevelAddr gets `AVDownmixInfo.lfe_mix_level` address.
|
||||
func (di *AVDownmixInfo) GetLfeMixLevelAddr() *float64 {
|
||||
return (*float64)(&di.lfe_mix_level)
|
||||
}
|
||||
|
@@ -9,32 +9,32 @@ import "unsafe"
|
||||
// AVSubsampleEncryptionInfo
|
||||
type AVSubsampleEncryptionInfo C.struct_AVSubsampleEncryptionInfo
|
||||
|
||||
// Custom: GetBytesOfClearData gets `AVSubsampleEncryptionInfo.bytes_of_clear_data` value.
|
||||
// GetBytesOfClearData gets `AVSubsampleEncryptionInfo.bytes_of_clear_data` value.
|
||||
func (sei *AVSubsampleEncryptionInfo) GetBytesOfClearData() uint32 {
|
||||
return (uint32)(sei.bytes_of_clear_data)
|
||||
}
|
||||
|
||||
// Custom: SetBytesOfClearData sets `AVSubsampleEncryptionInfo.bytes_of_clear_data` value.
|
||||
// SetBytesOfClearData sets `AVSubsampleEncryptionInfo.bytes_of_clear_data` value.
|
||||
func (sei *AVSubsampleEncryptionInfo) SetBytesOfClearData(v uint32) {
|
||||
sei.bytes_of_clear_data = (C.uint32_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetBytesOfClearDataAddr gets `AVSubsampleEncryptionInfo.bytes_of_clear_data` address.
|
||||
// GetBytesOfClearDataAddr gets `AVSubsampleEncryptionInfo.bytes_of_clear_data` address.
|
||||
func (sei *AVSubsampleEncryptionInfo) GetBytesOfClearDataAddr() *uint32 {
|
||||
return (*uint32)(&sei.bytes_of_clear_data)
|
||||
}
|
||||
|
||||
// Custom: GetBytesOfProtectedData gets `AVSubsampleEncryptionInfo.bytes_of_protected_data` value.
|
||||
// GetBytesOfProtectedData gets `AVSubsampleEncryptionInfo.bytes_of_protected_data` value.
|
||||
func (sei *AVSubsampleEncryptionInfo) GetBytesOfProtectedData() uint32 {
|
||||
return (uint32)(sei.bytes_of_protected_data)
|
||||
}
|
||||
|
||||
// Custom: SetBytesOfProtectedData sets `AVSubsampleEncryptionInfo.bytes_of_protected_data` value.
|
||||
// SetBytesOfProtectedData sets `AVSubsampleEncryptionInfo.bytes_of_protected_data` value.
|
||||
func (sei *AVSubsampleEncryptionInfo) SetBytesOfProtectedData(v uint32) {
|
||||
sei.bytes_of_protected_data = (C.uint32_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetBytesOfProtectedDataAddr gets `AVSubsampleEncryptionInfo.bytes_of_protected_data` address.
|
||||
// GetBytesOfProtectedDataAddr gets `AVSubsampleEncryptionInfo.bytes_of_protected_data` address.
|
||||
func (sei *AVSubsampleEncryptionInfo) GetBytesOfProtectedDataAddr() *uint32 {
|
||||
return (*uint32)(&sei.bytes_of_protected_data)
|
||||
}
|
||||
@@ -42,137 +42,137 @@ func (sei *AVSubsampleEncryptionInfo) GetBytesOfProtectedDataAddr() *uint32 {
|
||||
// AVEncryptionInfo
|
||||
type AVEncryptionInfo C.struct_AVEncryptionInfo
|
||||
|
||||
// Custom: GetScheme gets `AVEncryptionInfo.scheme` value.
|
||||
// GetScheme gets `AVEncryptionInfo.scheme` value.
|
||||
func (ei *AVEncryptionInfo) GetScheme() uint32 {
|
||||
return (uint32)(ei.scheme)
|
||||
}
|
||||
|
||||
// Custom: SetScheme sets `AVEncryptionInfo.scheme` value.
|
||||
// SetScheme sets `AVEncryptionInfo.scheme` value.
|
||||
func (ei *AVEncryptionInfo) SetScheme(v uint32) {
|
||||
ei.scheme = (C.uint32_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetSchemeAddr gets `AVEncryptionInfo.scheme` address.
|
||||
// GetSchemeAddr gets `AVEncryptionInfo.scheme` address.
|
||||
func (ei *AVEncryptionInfo) GetSchemeAddr() *uint32 {
|
||||
return (*uint32)(&ei.scheme)
|
||||
}
|
||||
|
||||
// Custom: GetCryptByteBlock gets `AVEncryptionInfo.crypt_byte_block` value.
|
||||
// GetCryptByteBlock gets `AVEncryptionInfo.crypt_byte_block` value.
|
||||
func (ei *AVEncryptionInfo) GetCryptByteBlock() uint32 {
|
||||
return (uint32)(ei.crypt_byte_block)
|
||||
}
|
||||
|
||||
// Custom: SetCryptByteBlock sets `AVEncryptionInfo.crypt_byte_block` value.
|
||||
// SetCryptByteBlock sets `AVEncryptionInfo.crypt_byte_block` value.
|
||||
func (ei *AVEncryptionInfo) SetCryptByteBlock(v uint32) {
|
||||
ei.crypt_byte_block = (C.uint32_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetCryptByteBlockAddr gets `AVEncryptionInfo.crypt_byte_block` address.
|
||||
// GetCryptByteBlockAddr gets `AVEncryptionInfo.crypt_byte_block` address.
|
||||
func (ei *AVEncryptionInfo) GetCryptByteBlockAddr() *uint32 {
|
||||
return (*uint32)(&ei.crypt_byte_block)
|
||||
}
|
||||
|
||||
// Custom: GetSkipByteBlock gets `AVEncryptionInfo.skip_byte_block` value.
|
||||
// GetSkipByteBlock gets `AVEncryptionInfo.skip_byte_block` value.
|
||||
func (ei *AVEncryptionInfo) GetSkipByteBlock() uint32 {
|
||||
return (uint32)(ei.skip_byte_block)
|
||||
}
|
||||
|
||||
// Custom: SetSkipByteBlock sets `AVEncryptionInfo.skip_byte_block` value.
|
||||
// SetSkipByteBlock sets `AVEncryptionInfo.skip_byte_block` value.
|
||||
func (ei *AVEncryptionInfo) SetSkipByteBlock(v uint32) {
|
||||
ei.skip_byte_block = (C.uint32_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetSkipByteBlockAddr gets `AVEncryptionInfo.skip_byte_block` address.
|
||||
// GetSkipByteBlockAddr gets `AVEncryptionInfo.skip_byte_block` address.
|
||||
func (ei *AVEncryptionInfo) GetSkipByteBlockAddr() *uint32 {
|
||||
return (*uint32)(&ei.skip_byte_block)
|
||||
}
|
||||
|
||||
// Custom: GetKeyId gets `AVEncryptionInfo.key_id` value.
|
||||
// GetKeyId gets `AVEncryptionInfo.key_id` value.
|
||||
func (ei *AVEncryptionInfo) GetKeyId() *uint8 {
|
||||
return (*uint8)(ei.key_id)
|
||||
}
|
||||
|
||||
// Custom: SetKeyId sets `AVEncryptionInfo.key_id` value.
|
||||
// SetKeyId sets `AVEncryptionInfo.key_id` value.
|
||||
func (ei *AVEncryptionInfo) SetKeyId(v *uint8) {
|
||||
ei.key_id = (*C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetKeyIdAddr gets `AVEncryptionInfo.key_id` address.
|
||||
// GetKeyIdAddr gets `AVEncryptionInfo.key_id` address.
|
||||
func (ei *AVEncryptionInfo) GetKeyIdAddr() **uint8 {
|
||||
return (**uint8)(unsafe.Pointer(&ei.key_id))
|
||||
}
|
||||
|
||||
// Custom: GetKeyIdSize gets `AVEncryptionInfo.key_id_size` value.
|
||||
// GetKeyIdSize gets `AVEncryptionInfo.key_id_size` value.
|
||||
func (ei *AVEncryptionInfo) GetKeyIdSize() uint32 {
|
||||
return (uint32)(ei.key_id_size)
|
||||
}
|
||||
|
||||
// Custom: SetKeyIdSize sets `AVEncryptionInfo.key_id_size` value.
|
||||
// SetKeyIdSize sets `AVEncryptionInfo.key_id_size` value.
|
||||
func (ei *AVEncryptionInfo) SetKeyIdSize(v uint32) {
|
||||
ei.key_id_size = (C.uint32_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetKeyIdSizeAddr gets `AVEncryptionInfo.key_id_size` address.
|
||||
// GetKeyIdSizeAddr gets `AVEncryptionInfo.key_id_size` address.
|
||||
func (ei *AVEncryptionInfo) GetKeyIdSizeAddr() *uint32 {
|
||||
return (*uint32)(&ei.key_id_size)
|
||||
}
|
||||
|
||||
// Custom: GetIv gets `AVEncryptionInfo.iv` value.
|
||||
// GetIv gets `AVEncryptionInfo.iv` value.
|
||||
func (ei *AVEncryptionInfo) GetIv() *uint8 {
|
||||
return (*uint8)(ei.iv)
|
||||
}
|
||||
|
||||
// Custom: SetIv sets `AVEncryptionInfo.iv` value.
|
||||
// SetIv sets `AVEncryptionInfo.iv` value.
|
||||
func (ei *AVEncryptionInfo) SetIv(v *uint8) {
|
||||
ei.iv = (*C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetIvAddr gets `AVEncryptionInfo.iv` address.
|
||||
// GetIvAddr gets `AVEncryptionInfo.iv` address.
|
||||
func (ei *AVEncryptionInfo) GetIvAddr() **uint8 {
|
||||
return (**uint8)(unsafe.Pointer(&ei.iv))
|
||||
}
|
||||
|
||||
// Custom: GetIvSize gets `AVEncryptionInfo.iv_size` value.
|
||||
// GetIvSize gets `AVEncryptionInfo.iv_size` value.
|
||||
func (ei *AVEncryptionInfo) GetIvSize() uint32 {
|
||||
return (uint32)(ei.iv_size)
|
||||
}
|
||||
|
||||
// Custom: SetIvSize sets `AVEncryptionInfo.iv_size` value.
|
||||
// SetIvSize sets `AVEncryptionInfo.iv_size` value.
|
||||
func (ei *AVEncryptionInfo) SetIvSize(v uint32) {
|
||||
ei.iv_size = (C.uint32_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetIvSizeAddr gets `AVEncryptionInfo.iv_size` address.
|
||||
// GetIvSizeAddr gets `AVEncryptionInfo.iv_size` address.
|
||||
func (ei *AVEncryptionInfo) GetIvSizeAddr() *uint32 {
|
||||
return (*uint32)(&ei.iv_size)
|
||||
}
|
||||
|
||||
// Custom: GetSubsamples gets `AVEncryptionInfo.subsamples` value.
|
||||
// GetSubsamples gets `AVEncryptionInfo.subsamples` value.
|
||||
func (ei *AVEncryptionInfo) GetSubsamples() *AVSubsampleEncryptionInfo {
|
||||
return (*AVSubsampleEncryptionInfo)(ei.subsamples)
|
||||
}
|
||||
|
||||
// Custom: SetSubsamples sets `AVEncryptionInfo.subsamples` value.
|
||||
// SetSubsamples sets `AVEncryptionInfo.subsamples` value.
|
||||
func (ei *AVEncryptionInfo) SetSubsamples(v *AVSubsampleEncryptionInfo) {
|
||||
ei.subsamples = (*C.struct_AVSubsampleEncryptionInfo)(v)
|
||||
}
|
||||
|
||||
// Custom: GetSubsamplesAddr gets `AVEncryptionInfo.subsamples` address.
|
||||
// GetSubsamplesAddr gets `AVEncryptionInfo.subsamples` address.
|
||||
func (ei *AVEncryptionInfo) GetSubsamplesAddr() **AVSubsampleEncryptionInfo {
|
||||
return (**AVSubsampleEncryptionInfo)(unsafe.Pointer(&ei.subsamples))
|
||||
}
|
||||
|
||||
// Custom: GetSubsampleCount gets `AVEncryptionInfo.subsample_count` value.
|
||||
// GetSubsampleCount gets `AVEncryptionInfo.subsample_count` value.
|
||||
func (ei *AVEncryptionInfo) GetSubsampleCount() uint32 {
|
||||
return (uint32)(ei.subsample_count)
|
||||
}
|
||||
|
||||
// Custom: SetSubsampleCount sets `AVEncryptionInfo.subsample_count` value.
|
||||
// SetSubsampleCount sets `AVEncryptionInfo.subsample_count` value.
|
||||
func (ei *AVEncryptionInfo) SetSubsampleCount(v uint32) {
|
||||
ei.subsample_count = (C.uint32_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetSubsampleCountAddr gets `AVEncryptionInfo.subsample_count` address.
|
||||
// GetSubsampleCountAddr gets `AVEncryptionInfo.subsample_count` address.
|
||||
func (ei *AVEncryptionInfo) GetSubsampleCountAddr() *uint32 {
|
||||
return (*uint32)(&ei.subsample_count)
|
||||
}
|
||||
@@ -180,122 +180,122 @@ func (ei *AVEncryptionInfo) GetSubsampleCountAddr() *uint32 {
|
||||
// AVEncryptionInitInfo
|
||||
type AVEncryptionInitInfo C.struct_AVEncryptionInitInfo
|
||||
|
||||
// Custom: GetSystemId gets `AVEncryptionInitInfo.system_id` value.
|
||||
// GetSystemId gets `AVEncryptionInitInfo.system_id` value.
|
||||
func (eii *AVEncryptionInitInfo) GetSystemId() *uint8 {
|
||||
return (*uint8)(eii.system_id)
|
||||
}
|
||||
|
||||
// Custom: SetSystemId sets `AVEncryptionInitInfo.system_id` value.
|
||||
// SetSystemId sets `AVEncryptionInitInfo.system_id` value.
|
||||
func (eii *AVEncryptionInitInfo) SetSystemId(v *uint8) {
|
||||
eii.system_id = (*C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetSystemIdAddr gets `AVEncryptionInitInfo.system_id` address.
|
||||
// GetSystemIdAddr gets `AVEncryptionInitInfo.system_id` address.
|
||||
func (eii *AVEncryptionInitInfo) GetSystemIdAddr() **uint8 {
|
||||
return (**uint8)(unsafe.Pointer(&eii.system_id))
|
||||
}
|
||||
|
||||
// Custom: GetSystemIdSize gets `AVEncryptionInitInfo.system_id_size` value.
|
||||
// GetSystemIdSize gets `AVEncryptionInitInfo.system_id_size` value.
|
||||
func (eii *AVEncryptionInitInfo) GetSystemIdSize() uint32 {
|
||||
return (uint32)(eii.system_id_size)
|
||||
}
|
||||
|
||||
// Custom: SetSystemIdSize sets `AVEncryptionInitInfo.system_id_size` value.
|
||||
// SetSystemIdSize sets `AVEncryptionInitInfo.system_id_size` value.
|
||||
func (eii *AVEncryptionInitInfo) SetSystemIdSize(v uint32) {
|
||||
eii.system_id_size = (C.uint32_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetSystemIdSizeAddr gets `AVEncryptionInitInfo.system_id_size` address.
|
||||
// GetSystemIdSizeAddr gets `AVEncryptionInitInfo.system_id_size` address.
|
||||
func (eii *AVEncryptionInitInfo) GetSystemIdSizeAddr() *uint32 {
|
||||
return (*uint32)(&eii.system_id_size)
|
||||
}
|
||||
|
||||
// Custom: GetKeyIds gets `AVEncryptionInitInfo.key_ids` value.
|
||||
// GetKeyIds gets `AVEncryptionInitInfo.key_ids` value.
|
||||
func (eii *AVEncryptionInitInfo) GetKeyIds() []*uint8 {
|
||||
return unsafe.Slice((**uint8)(unsafe.Pointer(eii.key_ids)), eii.key_id_size)
|
||||
}
|
||||
|
||||
// Custom: SetKeyIds sets `AVEncryptionInitInfo.key_ids` value.
|
||||
// SetKeyIds sets `AVEncryptionInitInfo.key_ids` value.
|
||||
func (eii *AVEncryptionInitInfo) SetKeyIds(v **uint8) {
|
||||
eii.key_ids = (**C.uint8_t)(unsafe.Pointer(v))
|
||||
}
|
||||
|
||||
// Custom: GetKeyIdsAddr gets `AVEncryptionInitInfo.key_ids` address.
|
||||
// GetKeyIdsAddr gets `AVEncryptionInitInfo.key_ids` address.
|
||||
func (eii *AVEncryptionInitInfo) GetKeyIdsAddr() ***uint8 {
|
||||
return (***uint8)(unsafe.Pointer(&eii.key_ids))
|
||||
}
|
||||
|
||||
// Custom: GetNumKeyIds gets `AVEncryptionInitInfo.num_key_ids` value.
|
||||
// GetNumKeyIds gets `AVEncryptionInitInfo.num_key_ids` value.
|
||||
func (eii *AVEncryptionInitInfo) GetNumKeyIds() uint32 {
|
||||
return (uint32)(eii.num_key_ids)
|
||||
}
|
||||
|
||||
// Custom: SetNumKeyIds sets `AVEncryptionInitInfo.num_key_ids` value.
|
||||
// SetNumKeyIds sets `AVEncryptionInitInfo.num_key_ids` value.
|
||||
func (eii *AVEncryptionInitInfo) SetNumKeyIds(v uint32) {
|
||||
eii.num_key_ids = (C.uint32_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetNumKeyIdsAddr gets `AVEncryptionInitInfo.num_key_ids` address.
|
||||
// GetNumKeyIdsAddr gets `AVEncryptionInitInfo.num_key_ids` address.
|
||||
func (eii *AVEncryptionInitInfo) GetNumKeyIdsAddr() *uint32 {
|
||||
return (*uint32)(&eii.num_key_ids)
|
||||
}
|
||||
|
||||
// Custom: GetKeyIdSize gets `AVEncryptionInitInfo.key_id_size` value.
|
||||
// GetKeyIdSize gets `AVEncryptionInitInfo.key_id_size` value.
|
||||
func (eii *AVEncryptionInitInfo) GetKeyIdSize() uint32 {
|
||||
return (uint32)(eii.key_id_size)
|
||||
}
|
||||
|
||||
// Custom: SetKeyIdSize sets `AVEncryptionInitInfo.key_id_size` value.
|
||||
// SetKeyIdSize sets `AVEncryptionInitInfo.key_id_size` value.
|
||||
func (eii *AVEncryptionInitInfo) SetKeyIdSize(v uint32) {
|
||||
eii.key_id_size = (C.uint32_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetKeyIdSizeAddr gets `AVEncryptionInitInfo.key_id_size` address.
|
||||
// GetKeyIdSizeAddr gets `AVEncryptionInitInfo.key_id_size` address.
|
||||
func (eii *AVEncryptionInitInfo) GetKeyIdSizeAddr() *uint32 {
|
||||
return (*uint32)(&eii.key_id_size)
|
||||
}
|
||||
|
||||
// Custom: GetData gets `AVEncryptionInitInfo.data` value.
|
||||
// GetData gets `AVEncryptionInitInfo.data` value.
|
||||
func (eii *AVEncryptionInitInfo) GetData() *uint8 {
|
||||
return (*uint8)(eii.data)
|
||||
}
|
||||
|
||||
// Custom: SetData sets `AVEncryptionInitInfo.data` value.
|
||||
// SetData sets `AVEncryptionInitInfo.data` value.
|
||||
func (eii *AVEncryptionInitInfo) SetData(v *uint8) {
|
||||
eii.data = (*C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetDataAddr gets `AVEncryptionInitInfo.data` address.
|
||||
// GetDataAddr gets `AVEncryptionInitInfo.data` address.
|
||||
func (eii *AVEncryptionInitInfo) GetDataAddr() **uint8 {
|
||||
return (**uint8)(unsafe.Pointer(&eii.data))
|
||||
}
|
||||
|
||||
// Custom: GetDataSize gets `AVEncryptionInitInfo.data_size` value.
|
||||
// GetDataSize gets `AVEncryptionInitInfo.data_size` value.
|
||||
func (eii *AVEncryptionInitInfo) GetDataSize() uint32 {
|
||||
return (uint32)(eii.data_size)
|
||||
}
|
||||
|
||||
// Custom: SetDataSize sets `AVEncryptionInitInfo.data_size` value.
|
||||
// SetDataSize sets `AVEncryptionInitInfo.data_size` value.
|
||||
func (eii *AVEncryptionInitInfo) SetDataSize(v uint32) {
|
||||
eii.data_size = (C.uint32_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetDataSizeAddr gets `AVEncryptionInitInfo.data_size` address.
|
||||
// GetDataSizeAddr gets `AVEncryptionInitInfo.data_size` address.
|
||||
func (eii *AVEncryptionInitInfo) GetDataSizeAddr() *uint32 {
|
||||
return (*uint32)(&eii.data_size)
|
||||
}
|
||||
|
||||
// Custom: GetNext gets `AVEncryptionInitInfo.next` value.
|
||||
// GetNext gets `AVEncryptionInitInfo.next` value.
|
||||
func (eii *AVEncryptionInitInfo) GetNext() *AVEncryptionInitInfo {
|
||||
return (*AVEncryptionInitInfo)(eii.next)
|
||||
}
|
||||
|
||||
// Custom: SetNext sets `AVEncryptionInitInfo.next` value.
|
||||
// SetNext sets `AVEncryptionInitInfo.next` value.
|
||||
func (eii *AVEncryptionInitInfo) SetNext(v *AVEncryptionInitInfo) {
|
||||
eii.next = (*C.struct_AVEncryptionInitInfo)(v)
|
||||
}
|
||||
|
||||
// Custom: GetNextAddr gets `AVEncryptionInitInfo.next` address.
|
||||
// GetNextAddr gets `AVEncryptionInitInfo.next` address.
|
||||
func (eii *AVEncryptionInitInfo) GetNextAddr() **AVEncryptionInitInfo {
|
||||
return (**AVEncryptionInitInfo)(unsafe.Pointer(&eii.next))
|
||||
}
|
||||
|
@@ -7,7 +7,7 @@ package ffmpeg
|
||||
import "C"
|
||||
|
||||
// AVERROR returns a negative error code from a POSIX error code, to return from library functions.
|
||||
func AVERROR[T HelperInteger](ie T) (oe int32) {
|
||||
func AVERROR[T Integer](ie T) (oe int32) {
|
||||
oe = (int32)(ie)
|
||||
if C.EDOM > 0 {
|
||||
return (-oe)
|
||||
|
@@ -15,12 +15,12 @@ import "unsafe"
|
||||
type AVFifoBuffer C.struct_AVFifoBuffer
|
||||
|
||||
// AvFifoAlloc initializes an AVFifoBuffer.
|
||||
func AvFifoAlloc[T HelperInteger](size T) *AVFifoBuffer {
|
||||
func AvFifoAlloc[T Integer](size T) *AVFifoBuffer {
|
||||
return (*AVFifoBuffer)(C.av_fifo_alloc((C.uint)(size)))
|
||||
}
|
||||
|
||||
// AvFifoAllocArray initializes an AVFifoBuffer.
|
||||
func AvFifoAllocArray[U, V HelperInteger](nmemb U, size V) *AVFifoBuffer {
|
||||
func AvFifoAllocArray[U, V Integer](nmemb U, size V) *AVFifoBuffer {
|
||||
return (*AVFifoBuffer)(C.av_fifo_alloc_array((C.size_t)(nmemb), (C.size_t)(size)))
|
||||
}
|
||||
|
||||
@@ -89,22 +89,22 @@ func AvFifoGenericWrite(f *AVFifoBuffer, src CVoidPointer,
|
||||
}
|
||||
|
||||
// AvFifoRealloc2 resizes an AVFifoBuffer.
|
||||
func AvFifoRealloc2[T HelperInteger](f *AVFifoBuffer, size T) int32 {
|
||||
func AvFifoRealloc2[T Integer](f *AVFifoBuffer, size T) int32 {
|
||||
return (int32)(C.av_fifo_realloc2((*C.struct_AVFifoBuffer)(f), (C.uint)(size)))
|
||||
}
|
||||
|
||||
// AvFifoGrow enlarges an AVFifoBuffer.
|
||||
func AvFifoGrow[T HelperInteger](f *AVFifoBuffer, additionalSpace T) int32 {
|
||||
func AvFifoGrow[T Integer](f *AVFifoBuffer, additionalSpace T) int32 {
|
||||
return (int32)(C.av_fifo_grow((*C.struct_AVFifoBuffer)(f), (C.uint)(additionalSpace)))
|
||||
}
|
||||
|
||||
// AvFifoDrain reads and discards the specified amount of data from an AVFifoBuffer.
|
||||
func AvFifoDrain[T HelperInteger](f *AVFifoBuffer, size T) {
|
||||
func AvFifoDrain[T Integer](f *AVFifoBuffer, size T) {
|
||||
C.av_fifo_drain((*C.struct_AVFifoBuffer)(f), (C.int)(size))
|
||||
}
|
||||
|
||||
// AvFifoPeek2 returns a pointer to the data stored in a FIFO buffer at a certain offset.
|
||||
// The FIFO buffer is not modified.
|
||||
func AvFifoPeek2[T HelperInteger](f *AVFifoBuffer, offs T) *uint8 {
|
||||
func AvFifoPeek2[T Integer](f *AVFifoBuffer, offs T) *uint8 {
|
||||
return (*uint8)(C.av_fifo_peek2((*C.struct_AVFifoBuffer)(f), (C.int)(offs)))
|
||||
}
|
||||
|
@@ -29,22 +29,22 @@ const (
|
||||
// AVFilmGrainAOMParams
|
||||
type AVFilmGrainAOMParams C.struct_AVFilmGrainAOMParams
|
||||
|
||||
// Custom: GetNumYPoints gets `AVFilmGrainAOMParams.num_y_points` value.
|
||||
// GetNumYPoints gets `AVFilmGrainAOMParams.num_y_points` value.
|
||||
func (aomp *AVFilmGrainAOMParams) GetNumYPoints() int32 {
|
||||
return (int32)(aomp.num_y_points)
|
||||
}
|
||||
|
||||
// Custom: SetNumYPoints sets `AVFilmGrainAOMParams.num_y_points` value.
|
||||
// SetNumYPoints sets `AVFilmGrainAOMParams.num_y_points` value.
|
||||
func (aomp *AVFilmGrainAOMParams) SetNumYPoints(v int32) {
|
||||
aomp.num_y_points = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetNumYPointsAddr gets `AVFilmGrainAOMParams.num_y_points` address.
|
||||
// GetNumYPointsAddr gets `AVFilmGrainAOMParams.num_y_points` address.
|
||||
func (aomp *AVFilmGrainAOMParams) GetNumYPointsAddr() *int32 {
|
||||
return (*int32)(&aomp.num_y_points)
|
||||
}
|
||||
|
||||
// Custom: GetYPoints gets `AVFilmGrainAOMParams.y_points` value.
|
||||
// GetYPoints gets `AVFilmGrainAOMParams.y_points` value.
|
||||
func (aomp *AVFilmGrainAOMParams) GetYPoints() (v [][]uint8) {
|
||||
for i := 0; i < 14; i++ {
|
||||
v = append(v, unsafe.Slice((*uint8)(&aomp.y_points[i][0]), 2))
|
||||
@@ -52,7 +52,7 @@ func (aomp *AVFilmGrainAOMParams) GetYPoints() (v [][]uint8) {
|
||||
return v
|
||||
}
|
||||
|
||||
// Custom: SetYPoints sets `AVFilmGrainAOMParams.y_points` value.
|
||||
// SetYPoints sets `AVFilmGrainAOMParams.y_points` value.
|
||||
func (aomp *AVFilmGrainAOMParams) SetYPoints(v [][]uint8) {
|
||||
for i := 0; i < FFMIN(len(v), 14); i++ {
|
||||
for j := 0; j < FFMIN(len(v[i]), 2); j++ {
|
||||
@@ -61,44 +61,44 @@ func (aomp *AVFilmGrainAOMParams) SetYPoints(v [][]uint8) {
|
||||
}
|
||||
}
|
||||
|
||||
// Custom: GetYPointsAddr gets `AVFilmGrainAOMParams.y_points` address.
|
||||
// GetYPointsAddr gets `AVFilmGrainAOMParams.y_points` address.
|
||||
func (aomp *AVFilmGrainAOMParams) GetYPointsAddr() **uint8 {
|
||||
return (**uint8)(unsafe.Pointer(&aomp.y_points))
|
||||
}
|
||||
|
||||
// Custom: GetChromaScalingFromLuma gets `AVFilmGrainAOMParams.chroma_scaling_from_luma` value.
|
||||
// GetChromaScalingFromLuma gets `AVFilmGrainAOMParams.chroma_scaling_from_luma` value.
|
||||
func (aomp *AVFilmGrainAOMParams) GetChromaScalingFromLuma() int32 {
|
||||
return (int32)(aomp.chroma_scaling_from_luma)
|
||||
}
|
||||
|
||||
// Custom: SetChromaScalingFromLuma sets `AVFilmGrainAOMParams.chroma_scaling_from_luma` value.
|
||||
// SetChromaScalingFromLuma sets `AVFilmGrainAOMParams.chroma_scaling_from_luma` value.
|
||||
func (aomp *AVFilmGrainAOMParams) SetChromaScalingFromLuma(v int32) {
|
||||
aomp.chroma_scaling_from_luma = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetChromaScalingFromLumaAddr gets `AVFilmGrainAOMParams.chroma_scaling_from_luma` address.
|
||||
// GetChromaScalingFromLumaAddr gets `AVFilmGrainAOMParams.chroma_scaling_from_luma` address.
|
||||
func (aomp *AVFilmGrainAOMParams) GetChromaScalingFromLumaAddr() *int32 {
|
||||
return (*int32)(&aomp.chroma_scaling_from_luma)
|
||||
}
|
||||
|
||||
// Custom: GetNumUvPoints gets `AVFilmGrainAOMParams.num_uv_points` value.
|
||||
// GetNumUvPoints gets `AVFilmGrainAOMParams.num_uv_points` value.
|
||||
func (aomp *AVFilmGrainAOMParams) GetNumUvPoints() []int32 {
|
||||
return unsafe.Slice((*int32)(&aomp.num_uv_points[0]), 2)
|
||||
}
|
||||
|
||||
// Custom: SetNumUvPoints sets `AVFilmGrainAOMParams.num_uv_points` value.
|
||||
// SetNumUvPoints sets `AVFilmGrainAOMParams.num_uv_points` value.
|
||||
func (aomp *AVFilmGrainAOMParams) SetNumUvPoints(v []int32) {
|
||||
for i := 0; i < FFMIN(len(v), 2); i++ {
|
||||
aomp.num_uv_points[i] = (C.int)(v[i])
|
||||
}
|
||||
}
|
||||
|
||||
// Custom: GetNumUvPointsAddr gets `AVFilmGrainAOMParams.num_uv_points` address.
|
||||
// GetNumUvPointsAddr gets `AVFilmGrainAOMParams.num_uv_points` address.
|
||||
func (aomp *AVFilmGrainAOMParams) GetNumUvPointsAddr() **int32 {
|
||||
return (**int32)(unsafe.Pointer(&aomp.num_uv_points))
|
||||
}
|
||||
|
||||
// Custom: GetUvPoints gets `AVFilmGrainAOMParams.uv_points` value.
|
||||
// GetUvPoints gets `AVFilmGrainAOMParams.uv_points` value.
|
||||
func (aomp *AVFilmGrainAOMParams) GetUvPoints() (v [][][]uint8) {
|
||||
for i := 0; i < 2; i++ {
|
||||
tmp := [][]uint8{}
|
||||
@@ -110,7 +110,7 @@ func (aomp *AVFilmGrainAOMParams) GetUvPoints() (v [][][]uint8) {
|
||||
return v
|
||||
}
|
||||
|
||||
// Custom: SetUvPoints sets `AVFilmGrainAOMParams.uv_points` value.
|
||||
// SetUvPoints sets `AVFilmGrainAOMParams.uv_points` value.
|
||||
func (aomp *AVFilmGrainAOMParams) SetUvPoints(v [][][]uint8) {
|
||||
for i := 0; i < FFMIN(len(v), 2); i++ {
|
||||
for j := 0; j < FFMIN(len(v[i]), 10); j++ {
|
||||
@@ -121,59 +121,59 @@ func (aomp *AVFilmGrainAOMParams) SetUvPoints(v [][][]uint8) {
|
||||
}
|
||||
}
|
||||
|
||||
// Custom: GetUvPointsAddr gets `AVFilmGrainAOMParams.uv_points` address.
|
||||
// GetUvPointsAddr gets `AVFilmGrainAOMParams.uv_points` address.
|
||||
func (aomp *AVFilmGrainAOMParams) GetUvPointsAddr() **uint8 {
|
||||
return (**uint8)(unsafe.Pointer(&aomp.uv_points))
|
||||
}
|
||||
|
||||
// Custom: GetScalingShift gets `AVFilmGrainAOMParams.scaling_shift` value.
|
||||
// GetScalingShift gets `AVFilmGrainAOMParams.scaling_shift` value.
|
||||
func (aomp *AVFilmGrainAOMParams) GetScalingShift() int32 {
|
||||
return (int32)(aomp.scaling_shift)
|
||||
}
|
||||
|
||||
// Custom: SetScalingShift sets `AVFilmGrainAOMParams.scaling_shift` value.
|
||||
// SetScalingShift sets `AVFilmGrainAOMParams.scaling_shift` value.
|
||||
func (aomp *AVFilmGrainAOMParams) SetScalingShift(v int32) {
|
||||
aomp.scaling_shift = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetScalingShiftAddr gets `AVFilmGrainAOMParams.scaling_shift` address.
|
||||
// GetScalingShiftAddr gets `AVFilmGrainAOMParams.scaling_shift` address.
|
||||
func (aomp *AVFilmGrainAOMParams) GetScalingShiftAddr() *int32 {
|
||||
return (*int32)(&aomp.scaling_shift)
|
||||
}
|
||||
|
||||
// Custom: GetArCoeffLag gets `AVFilmGrainAOMParams.ar_coeff_lag` value.
|
||||
// GetArCoeffLag gets `AVFilmGrainAOMParams.ar_coeff_lag` value.
|
||||
func (aomp *AVFilmGrainAOMParams) GetArCoeffLag() int32 {
|
||||
return (int32)(aomp.ar_coeff_lag)
|
||||
}
|
||||
|
||||
// Custom: SetArCoeffLag sets `AVFilmGrainAOMParams.ar_coeff_lag` value.
|
||||
// SetArCoeffLag sets `AVFilmGrainAOMParams.ar_coeff_lag` value.
|
||||
func (aomp *AVFilmGrainAOMParams) SetArCoeffLag(v int32) {
|
||||
aomp.ar_coeff_lag = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetArCoeffLagAddr gets `AVFilmGrainAOMParams.ar_coeff_lag` address.
|
||||
// GetArCoeffLagAddr gets `AVFilmGrainAOMParams.ar_coeff_lag` address.
|
||||
func (aomp *AVFilmGrainAOMParams) GetArCoeffLagAddr() *int32 {
|
||||
return (*int32)(&aomp.ar_coeff_lag)
|
||||
}
|
||||
|
||||
// Custom: GetArCoeffsY gets `AVFilmGrainAOMParams.ar_coeffs_y` value.
|
||||
// GetArCoeffsY gets `AVFilmGrainAOMParams.ar_coeffs_y` value.
|
||||
func (aomp *AVFilmGrainAOMParams) GetArCoeffsY() []int8 {
|
||||
return unsafe.Slice((*int8)(&aomp.ar_coeffs_y[0]), 24)
|
||||
}
|
||||
|
||||
// Custom: SetArCoeffsY sets `AVFilmGrainAOMParams.ar_coeffs_y` value.
|
||||
// SetArCoeffsY sets `AVFilmGrainAOMParams.ar_coeffs_y` value.
|
||||
func (aomp *AVFilmGrainAOMParams) SetArCoeffsY(v []int8) {
|
||||
for i := 0; i < FFMIN(len(v), 24); i++ {
|
||||
aomp.ar_coeffs_y[i] = (C.int8_t)(v[i])
|
||||
}
|
||||
}
|
||||
|
||||
// Custom: GetArCoeffsYAddr gets `AVFilmGrainAOMParams.ar_coeffs_y` address.
|
||||
// GetArCoeffsYAddr gets `AVFilmGrainAOMParams.ar_coeffs_y` address.
|
||||
func (aomp *AVFilmGrainAOMParams) GetArCoeffsYAddr() **int8 {
|
||||
return (**int8)(unsafe.Pointer(&aomp.ar_coeffs_y))
|
||||
}
|
||||
|
||||
// Custom: GetArCoeffsUv gets `AVFilmGrainAOMParams.ar_coeffs_uv` value.
|
||||
// GetArCoeffsUv gets `AVFilmGrainAOMParams.ar_coeffs_uv` value.
|
||||
func (aomp *AVFilmGrainAOMParams) GetArCoeffsUv() (v [][]int8) {
|
||||
for i := 0; i < 2; i++ {
|
||||
v = append(v, unsafe.Slice((*int8)(&aomp.ar_coeffs_uv[i][0]), 25))
|
||||
@@ -181,7 +181,7 @@ func (aomp *AVFilmGrainAOMParams) GetArCoeffsUv() (v [][]int8) {
|
||||
return v
|
||||
}
|
||||
|
||||
// Custom: SetArCoeffsUv sets `AVFilmGrainAOMParams.ar_coeffs_uv` value.
|
||||
// SetArCoeffsUv sets `AVFilmGrainAOMParams.ar_coeffs_uv` value.
|
||||
func (aomp *AVFilmGrainAOMParams) SetArCoeffsUv(v [][]int8) {
|
||||
for i := 0; i < FFMIN(len(v), 2); i++ {
|
||||
for j := 0; j < FFMIN(len(v[i]), 25); j++ {
|
||||
@@ -190,118 +190,118 @@ func (aomp *AVFilmGrainAOMParams) SetArCoeffsUv(v [][]int8) {
|
||||
}
|
||||
}
|
||||
|
||||
// Custom: GetArCoeffsUvAddr gets `AVFilmGrainAOMParams.ar_coeffs_uv` address.
|
||||
// GetArCoeffsUvAddr gets `AVFilmGrainAOMParams.ar_coeffs_uv` address.
|
||||
func (aomp *AVFilmGrainAOMParams) GetArCoeffsUvAddr() **int8 {
|
||||
return (**int8)(unsafe.Pointer(&aomp.ar_coeffs_uv))
|
||||
}
|
||||
|
||||
// Custom: GetArCoeffShift gets `AVFilmGrainAOMParams.ar_coeff_shift` value.
|
||||
// GetArCoeffShift gets `AVFilmGrainAOMParams.ar_coeff_shift` value.
|
||||
func (aomp *AVFilmGrainAOMParams) GetArCoeffShift() int32 {
|
||||
return (int32)(aomp.ar_coeff_shift)
|
||||
}
|
||||
|
||||
// Custom: SetArCoeffShift sets `AVFilmGrainAOMParams.ar_coeff_shift` value.
|
||||
// SetArCoeffShift sets `AVFilmGrainAOMParams.ar_coeff_shift` value.
|
||||
func (aomp *AVFilmGrainAOMParams) SetArCoeffShift(v int32) {
|
||||
aomp.ar_coeff_shift = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetArCoeffShiftAddr gets `AVFilmGrainAOMParams.ar_coeff_shift` address.
|
||||
// GetArCoeffShiftAddr gets `AVFilmGrainAOMParams.ar_coeff_shift` address.
|
||||
func (aomp *AVFilmGrainAOMParams) GetArCoeffShiftAddr() *int32 {
|
||||
return (*int32)(&aomp.ar_coeff_shift)
|
||||
}
|
||||
|
||||
// Custom: GetGrainScaleShift gets `AVFilmGrainAOMParams.grain_scale_shift` value.
|
||||
// GetGrainScaleShift gets `AVFilmGrainAOMParams.grain_scale_shift` value.
|
||||
func (aomp *AVFilmGrainAOMParams) GetGrainScaleShift() int32 {
|
||||
return (int32)(aomp.grain_scale_shift)
|
||||
}
|
||||
|
||||
// Custom: SetGrainScaleShift sets `AVFilmGrainAOMParams.grain_scale_shift` value.
|
||||
// SetGrainScaleShift sets `AVFilmGrainAOMParams.grain_scale_shift` value.
|
||||
func (aomp *AVFilmGrainAOMParams) SetGrainScaleShift(v int32) {
|
||||
aomp.grain_scale_shift = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetGrainScaleShiftAddr gets `AVFilmGrainAOMParams.grain_scale_shift` address.
|
||||
// GetGrainScaleShiftAddr gets `AVFilmGrainAOMParams.grain_scale_shift` address.
|
||||
func (aomp *AVFilmGrainAOMParams) GetGrainScaleShiftAddr() *int32 {
|
||||
return (*int32)(&aomp.grain_scale_shift)
|
||||
}
|
||||
|
||||
// Custom: GetUvMult gets `AVFilmGrainAOMParams.uv_mult` value.
|
||||
// GetUvMult gets `AVFilmGrainAOMParams.uv_mult` value.
|
||||
func (aomp *AVFilmGrainAOMParams) GetUvMult() []int32 {
|
||||
return unsafe.Slice((*int32)(&aomp.uv_mult[0]), 2)
|
||||
}
|
||||
|
||||
// Custom: SetUvMult sets `AVFilmGrainAOMParams.uv_mult` value.
|
||||
// SetUvMult sets `AVFilmGrainAOMParams.uv_mult` value.
|
||||
func (aomp *AVFilmGrainAOMParams) SetUvMult(v []int32) {
|
||||
for i := 0; i < FFMIN(len(v), 2); i++ {
|
||||
aomp.uv_mult[i] = (C.int)(v[i])
|
||||
}
|
||||
}
|
||||
|
||||
// Custom: GetUvMultAddr gets `AVFilmGrainAOMParams.uv_mult` address.
|
||||
// GetUvMultAddr gets `AVFilmGrainAOMParams.uv_mult` address.
|
||||
func (aomp *AVFilmGrainAOMParams) GetUvMultAddr() **int32 {
|
||||
return (**int32)(unsafe.Pointer(&aomp.uv_mult))
|
||||
}
|
||||
|
||||
// Custom: GetUvMultLuma gets `AVFilmGrainAOMParams.uv_mult_luma` value.
|
||||
// GetUvMultLuma gets `AVFilmGrainAOMParams.uv_mult_luma` value.
|
||||
func (aomp *AVFilmGrainAOMParams) GetUvMultLuma() []int32 {
|
||||
return unsafe.Slice((*int32)(&aomp.uv_mult_luma[0]), 2)
|
||||
}
|
||||
|
||||
// Custom: SetUvMultLuma sets `AVFilmGrainAOMParams.uv_mult_luma` value.
|
||||
// SetUvMultLuma sets `AVFilmGrainAOMParams.uv_mult_luma` value.
|
||||
func (aomp *AVFilmGrainAOMParams) SetUvMultLuma(v []int32) {
|
||||
for i := 0; i < FFMIN(len(v), 2); i++ {
|
||||
aomp.uv_mult_luma[i] = (C.int)(v[i])
|
||||
}
|
||||
}
|
||||
|
||||
// Custom: GetUvMultLumaAddr gets `AVFilmGrainAOMParams.uv_mult_luma` address.
|
||||
// GetUvMultLumaAddr gets `AVFilmGrainAOMParams.uv_mult_luma` address.
|
||||
func (aomp *AVFilmGrainAOMParams) GetUvMultLumaAddr() **int32 {
|
||||
return (**int32)(unsafe.Pointer(&aomp.uv_mult_luma))
|
||||
}
|
||||
|
||||
// Custom: GetUvOffset gets `AVFilmGrainAOMParams.uv_offset` value.
|
||||
// GetUvOffset gets `AVFilmGrainAOMParams.uv_offset` value.
|
||||
func (aomp *AVFilmGrainAOMParams) GetUvOffset() []int32 {
|
||||
return unsafe.Slice((*int32)(&aomp.uv_offset[0]), 2)
|
||||
}
|
||||
|
||||
// Custom: SetUvOffset sets `AVFilmGrainAOMParams.uv_offset` value.
|
||||
// SetUvOffset sets `AVFilmGrainAOMParams.uv_offset` value.
|
||||
func (aomp *AVFilmGrainAOMParams) SetUvOffset(v []int32) {
|
||||
for i := 0; i < FFMIN(len(v), 2); i++ {
|
||||
aomp.uv_offset[i] = (C.int)(v[i])
|
||||
}
|
||||
}
|
||||
|
||||
// Custom: GetUvOffsetAddr gets `AVFilmGrainAOMParams.uv_offset` address.
|
||||
// GetUvOffsetAddr gets `AVFilmGrainAOMParams.uv_offset` address.
|
||||
func (aomp *AVFilmGrainAOMParams) GetUvOffsetAddr() **int32 {
|
||||
return (**int32)(unsafe.Pointer(&aomp.uv_offset))
|
||||
}
|
||||
|
||||
// Custom: GetOverlapFlag gets `AVFilmGrainAOMParams.overlap_flag` value.
|
||||
// GetOverlapFlag gets `AVFilmGrainAOMParams.overlap_flag` value.
|
||||
func (aomp *AVFilmGrainAOMParams) GetOverlapFlag() int32 {
|
||||
return (int32)(aomp.overlap_flag)
|
||||
}
|
||||
|
||||
// Custom: SetOverlapFlag sets `AVFilmGrainAOMParams.overlap_flag` value.
|
||||
// SetOverlapFlag sets `AVFilmGrainAOMParams.overlap_flag` value.
|
||||
func (aomp *AVFilmGrainAOMParams) SetOverlapFlag(v int32) {
|
||||
aomp.overlap_flag = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetOverlapFlagAddr gets `AVFilmGrainAOMParams.overlap_flag` address.
|
||||
// GetOverlapFlagAddr gets `AVFilmGrainAOMParams.overlap_flag` address.
|
||||
func (aomp *AVFilmGrainAOMParams) GetOverlapFlagAddr() *int32 {
|
||||
return (*int32)(&aomp.overlap_flag)
|
||||
}
|
||||
|
||||
// Custom: GetLimitOutputRange gets `AVFilmGrainAOMParams.limit_outputrange` value.
|
||||
// GetLimitOutputRange gets `AVFilmGrainAOMParams.limit_outputrange` value.
|
||||
func (aomp *AVFilmGrainAOMParams) GetLimitOutputRange() int32 {
|
||||
return (int32)(aomp.limit_output_range)
|
||||
}
|
||||
|
||||
// Custom: SetLimitOutputRange sets `AVFilmGrainAOMParams.limit_outputrange` value.
|
||||
// SetLimitOutputRange sets `AVFilmGrainAOMParams.limit_outputrange` value.
|
||||
func (aomp *AVFilmGrainAOMParams) SetLimitOutputRange(v int32) {
|
||||
aomp.limit_output_range = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetLimitOutputRangeAddr gets `AVFilmGrainAOMParams.limit_outputrange` address.
|
||||
// GetLimitOutputRangeAddr gets `AVFilmGrainAOMParams.limit_outputrange` address.
|
||||
func (aomp *AVFilmGrainAOMParams) GetLimitOutputRangeAddr() *int32 {
|
||||
return (*int32)(&aomp.limit_output_range)
|
||||
}
|
||||
@@ -309,49 +309,49 @@ func (aomp *AVFilmGrainAOMParams) GetLimitOutputRangeAddr() *int32 {
|
||||
// AVFilmGrainParams
|
||||
type AVFilmGrainParams C.struct_AVFilmGrainParams
|
||||
|
||||
// Custom: GetType gets `AVFilmGrainParams.type` value.
|
||||
// GetType gets `AVFilmGrainParams.type` value.
|
||||
func (fgp *AVFilmGrainParams) GetType() AVFilmGrainParamsType {
|
||||
return (AVFilmGrainParamsType)(fgp._type)
|
||||
}
|
||||
|
||||
// Custom: SetType sets `AVFilmGrainParams.type` value.
|
||||
// SetType sets `AVFilmGrainParams.type` value.
|
||||
func (fgp *AVFilmGrainParams) SetType(v AVFilmGrainParamsType) {
|
||||
fgp._type = (C.enum_AVFilmGrainParamsType)(v)
|
||||
}
|
||||
|
||||
// Custom: GetTypeAddr gets `AVFilmGrainParams.type` address.
|
||||
// GetTypeAddr gets `AVFilmGrainParams.type` address.
|
||||
func (fgp *AVFilmGrainParams) GetTypeAddr() *AVFilmGrainParamsType {
|
||||
return (*AVFilmGrainParamsType)(&fgp._type)
|
||||
}
|
||||
|
||||
// Custom: GetSeed gets `AVFilmGrainParams.seed` value.
|
||||
// GetSeed gets `AVFilmGrainParams.seed` value.
|
||||
func (fgp *AVFilmGrainParams) GetSeed() uint64 {
|
||||
return (uint64)(fgp.seed)
|
||||
}
|
||||
|
||||
// Custom: SetSeed sets `AVFilmGrainParams.seed` value.
|
||||
// SetSeed sets `AVFilmGrainParams.seed` value.
|
||||
func (fgp *AVFilmGrainParams) SetSeed(v uint64) {
|
||||
fgp.seed = (C.uint64_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetSeedAddr gets `AVFilmGrainParams.seed` address.
|
||||
// GetSeedAddr gets `AVFilmGrainParams.seed` address.
|
||||
func (fgp *AVFilmGrainParams) GetSeedAddr() *uint64 {
|
||||
return (*uint64)(&fgp.seed)
|
||||
}
|
||||
|
||||
// Custom: GetCodecAom gets `AVFilmGrainParams.codec_aom` value.
|
||||
// GetCodecAom gets `AVFilmGrainParams.codec_aom` value.
|
||||
func (fgp *AVFilmGrainParams) GetCodecAom() AVFilmGrainAOMParams {
|
||||
return (AVFilmGrainAOMParams)(
|
||||
C.get_av_film_grain_params_codec_aom((*C.struct_AVFilmGrainParams)(fgp)))
|
||||
}
|
||||
|
||||
// Custom: SetCodecAom sets `AVFilmGrainParams.codec_aom` value.
|
||||
// SetCodecAom sets `AVFilmGrainParams.codec_aom` value.
|
||||
func (fgp *AVFilmGrainParams) SetCodecAom(v AVFilmGrainAOMParams) {
|
||||
C.set_av_film_grain_params_codec_aom((*C.struct_AVFilmGrainParams)(fgp),
|
||||
(C.struct_AVFilmGrainAOMParams)(v))
|
||||
}
|
||||
|
||||
// Custom: GetCodecAomAddr gets `AVFilmGrainParams.codec_aom` address.
|
||||
// GetCodecAomAddr gets `AVFilmGrainParams.codec_aom` address.
|
||||
func (fgp *AVFilmGrainParams) GetCodecAomAddr() *AVFilmGrainAOMParams {
|
||||
return (*AVFilmGrainAOMParams)(C.get_av_film_grain_params_codec_aom_addr(
|
||||
(*C.struct_AVFilmGrainParams)(fgp)))
|
||||
|
516
avutil_frame.go
516
avutil_frame.go
File diff suppressed because it is too large
Load Diff
@@ -19,32 +19,32 @@ const (
|
||||
// AVHDRPlusPercentile
|
||||
type AVHDRPlusPercentile C.struct_AVHDRPlusPercentile
|
||||
|
||||
// Custom: GetPercentage gets `AVHDRPlusPercentile.percentage` value.
|
||||
// GetPercentage gets `AVHDRPlusPercentile.percentage` value.
|
||||
func (pct *AVHDRPlusPercentile) GetPercentage() uint8 {
|
||||
return (uint8)(pct.percentage)
|
||||
}
|
||||
|
||||
// Custom: SetPercentage sets `AVHDRPlusPercentile.percentage` value.
|
||||
// SetPercentage sets `AVHDRPlusPercentile.percentage` value.
|
||||
func (pct *AVHDRPlusPercentile) SetPercentage(v uint8) {
|
||||
pct.percentage = (C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetPercentageAddr gets `AVHDRPlusPercentile.percentage` address.
|
||||
// GetPercentageAddr gets `AVHDRPlusPercentile.percentage` address.
|
||||
func (pct *AVHDRPlusPercentile) GetPercentageAddr() *uint8 {
|
||||
return (*uint8)(&pct.percentage)
|
||||
}
|
||||
|
||||
// Custom: GetPercentile gets `AVHDRPlusPercentile.percentile` value.
|
||||
// GetPercentile gets `AVHDRPlusPercentile.percentile` value.
|
||||
func (pct *AVHDRPlusPercentile) GetPercentile() AVRational {
|
||||
return (AVRational)(pct.percentile)
|
||||
}
|
||||
|
||||
// Custom: SetPercentile sets `AVHDRPlusPercentile.percentile` value.
|
||||
// SetPercentile sets `AVHDRPlusPercentile.percentile` value.
|
||||
func (pct *AVHDRPlusPercentile) SetPercentile(v AVRational) {
|
||||
pct.percentile = (C.struct_AVRational)(v)
|
||||
}
|
||||
|
||||
// Custom: GetPercentileAddr gets `AVHDRPlusPercentile.percentile` address.
|
||||
// GetPercentileAddr gets `AVHDRPlusPercentile.percentile` address.
|
||||
func (pct *AVHDRPlusPercentile) GetPercentileAddr() *AVRational {
|
||||
return (*AVRational)(&pct.percentile)
|
||||
}
|
||||
@@ -52,353 +52,353 @@ func (pct *AVHDRPlusPercentile) GetPercentileAddr() *AVRational {
|
||||
// AVHDRPlusColorTransformParams
|
||||
type AVHDRPlusColorTransformParams C.struct_AVHDRPlusColorTransformParams
|
||||
|
||||
// Custom: GetWindowUpperLeftCornerX gets `AVHDRPlusColorTransformParams.window_upper_left_corner_x` value.
|
||||
// GetWindowUpperLeftCornerX gets `AVHDRPlusColorTransformParams.window_upper_left_corner_x` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetWindowUpperLeftCornerX() AVRational {
|
||||
return (AVRational)(ctp.window_upper_left_corner_x)
|
||||
}
|
||||
|
||||
// Custom: SetWindowUpperLeftCornerX sets `AVHDRPlusColorTransformParams.window_upper_left_corner_x` value.
|
||||
// SetWindowUpperLeftCornerX sets `AVHDRPlusColorTransformParams.window_upper_left_corner_x` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) SetWindowUpperLeftCornerX(v AVRational) {
|
||||
ctp.window_upper_left_corner_x = (C.struct_AVRational)(v)
|
||||
}
|
||||
|
||||
// Custom: GetWindowUpperLeftCornerXAddr gets `AVHDRPlusColorTransformParams.window_upper_left_corner_x` address.
|
||||
// GetWindowUpperLeftCornerXAddr gets `AVHDRPlusColorTransformParams.window_upper_left_corner_x` address.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetWindowUpperLeftCornerXAddr() *AVRational {
|
||||
return (*AVRational)(&ctp.window_upper_left_corner_x)
|
||||
}
|
||||
|
||||
// Custom: GetWindowUpperLeftCornerY gets `AVHDRPlusColorTransformParams.window_upper_left_corner_y` value.
|
||||
// GetWindowUpperLeftCornerY gets `AVHDRPlusColorTransformParams.window_upper_left_corner_y` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetWindowUpperLeftCornerY() AVRational {
|
||||
return (AVRational)(ctp.window_upper_left_corner_y)
|
||||
}
|
||||
|
||||
// Custom: SetWindowUpperLeftCornerY sets `AVHDRPlusColorTransformParams.window_upper_left_corner_y` value.
|
||||
// SetWindowUpperLeftCornerY sets `AVHDRPlusColorTransformParams.window_upper_left_corner_y` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) SetWindowUpperLeftCornerY(v AVRational) {
|
||||
ctp.window_upper_left_corner_y = (C.struct_AVRational)(v)
|
||||
}
|
||||
|
||||
// Custom: GetWindowUpperLeftCornerYAddr gets `AVHDRPlusColorTransformParams.window_upper_left_corner_y` address.
|
||||
// GetWindowUpperLeftCornerYAddr gets `AVHDRPlusColorTransformParams.window_upper_left_corner_y` address.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetWindowUpperLeftCornerYAddr() *AVRational {
|
||||
return (*AVRational)(&ctp.window_upper_left_corner_y)
|
||||
}
|
||||
|
||||
// Custom: GetWindowLowerRightCornerX gets `AVHDRPlusColorTransformParams.window_lower_right_corner_x` value.
|
||||
// GetWindowLowerRightCornerX gets `AVHDRPlusColorTransformParams.window_lower_right_corner_x` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetWindowLowerRightCornerX() AVRational {
|
||||
return (AVRational)(ctp.window_lower_right_corner_x)
|
||||
}
|
||||
|
||||
// Custom: SetWindowLowerRightCornerX sets `AVHDRPlusColorTransformParams.window_lower_right_corner_x` value.
|
||||
// SetWindowLowerRightCornerX sets `AVHDRPlusColorTransformParams.window_lower_right_corner_x` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) SetWindowLowerRightCornerX(v AVRational) {
|
||||
ctp.window_lower_right_corner_x = (C.struct_AVRational)(v)
|
||||
}
|
||||
|
||||
// Custom: GetWindowLowerRightCornerXAddr gets `AVHDRPlusColorTransformParams.window_lower_right_corner_x` address.
|
||||
// GetWindowLowerRightCornerXAddr gets `AVHDRPlusColorTransformParams.window_lower_right_corner_x` address.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetWindowLowerRightCornerXAddr() *AVRational {
|
||||
return (*AVRational)(&ctp.window_lower_right_corner_x)
|
||||
}
|
||||
|
||||
// Custom: GetWindowLowerRightCornerY gets `AVHDRPlusColorTransformParams.window_lower_right_corner_y` value.
|
||||
// GetWindowLowerRightCornerY gets `AVHDRPlusColorTransformParams.window_lower_right_corner_y` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetWindowLowerRightCornerY() AVRational {
|
||||
return (AVRational)(ctp.window_lower_right_corner_y)
|
||||
}
|
||||
|
||||
// Custom: SetWindowLowerRightCornerY sets `AVHDRPlusColorTransformParams.window_lower_right_corner_y` value.
|
||||
// SetWindowLowerRightCornerY sets `AVHDRPlusColorTransformParams.window_lower_right_corner_y` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) SetWindowLowerRightCornerY(v AVRational) {
|
||||
ctp.window_lower_right_corner_y = (C.struct_AVRational)(v)
|
||||
}
|
||||
|
||||
// Custom: GetWindowLowerRightCornerYAddr gets `AVHDRPlusColorTransformParams.window_lower_right_corner_y` address.
|
||||
// GetWindowLowerRightCornerYAddr gets `AVHDRPlusColorTransformParams.window_lower_right_corner_y` address.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetWindowLowerRightCornerYAddr() *AVRational {
|
||||
return (*AVRational)(&ctp.window_lower_right_corner_y)
|
||||
}
|
||||
|
||||
// Custom: GetCenterOfEllipseX gets `AVHDRPlusColorTransformParams.center_of_ellipse_x` value.
|
||||
// GetCenterOfEllipseX gets `AVHDRPlusColorTransformParams.center_of_ellipse_x` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetCenterOfEllipseX() uint16 {
|
||||
return (uint16)(ctp.center_of_ellipse_x)
|
||||
}
|
||||
|
||||
// Custom: SetCenterOfEllipseX sets `AVHDRPlusColorTransformParams.center_of_ellipse_x` value.
|
||||
// SetCenterOfEllipseX sets `AVHDRPlusColorTransformParams.center_of_ellipse_x` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) SetCenterOfEllipseX(v uint16) {
|
||||
ctp.center_of_ellipse_x = (C.uint16_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetCenterOfEllipseXAddr gets `AVHDRPlusColorTransformParams.center_of_ellipse_x` address.
|
||||
// GetCenterOfEllipseXAddr gets `AVHDRPlusColorTransformParams.center_of_ellipse_x` address.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetCenterOfEllipseXAddr() *uint16 {
|
||||
return (*uint16)(&ctp.center_of_ellipse_x)
|
||||
}
|
||||
|
||||
// Custom: GetCenterOfEllipseY gets `AVHDRPlusColorTransformParams.center_of_ellipse_y` value.
|
||||
// GetCenterOfEllipseY gets `AVHDRPlusColorTransformParams.center_of_ellipse_y` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetCenterOfEllipseY() uint16 {
|
||||
return (uint16)(ctp.center_of_ellipse_y)
|
||||
}
|
||||
|
||||
// Custom: SetCenterOfEllipseY sets `AVHDRPlusColorTransformParams.center_of_ellipse_y` value.
|
||||
// SetCenterOfEllipseY sets `AVHDRPlusColorTransformParams.center_of_ellipse_y` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) SetCenterOfEllipseY(v uint16) {
|
||||
ctp.center_of_ellipse_y = (C.uint16_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetCenterOfEllipseYAddr gets `AVHDRPlusColorTransformParams.center_of_ellipse_y` address.
|
||||
// GetCenterOfEllipseYAddr gets `AVHDRPlusColorTransformParams.center_of_ellipse_y` address.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetCenterOfEllipseYAddr() *uint16 {
|
||||
return (*uint16)(&ctp.center_of_ellipse_y)
|
||||
}
|
||||
|
||||
// Custom: GetRotationAngle gets `AVHDRPlusColorTransformParams.rotation_angle` value.
|
||||
// GetRotationAngle gets `AVHDRPlusColorTransformParams.rotation_angle` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetRotationAngle() uint8 {
|
||||
return (uint8)(ctp.rotation_angle)
|
||||
}
|
||||
|
||||
// Custom: SetRotationAngle sets `AVHDRPlusColorTransformParams.rotation_angle` value.
|
||||
// SetRotationAngle sets `AVHDRPlusColorTransformParams.rotation_angle` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) SetRotationAngle(v uint8) {
|
||||
ctp.rotation_angle = (C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetRotationAngleAddr gets `AVHDRPlusColorTransformParams.rotation_angle` address.
|
||||
// GetRotationAngleAddr gets `AVHDRPlusColorTransformParams.rotation_angle` address.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetRotationAngleAddr() *uint8 {
|
||||
return (*uint8)(&ctp.rotation_angle)
|
||||
}
|
||||
|
||||
// Custom: GetSemimajorAxisInternalEllipse gets `AVHDRPlusColorTransformParams.semimajor_axis_internal_ellipse` value.
|
||||
// GetSemimajorAxisInternalEllipse gets `AVHDRPlusColorTransformParams.semimajor_axis_internal_ellipse` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetSemimajorAxisInternalEllipse() uint16 {
|
||||
return (uint16)(ctp.semimajor_axis_internal_ellipse)
|
||||
}
|
||||
|
||||
// Custom: SetSemimajorAxisInternalEllipse sets `AVHDRPlusColorTransformParams.semimajor_axis_internal_ellipse` value.
|
||||
// SetSemimajorAxisInternalEllipse sets `AVHDRPlusColorTransformParams.semimajor_axis_internal_ellipse` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) SetSemimajorAxisInternalEllipse(v uint16) {
|
||||
ctp.semimajor_axis_internal_ellipse = (C.uint16_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetSemimajorAxisInternalEllipseAddr gets `AVHDRPlusColorTransformParams.semimajor_axis_internal_ellipse` address.
|
||||
// GetSemimajorAxisInternalEllipseAddr gets `AVHDRPlusColorTransformParams.semimajor_axis_internal_ellipse` address.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetSemimajorAxisInternalEllipseAddr() *uint16 {
|
||||
return (*uint16)(&ctp.semimajor_axis_internal_ellipse)
|
||||
}
|
||||
|
||||
// Custom: GetSemimajorAxisExternalEllipse gets `AVHDRPlusColorTransformParams.semimajor_axis_external_ellipse` value.
|
||||
// GetSemimajorAxisExternalEllipse gets `AVHDRPlusColorTransformParams.semimajor_axis_external_ellipse` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetSemimajorAxisExternalEllipse() uint16 {
|
||||
return (uint16)(ctp.semimajor_axis_external_ellipse)
|
||||
}
|
||||
|
||||
// Custom: SetSemimajorAxisExternalEllipse sets `AVHDRPlusColorTransformParams.semimajor_axis_external_ellipse` value.
|
||||
// SetSemimajorAxisExternalEllipse sets `AVHDRPlusColorTransformParams.semimajor_axis_external_ellipse` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) SetSemimajorAxisExternalEllipse(v uint16) {
|
||||
ctp.semimajor_axis_external_ellipse = (C.uint16_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetSemimajorAxisExternalEllipseAddr gets `AVHDRPlusColorTransformParams.semimajor_axis_external_ellipse` address.
|
||||
// GetSemimajorAxisExternalEllipseAddr gets `AVHDRPlusColorTransformParams.semimajor_axis_external_ellipse` address.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetSemimajorAxisExternalEllipseAddr() *uint16 {
|
||||
return (*uint16)(&ctp.semimajor_axis_external_ellipse)
|
||||
}
|
||||
|
||||
// Custom: GetSemiminorAxisExternalEllipse gets `AVHDRPlusColorTransformParams.semiminor_axis_external_ellipse` value.
|
||||
// GetSemiminorAxisExternalEllipse gets `AVHDRPlusColorTransformParams.semiminor_axis_external_ellipse` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetSemiminorAxisExternalEllipse() uint16 {
|
||||
return (uint16)(ctp.semiminor_axis_external_ellipse)
|
||||
}
|
||||
|
||||
// Custom: SetSemiminorAxisExternalEllipse sets `AVHDRPlusColorTransformParams.semiminor_axis_external_ellipse` value.
|
||||
// SetSemiminorAxisExternalEllipse sets `AVHDRPlusColorTransformParams.semiminor_axis_external_ellipse` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) SetSemiminorAxisExternalEllipse(v uint16) {
|
||||
ctp.semiminor_axis_external_ellipse = (C.uint16_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetSemiminorAxisExternalEllipseAddr gets `AVHDRPlusColorTransformParams.semiminor_axis_external_ellipse` address.
|
||||
// GetSemiminorAxisExternalEllipseAddr gets `AVHDRPlusColorTransformParams.semiminor_axis_external_ellipse` address.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetSemiminorAxisExternalEllipseAddr() *uint16 {
|
||||
return (*uint16)(&ctp.semiminor_axis_external_ellipse)
|
||||
}
|
||||
|
||||
// Custom: GetOverlapProcessOption gets `AVHDRPlusColorTransformParams.overlap_process_option` value.
|
||||
// GetOverlapProcessOption gets `AVHDRPlusColorTransformParams.overlap_process_option` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetOverlapProcessOption() AVHDRPlusOverlapProcessOption {
|
||||
return (AVHDRPlusOverlapProcessOption)(ctp.overlap_process_option)
|
||||
}
|
||||
|
||||
// Custom: SetOverlapProcessOption sets `AVHDRPlusColorTransformParams.overlap_process_option` value.
|
||||
// SetOverlapProcessOption sets `AVHDRPlusColorTransformParams.overlap_process_option` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) SetOverlapProcessOption(v AVHDRPlusOverlapProcessOption) {
|
||||
ctp.overlap_process_option = (C.enum_AVHDRPlusOverlapProcessOption)(v)
|
||||
}
|
||||
|
||||
// Custom: GetOverlapProcessOptionAddr gets `AVHDRPlusColorTransformParams.overlap_process_option` address.
|
||||
// GetOverlapProcessOptionAddr gets `AVHDRPlusColorTransformParams.overlap_process_option` address.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetOverlapProcessOptionAddr() *AVHDRPlusOverlapProcessOption {
|
||||
return (*AVHDRPlusOverlapProcessOption)(&ctp.overlap_process_option)
|
||||
}
|
||||
|
||||
// Custom: GetMaxscl gets `AVHDRPlusColorTransformParams.maxscl` value.
|
||||
// GetMaxscl gets `AVHDRPlusColorTransformParams.maxscl` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetMaxscl() []AVRational {
|
||||
return unsafe.Slice((*AVRational)(&ctp.maxscl[0]), 3)
|
||||
}
|
||||
|
||||
// Custom: SetMaxscl sets `AVHDRPlusColorTransformParams.maxscl` value.
|
||||
// SetMaxscl sets `AVHDRPlusColorTransformParams.maxscl` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) SetMaxscl(v []AVRational) {
|
||||
for i := 0; i < FFMIN(len(v), 3); i++ {
|
||||
ctp.maxscl[i] = (C.struct_AVRational)(v[i])
|
||||
}
|
||||
}
|
||||
|
||||
// Custom: GetMaxsclAddr gets `AVHDRPlusColorTransformParams.maxscl` address.
|
||||
// GetMaxsclAddr gets `AVHDRPlusColorTransformParams.maxscl` address.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetMaxsclAddr() **AVRational {
|
||||
return (**AVRational)(unsafe.Pointer(&ctp.maxscl))
|
||||
}
|
||||
|
||||
// Custom: GetAverageMaxrgb gets `AVHDRPlusColorTransformParams.average_maxrgb` value.
|
||||
// GetAverageMaxrgb gets `AVHDRPlusColorTransformParams.average_maxrgb` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetAverageMaxrgb() AVRational {
|
||||
return (AVRational)(ctp.average_maxrgb)
|
||||
}
|
||||
|
||||
// Custom: SetAverageMaxrgb sets `AVHDRPlusColorTransformParams.average_maxrgb` value.
|
||||
// SetAverageMaxrgb sets `AVHDRPlusColorTransformParams.average_maxrgb` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) SetAverageMaxrgb(v AVRational) {
|
||||
ctp.average_maxrgb = (C.struct_AVRational)(v)
|
||||
}
|
||||
|
||||
// Custom: GetAverageMaxrgbAddr gets `AVHDRPlusColorTransformParams.average_maxrgb` address.
|
||||
// GetAverageMaxrgbAddr gets `AVHDRPlusColorTransformParams.average_maxrgb` address.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetAverageMaxrgbAddr() *AVRational {
|
||||
return (*AVRational)(&ctp.average_maxrgb)
|
||||
}
|
||||
|
||||
// Custom: GetNumDistributionMaxrgbPercentiles gets `AVHDRPlusColorTransformParams.num_distribution_maxrgb_percentiles` value.
|
||||
// GetNumDistributionMaxrgbPercentiles gets `AVHDRPlusColorTransformParams.num_distribution_maxrgb_percentiles` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetNumDistributionMaxrgbPercentiles() uint8 {
|
||||
return (uint8)(ctp.num_distribution_maxrgb_percentiles)
|
||||
}
|
||||
|
||||
// Custom: SetNumDistributionMaxrgbPercentiles sets `AVHDRPlusColorTransformParams.num_distribution_maxrgb_percentiles` value.
|
||||
// SetNumDistributionMaxrgbPercentiles sets `AVHDRPlusColorTransformParams.num_distribution_maxrgb_percentiles` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) SetNumDistributionMaxrgbPercentiles(v uint8) {
|
||||
ctp.num_distribution_maxrgb_percentiles = (C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetNumDistributionMaxrgbPercentilesAddr gets `AVHDRPlusColorTransformParams.num_distribution_maxrgb_percentiles` address.
|
||||
// GetNumDistributionMaxrgbPercentilesAddr gets `AVHDRPlusColorTransformParams.num_distribution_maxrgb_percentiles` address.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetNumDistributionMaxrgbPercentilesAddr() *uint8 {
|
||||
return (*uint8)(&ctp.num_distribution_maxrgb_percentiles)
|
||||
}
|
||||
|
||||
// Custom: GetDistributionMaxrgb gets `AVHDRPlusColorTransformParams.distribution_maxrgb` value.
|
||||
// GetDistributionMaxrgb gets `AVHDRPlusColorTransformParams.distribution_maxrgb` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetDistributionMaxrgb() []AVHDRPlusPercentile {
|
||||
return unsafe.Slice((*AVHDRPlusPercentile)(&ctp.distribution_maxrgb[0]), 15)
|
||||
}
|
||||
|
||||
// Custom: SetDistributionMaxrgb sets `AVHDRPlusColorTransformParams.distribution_maxrgb` value.
|
||||
// SetDistributionMaxrgb sets `AVHDRPlusColorTransformParams.distribution_maxrgb` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) SetDistributionMaxrgb(v []AVHDRPlusPercentile) {
|
||||
for i := 0; i < FFMIN(len(v), 15); i++ {
|
||||
ctp.distribution_maxrgb[i] = (C.struct_AVHDRPlusPercentile)(v[i])
|
||||
}
|
||||
}
|
||||
|
||||
// Custom: GetDistributionMaxrgbAddr gets `AVHDRPlusColorTransformParams.distribution_maxrgb` address.
|
||||
// GetDistributionMaxrgbAddr gets `AVHDRPlusColorTransformParams.distribution_maxrgb` address.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetDistributionMaxrgbAddr() **AVHDRPlusPercentile {
|
||||
return (**AVHDRPlusPercentile)(unsafe.Pointer(&ctp.distribution_maxrgb))
|
||||
}
|
||||
|
||||
// Custom: GetFractionBrightPixels gets `AVHDRPlusColorTransformParams.fraction_bright_pixels` value.
|
||||
// GetFractionBrightPixels gets `AVHDRPlusColorTransformParams.fraction_bright_pixels` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetFractionBrightPixels() AVRational {
|
||||
return (AVRational)(ctp.fraction_bright_pixels)
|
||||
}
|
||||
|
||||
// Custom: SetFractionBrightPixels sets `AVHDRPlusColorTransformParams.fraction_bright_pixels` value.
|
||||
// SetFractionBrightPixels sets `AVHDRPlusColorTransformParams.fraction_bright_pixels` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) SetFractionBrightPixels(v AVRational) {
|
||||
ctp.fraction_bright_pixels = (C.struct_AVRational)(v)
|
||||
}
|
||||
|
||||
// Custom: GetFractionBrightPixelsAddr gets `AVHDRPlusColorTransformParams.fraction_bright_pixels` address.
|
||||
// GetFractionBrightPixelsAddr gets `AVHDRPlusColorTransformParams.fraction_bright_pixels` address.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetFractionBrightPixelsAddr() *AVRational {
|
||||
return (*AVRational)(&ctp.fraction_bright_pixels)
|
||||
}
|
||||
|
||||
// Custom: GetToneMappingFlag gets `AVHDRPlusColorTransformParams.tone_mapping_flag` value.
|
||||
// GetToneMappingFlag gets `AVHDRPlusColorTransformParams.tone_mapping_flag` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetToneMappingFlag() uint8 {
|
||||
return (uint8)(ctp.tone_mapping_flag)
|
||||
}
|
||||
|
||||
// Custom: SetToneMappingFlag sets `AVHDRPlusColorTransformParams.tone_mapping_flag` value.
|
||||
// SetToneMappingFlag sets `AVHDRPlusColorTransformParams.tone_mapping_flag` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) SetToneMappingFlag(v uint8) {
|
||||
ctp.tone_mapping_flag = (C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetToneMappingFlagAddr gets `AVHDRPlusColorTransformParams.tone_mapping_flag` address.
|
||||
// GetToneMappingFlagAddr gets `AVHDRPlusColorTransformParams.tone_mapping_flag` address.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetToneMappingFlagAddr() *uint8 {
|
||||
return (*uint8)(&ctp.tone_mapping_flag)
|
||||
}
|
||||
|
||||
// Custom: GetKneePointX gets `AVHDRPlusColorTransformParams.knee_point_x` value.
|
||||
// GetKneePointX gets `AVHDRPlusColorTransformParams.knee_point_x` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetKneePointX() AVRational {
|
||||
return (AVRational)(ctp.knee_point_x)
|
||||
}
|
||||
|
||||
// Custom: SetKneePointX sets `AVHDRPlusColorTransformParams.knee_point_x` value.
|
||||
// SetKneePointX sets `AVHDRPlusColorTransformParams.knee_point_x` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) SetKneePointX(v AVRational) {
|
||||
ctp.knee_point_x = (C.struct_AVRational)(v)
|
||||
}
|
||||
|
||||
// Custom: GetKneePointXAddr gets `AVHDRPlusColorTransformParams.knee_point_x` address.
|
||||
// GetKneePointXAddr gets `AVHDRPlusColorTransformParams.knee_point_x` address.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetKneePointXAddr() *AVRational {
|
||||
return (*AVRational)(&ctp.knee_point_x)
|
||||
}
|
||||
|
||||
// Custom: GetKneePointY gets `AVHDRPlusColorTransformParams.knee_point_y` value.
|
||||
// GetKneePointY gets `AVHDRPlusColorTransformParams.knee_point_y` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetKneePointY() AVRational {
|
||||
return (AVRational)(ctp.knee_point_y)
|
||||
}
|
||||
|
||||
// Custom: SetKneePointY sets `AVHDRPlusColorTransformParams.knee_point_y` value.
|
||||
// SetKneePointY sets `AVHDRPlusColorTransformParams.knee_point_y` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) SetKneePointY(v AVRational) {
|
||||
ctp.knee_point_y = (C.struct_AVRational)(v)
|
||||
}
|
||||
|
||||
// Custom: GetKneePointYAddr gets `AVHDRPlusColorTransformParams.knee_point_y` address.
|
||||
// GetKneePointYAddr gets `AVHDRPlusColorTransformParams.knee_point_y` address.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetKneePointYAddr() *AVRational {
|
||||
return (*AVRational)(&ctp.knee_point_y)
|
||||
}
|
||||
|
||||
// Custom: GetNumBezierCurveAnchors gets `AVHDRPlusColorTransformParams.num_bezier_curve_anchors` value.
|
||||
// GetNumBezierCurveAnchors gets `AVHDRPlusColorTransformParams.num_bezier_curve_anchors` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetNumBezierCurveAnchors() uint8 {
|
||||
return (uint8)(ctp.num_bezier_curve_anchors)
|
||||
}
|
||||
|
||||
// Custom: SetNumBezierCurveAnchors sets `AVHDRPlusColorTransformParams.num_bezier_curve_anchors` value.
|
||||
// SetNumBezierCurveAnchors sets `AVHDRPlusColorTransformParams.num_bezier_curve_anchors` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) SetNumBezierCurveAnchors(v uint8) {
|
||||
ctp.num_bezier_curve_anchors = (C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetNumBezierCurveAnchorsAddr gets `AVHDRPlusColorTransformParams.num_bezier_curve_anchors` address.
|
||||
// GetNumBezierCurveAnchorsAddr gets `AVHDRPlusColorTransformParams.num_bezier_curve_anchors` address.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetNumBezierCurveAnchorsAddr() *uint8 {
|
||||
return (*uint8)(&ctp.num_bezier_curve_anchors)
|
||||
}
|
||||
|
||||
// Custom: GetBezierCurveAnchors gets `AVHDRPlusColorTransformParams.bezier_curve_anchors` value.
|
||||
// GetBezierCurveAnchors gets `AVHDRPlusColorTransformParams.bezier_curve_anchors` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetBezierCurveAnchors() []AVRational {
|
||||
return unsafe.Slice((*AVRational)(&ctp.bezier_curve_anchors[0]), 15)
|
||||
}
|
||||
|
||||
// Custom: SetBezierCurveAnchors sets `AVHDRPlusColorTransformParams.bezier_curve_anchors` value.
|
||||
// SetBezierCurveAnchors sets `AVHDRPlusColorTransformParams.bezier_curve_anchors` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) SetBezierCurveAnchors(v []AVRational) {
|
||||
for i := 0; i < FFMIN(len(v), 15); i++ {
|
||||
ctp.bezier_curve_anchors[i] = (C.struct_AVRational)(v[i])
|
||||
}
|
||||
}
|
||||
|
||||
// Custom: GetBezierCurveAnchorsAddr gets `AVHDRPlusColorTransformParams.bezier_curve_anchors` address.
|
||||
// GetBezierCurveAnchorsAddr gets `AVHDRPlusColorTransformParams.bezier_curve_anchors` address.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetBezierCurveAnchorsAddr() **AVRational {
|
||||
return (**AVRational)(unsafe.Pointer(&ctp.bezier_curve_anchors))
|
||||
}
|
||||
|
||||
// Custom: GetColorSaturationMappingFlag gets `AVHDRPlusColorTransformParams.color_saturation_mapping_flag` value.
|
||||
// GetColorSaturationMappingFlag gets `AVHDRPlusColorTransformParams.color_saturation_mapping_flag` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetColorSaturationMappingFlag() uint8 {
|
||||
return (uint8)(ctp.color_saturation_mapping_flag)
|
||||
}
|
||||
|
||||
// Custom: SetColorSaturationMappingFlag sets `AVHDRPlusColorTransformParams.color_saturation_mapping_flag` value.
|
||||
// SetColorSaturationMappingFlag sets `AVHDRPlusColorTransformParams.color_saturation_mapping_flag` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) SetColorSaturationMappingFlag(v uint8) {
|
||||
ctp.color_saturation_mapping_flag = (C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetColorSaturationMappingFlagAddr gets `AVHDRPlusColorTransformParams.color_saturation_mapping_flag` address.
|
||||
// GetColorSaturationMappingFlagAddr gets `AVHDRPlusColorTransformParams.color_saturation_mapping_flag` address.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetColorSaturationMappingFlagAddr() *uint8 {
|
||||
return (*uint8)(&ctp.color_saturation_mapping_flag)
|
||||
}
|
||||
|
||||
// Custom: GetColorSaturationWeight gets `AVHDRPlusColorTransformParams.color_saturation_weight` value.
|
||||
// GetColorSaturationWeight gets `AVHDRPlusColorTransformParams.color_saturation_weight` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetColorSaturationWeight() AVRational {
|
||||
return (AVRational)(ctp.color_saturation_weight)
|
||||
}
|
||||
|
||||
// Custom: SetColorSaturationWeight sets `AVHDRPlusColorTransformParams.color_saturation_weight` value.
|
||||
// SetColorSaturationWeight sets `AVHDRPlusColorTransformParams.color_saturation_weight` value.
|
||||
func (ctp *AVHDRPlusColorTransformParams) SetColorSaturationWeight(v AVRational) {
|
||||
ctp.color_saturation_weight = (C.struct_AVRational)(v)
|
||||
}
|
||||
|
||||
// Custom: GetColorSaturationWeightAddr gets `AVHDRPlusColorTransformParams.color_saturation_weight` address.
|
||||
// GetColorSaturationWeightAddr gets `AVHDRPlusColorTransformParams.color_saturation_weight` address.
|
||||
func (ctp *AVHDRPlusColorTransformParams) GetColorSaturationWeightAddr() *AVRational {
|
||||
return (*AVRational)(&ctp.color_saturation_weight)
|
||||
}
|
||||
@@ -406,129 +406,129 @@ func (ctp *AVHDRPlusColorTransformParams) GetColorSaturationWeightAddr() *AVRati
|
||||
// AVDynamicHDRPlus
|
||||
type AVDynamicHDRPlus C.struct_AVDynamicHDRPlus
|
||||
|
||||
// Custom: GetItuTT35CountryCode gets `AVDynamicHDRPlus.itu_t_t35_country_code` value.
|
||||
// GetItuTT35CountryCode gets `AVDynamicHDRPlus.itu_t_t35_country_code` value.
|
||||
func (dhp *AVDynamicHDRPlus) GetItuTT35CountryCode() uint8 {
|
||||
return (uint8)(dhp.itu_t_t35_country_code)
|
||||
}
|
||||
|
||||
// Custom: SetItuTT35CountryCode sets `AVDynamicHDRPlus.itu_t_t35_country_code` value.
|
||||
// SetItuTT35CountryCode sets `AVDynamicHDRPlus.itu_t_t35_country_code` value.
|
||||
func (dhp *AVDynamicHDRPlus) SetItuTT35CountryCode(v uint8) {
|
||||
dhp.itu_t_t35_country_code = (C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetItuTT35CountryCodeAddr gets `AVDynamicHDRPlus.itu_t_t35_country_code` address.
|
||||
// GetItuTT35CountryCodeAddr gets `AVDynamicHDRPlus.itu_t_t35_country_code` address.
|
||||
func (dhp *AVDynamicHDRPlus) GetItuTT35CountryCodeAddr() *uint8 {
|
||||
return (*uint8)(&dhp.itu_t_t35_country_code)
|
||||
}
|
||||
|
||||
// Custom: GetApplicationVersion gets `AVDynamicHDRPlus.application_version` value.
|
||||
// GetApplicationVersion gets `AVDynamicHDRPlus.application_version` value.
|
||||
func (dhp *AVDynamicHDRPlus) GetApplicationVersion() uint8 {
|
||||
return (uint8)(dhp.application_version)
|
||||
}
|
||||
|
||||
// Custom: SetApplicationVersion sets `AVDynamicHDRPlus.application_version` value.
|
||||
// SetApplicationVersion sets `AVDynamicHDRPlus.application_version` value.
|
||||
func (dhp *AVDynamicHDRPlus) SetApplicationVersion(v uint8) {
|
||||
dhp.application_version = (C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetApplicationVersionAddr gets `AVDynamicHDRPlus.application_version` address.
|
||||
// GetApplicationVersionAddr gets `AVDynamicHDRPlus.application_version` address.
|
||||
func (dhp *AVDynamicHDRPlus) GetApplicationVersionAddr() *uint8 {
|
||||
return (*uint8)(&dhp.application_version)
|
||||
}
|
||||
|
||||
// Custom: GetNumWindows gets `AVDynamicHDRPlus.num_windows` value.
|
||||
// GetNumWindows gets `AVDynamicHDRPlus.num_windows` value.
|
||||
func (dhp *AVDynamicHDRPlus) GetNumWindows() uint8 {
|
||||
return (uint8)(dhp.num_windows)
|
||||
}
|
||||
|
||||
// Custom: SetNumWindows sets `AVDynamicHDRPlus.num_windows` value.
|
||||
// SetNumWindows sets `AVDynamicHDRPlus.num_windows` value.
|
||||
func (dhp *AVDynamicHDRPlus) SetNumWindows(v uint8) {
|
||||
dhp.num_windows = (C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetNumWindowsAddr gets `AVDynamicHDRPlus.num_windows` address.
|
||||
// GetNumWindowsAddr gets `AVDynamicHDRPlus.num_windows` address.
|
||||
func (dhp *AVDynamicHDRPlus) GetNumWindowsAddr() *uint8 {
|
||||
return (*uint8)(&dhp.num_windows)
|
||||
}
|
||||
|
||||
// Custom: GetParams gets `AVDynamicHDRPlus.params` value.
|
||||
// GetParams gets `AVDynamicHDRPlus.params` value.
|
||||
func (dhp *AVDynamicHDRPlus) GetParams() []AVHDRPlusColorTransformParams {
|
||||
return unsafe.Slice((*AVHDRPlusColorTransformParams)(&dhp.params[0]), 3)
|
||||
}
|
||||
|
||||
// Custom: SetParams sets `AVDynamicHDRPlus.params` value.
|
||||
// SetParams sets `AVDynamicHDRPlus.params` value.
|
||||
func (dhp *AVDynamicHDRPlus) SetParams(v []AVHDRPlusColorTransformParams) {
|
||||
for i := 0; i < FFMIN(len(v), 3); i++ {
|
||||
dhp.params[i] = (C.struct_AVHDRPlusColorTransformParams)(v[i])
|
||||
}
|
||||
}
|
||||
|
||||
// Custom: GetParamsAddr gets `AVDynamicHDRPlus.params` address.
|
||||
// GetParamsAddr gets `AVDynamicHDRPlus.params` address.
|
||||
func (dhp *AVDynamicHDRPlus) GetParamsAddr() **AVHDRPlusColorTransformParams {
|
||||
return (**AVHDRPlusColorTransformParams)(unsafe.Pointer(&dhp.params))
|
||||
}
|
||||
|
||||
// Custom: GetTargetedSystemDisplayMaximumLuminance gets `AVDynamicHDRPlus.targeted_system_display_maximum_luminance` value.
|
||||
// GetTargetedSystemDisplayMaximumLuminance gets `AVDynamicHDRPlus.targeted_system_display_maximum_luminance` value.
|
||||
func (dhp *AVDynamicHDRPlus) GetTargetedSystemDisplayMaximumLuminance() AVRational {
|
||||
return (AVRational)(dhp.targeted_system_display_maximum_luminance)
|
||||
}
|
||||
|
||||
// Custom: SetTargetedSystemDisplayMaximumLuminance sets `AVDynamicHDRPlus.targeted_system_display_maximum_luminance` value.
|
||||
// SetTargetedSystemDisplayMaximumLuminance sets `AVDynamicHDRPlus.targeted_system_display_maximum_luminance` value.
|
||||
func (dhp *AVDynamicHDRPlus) SetTargetedSystemDisplayMaximumLuminance(v AVRational) {
|
||||
dhp.targeted_system_display_maximum_luminance = (C.struct_AVRational)(v)
|
||||
}
|
||||
|
||||
// Custom: GetTargetedSystemDisplayMaximumLuminanceAddr gets `AVDynamicHDRPlus.targeted_system_display_maximum_luminance` address.
|
||||
// GetTargetedSystemDisplayMaximumLuminanceAddr gets `AVDynamicHDRPlus.targeted_system_display_maximum_luminance` address.
|
||||
func (dhp *AVDynamicHDRPlus) GetTargetedSystemDisplayMaximumLuminanceAddr() *AVRational {
|
||||
return (*AVRational)(&dhp.targeted_system_display_maximum_luminance)
|
||||
}
|
||||
|
||||
// Custom: GetTargetedSystemDisplayActualPeakLuminanceFlag gets `AVDynamicHDRPlus.targeted_system_display_actual_peak_luminance_flag` value.
|
||||
// GetTargetedSystemDisplayActualPeakLuminanceFlag gets `AVDynamicHDRPlus.targeted_system_display_actual_peak_luminance_flag` value.
|
||||
func (dhp *AVDynamicHDRPlus) GetTargetedSystemDisplayActualPeakLuminanceFlag() uint8 {
|
||||
return (uint8)(dhp.targeted_system_display_actual_peak_luminance_flag)
|
||||
}
|
||||
|
||||
// Custom: SetTargetedSystemDisplayActualPeakLuminanceFlag sets `AVDynamicHDRPlus.targeted_system_display_actual_peak_luminance_flag` value.
|
||||
// SetTargetedSystemDisplayActualPeakLuminanceFlag sets `AVDynamicHDRPlus.targeted_system_display_actual_peak_luminance_flag` value.
|
||||
func (dhp *AVDynamicHDRPlus) SetTargetedSystemDisplayActualPeakLuminanceFlag(v uint8) {
|
||||
dhp.targeted_system_display_actual_peak_luminance_flag = (C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetTargetedSystemDisplayActualPeakLuminanceFlagAddr gets `AVDynamicHDRPlus.targeted_system_display_actual_peak_luminance_flag` address.
|
||||
// GetTargetedSystemDisplayActualPeakLuminanceFlagAddr gets `AVDynamicHDRPlus.targeted_system_display_actual_peak_luminance_flag` address.
|
||||
func (dhp *AVDynamicHDRPlus) GetTargetedSystemDisplayActualPeakLuminanceFlagAddr() *uint8 {
|
||||
return (*uint8)(&dhp.targeted_system_display_actual_peak_luminance_flag)
|
||||
}
|
||||
|
||||
// Custom: GetNumRowsTargetedSystemDisplayActualPeakLuminance gets `AVDynamicHDRPlus.num_rows_targeted_system_display_actual_peak_luminance` value.
|
||||
// GetNumRowsTargetedSystemDisplayActualPeakLuminance gets `AVDynamicHDRPlus.num_rows_targeted_system_display_actual_peak_luminance` value.
|
||||
func (dhp *AVDynamicHDRPlus) GetNumRowsTargetedSystemDisplayActualPeakLuminance() uint8 {
|
||||
return (uint8)(dhp.num_rows_targeted_system_display_actual_peak_luminance)
|
||||
}
|
||||
|
||||
// Custom: SetNumRowsTargetedSystemDisplayActualPeakLuminance sets `AVDynamicHDRPlus.num_rows_targeted_system_display_actual_peak_luminance` value.
|
||||
// SetNumRowsTargetedSystemDisplayActualPeakLuminance sets `AVDynamicHDRPlus.num_rows_targeted_system_display_actual_peak_luminance` value.
|
||||
func (dhp *AVDynamicHDRPlus) SetNumRowsTargetedSystemDisplayActualPeakLuminance(v uint8) {
|
||||
dhp.num_rows_targeted_system_display_actual_peak_luminance = (C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetNumRowsTargetedSystemDisplayActualPeakLuminanceAddr gets `AVDynamicHDRPlus.num_rows_targeted_system_display_actual_peak_luminance` address.
|
||||
// GetNumRowsTargetedSystemDisplayActualPeakLuminanceAddr gets `AVDynamicHDRPlus.num_rows_targeted_system_display_actual_peak_luminance` address.
|
||||
func (dhp *AVDynamicHDRPlus) GetNumRowsTargetedSystemDisplayActualPeakLuminanceAddr() *uint8 {
|
||||
return (*uint8)(&dhp.num_rows_targeted_system_display_actual_peak_luminance)
|
||||
}
|
||||
|
||||
// Custom: GetNumColsTargetedSystemDisplayActualPeakLuminance gets `AVDynamicHDRPlus.num_cols_targeted_system_display_actual_peak_luminance` value.
|
||||
// GetNumColsTargetedSystemDisplayActualPeakLuminance gets `AVDynamicHDRPlus.num_cols_targeted_system_display_actual_peak_luminance` value.
|
||||
func (dhp *AVDynamicHDRPlus) GetNumColsTargetedSystemDisplayActualPeakLuminance() uint8 {
|
||||
return (uint8)(dhp.num_cols_targeted_system_display_actual_peak_luminance)
|
||||
}
|
||||
|
||||
// Custom: SetNumColsTargetedSystemDisplayActualPeakLuminance sets `AVDynamicHDRPlus.num_cols_targeted_system_display_actual_peak_luminance` value.
|
||||
// SetNumColsTargetedSystemDisplayActualPeakLuminance sets `AVDynamicHDRPlus.num_cols_targeted_system_display_actual_peak_luminance` value.
|
||||
func (dhp *AVDynamicHDRPlus) SetNumColsTargetedSystemDisplayActualPeakLuminance(v uint8) {
|
||||
dhp.num_cols_targeted_system_display_actual_peak_luminance = (C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetNumColsTargetedSystemDisplayActualPeakLuminanceAddr gets `AVDynamicHDRPlus.num_cols_targeted_system_display_actual_peak_luminance` address.
|
||||
// GetNumColsTargetedSystemDisplayActualPeakLuminanceAddr gets `AVDynamicHDRPlus.num_cols_targeted_system_display_actual_peak_luminance` address.
|
||||
func (dhp *AVDynamicHDRPlus) GetNumColsTargetedSystemDisplayActualPeakLuminanceAddr() *uint8 {
|
||||
return (*uint8)(&dhp.num_cols_targeted_system_display_actual_peak_luminance)
|
||||
}
|
||||
|
||||
// Custom: GetTargetedSystemDisplayActualPeakLuminance gets `AVDynamicHDRPlus.targeted_system_display_actual_peak_luminance` value.
|
||||
// GetTargetedSystemDisplayActualPeakLuminance gets `AVDynamicHDRPlus.targeted_system_display_actual_peak_luminance` value.
|
||||
func (dhp *AVDynamicHDRPlus) GetTargetedSystemDisplayActualPeakLuminance() (v [][]AVRational) {
|
||||
for i := 0; i < 25; i++ {
|
||||
v = append(v, unsafe.Slice((*AVRational)(&dhp.targeted_system_display_actual_peak_luminance[i][0]), 25))
|
||||
@@ -536,7 +536,7 @@ func (dhp *AVDynamicHDRPlus) GetTargetedSystemDisplayActualPeakLuminance() (v []
|
||||
return v
|
||||
}
|
||||
|
||||
// Custom: SetTargetedSystemDisplayActualPeakLuminance sets `AVDynamicHDRPlus.targeted_system_display_actual_peak_luminance` value.
|
||||
// SetTargetedSystemDisplayActualPeakLuminance sets `AVDynamicHDRPlus.targeted_system_display_actual_peak_luminance` value.
|
||||
func (dhp *AVDynamicHDRPlus) SetTargetedSystemDisplayActualPeakLuminance(v [][]AVRational) {
|
||||
for i := 0; i < FFMIN(len(v), 25); i++ {
|
||||
for j := 0; j < FFMIN(len(v[i]), 25); j++ {
|
||||
@@ -545,57 +545,57 @@ func (dhp *AVDynamicHDRPlus) SetTargetedSystemDisplayActualPeakLuminance(v [][]A
|
||||
}
|
||||
}
|
||||
|
||||
// Custom: GetTargetedSystemDisplayActualPeakLuminanceAddr gets `AVDynamicHDRPlus.targeted_system_display_actual_peak_luminance` address.
|
||||
// GetTargetedSystemDisplayActualPeakLuminanceAddr gets `AVDynamicHDRPlus.targeted_system_display_actual_peak_luminance` address.
|
||||
func (dhp *AVDynamicHDRPlus) GetTargetedSystemDisplayActualPeakLuminanceAddr() **AVRational {
|
||||
return (**AVRational)(unsafe.Pointer(&dhp.targeted_system_display_actual_peak_luminance))
|
||||
}
|
||||
|
||||
// Custom: GetMasteringDisplayActualPeakLuminanceFlag gets `AVDynamicHDRPlus.mastering_display_actual_peak_luminance_flag` value.
|
||||
// GetMasteringDisplayActualPeakLuminanceFlag gets `AVDynamicHDRPlus.mastering_display_actual_peak_luminance_flag` value.
|
||||
func (dhp *AVDynamicHDRPlus) GetMasteringDisplayActualPeakLuminanceFlag() uint8 {
|
||||
return (uint8)(dhp.mastering_display_actual_peak_luminance_flag)
|
||||
}
|
||||
|
||||
// Custom: SetMasteringDisplayActualPeakLuminanceFlag sets `AVDynamicHDRPlus.mastering_display_actual_peak_luminance_flag` value.
|
||||
// SetMasteringDisplayActualPeakLuminanceFlag sets `AVDynamicHDRPlus.mastering_display_actual_peak_luminance_flag` value.
|
||||
func (dhp *AVDynamicHDRPlus) SetMasteringDisplayActualPeakLuminanceFlag(v uint8) {
|
||||
dhp.mastering_display_actual_peak_luminance_flag = (C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetMasteringDisplayActualPeakLuminanceFlagAddr gets `AVDynamicHDRPlus.mastering_display_actual_peak_luminance_flag` address.
|
||||
// GetMasteringDisplayActualPeakLuminanceFlagAddr gets `AVDynamicHDRPlus.mastering_display_actual_peak_luminance_flag` address.
|
||||
func (dhp *AVDynamicHDRPlus) GetMasteringDisplayActualPeakLuminanceFlagAddr() *uint8 {
|
||||
return (*uint8)(&dhp.mastering_display_actual_peak_luminance_flag)
|
||||
}
|
||||
|
||||
// Custom: GetNumRowsMasteringDisplayActualPeakLuminance gets `AVDynamicHDRPlus.num_rows_mastering_display_actual_peak_luminance` value.
|
||||
// GetNumRowsMasteringDisplayActualPeakLuminance gets `AVDynamicHDRPlus.num_rows_mastering_display_actual_peak_luminance` value.
|
||||
func (dhp *AVDynamicHDRPlus) GetNumRowsMasteringDisplayActualPeakLuminance() uint8 {
|
||||
return (uint8)(dhp.num_rows_mastering_display_actual_peak_luminance)
|
||||
}
|
||||
|
||||
// Custom: SetNumRowsMasteringDisplayActualPeakLuminance sets `AVDynamicHDRPlus.num_rows_mastering_display_actual_peak_luminance` value.
|
||||
// SetNumRowsMasteringDisplayActualPeakLuminance sets `AVDynamicHDRPlus.num_rows_mastering_display_actual_peak_luminance` value.
|
||||
func (dhp *AVDynamicHDRPlus) SetNumRowsMasteringDisplayActualPeakLuminance(v uint8) {
|
||||
dhp.num_rows_mastering_display_actual_peak_luminance = (C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetNumRowsMasteringDisplayActualPeakLuminanceAddr gets `AVDynamicHDRPlus.num_rows_mastering_display_actual_peak_luminance` address.
|
||||
// GetNumRowsMasteringDisplayActualPeakLuminanceAddr gets `AVDynamicHDRPlus.num_rows_mastering_display_actual_peak_luminance` address.
|
||||
func (dhp *AVDynamicHDRPlus) GetNumRowsMasteringDisplayActualPeakLuminanceAddr() *uint8 {
|
||||
return (*uint8)(&dhp.num_rows_mastering_display_actual_peak_luminance)
|
||||
}
|
||||
|
||||
// Custom: GetNumColsMasteringDisplayActualPeakLuminance gets `AVDynamicHDRPlus.num_cols_mastering_display_actual_peak_luminance` value.
|
||||
// GetNumColsMasteringDisplayActualPeakLuminance gets `AVDynamicHDRPlus.num_cols_mastering_display_actual_peak_luminance` value.
|
||||
func (dhp *AVDynamicHDRPlus) GetNumColsMasteringDisplayActualPeakLuminance() uint8 {
|
||||
return (uint8)(dhp.num_cols_mastering_display_actual_peak_luminance)
|
||||
}
|
||||
|
||||
// Custom: SetNumColsMasteringDisplayActualPeakLuminance sets `AVDynamicHDRPlus.num_cols_mastering_display_actual_peak_luminance` value.
|
||||
// SetNumColsMasteringDisplayActualPeakLuminance sets `AVDynamicHDRPlus.num_cols_mastering_display_actual_peak_luminance` value.
|
||||
func (dhp *AVDynamicHDRPlus) SetNumColsMasteringDisplayActualPeakLuminance(v uint8) {
|
||||
dhp.num_cols_mastering_display_actual_peak_luminance = (C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetNumColsMasteringDisplayActualPeakLuminanceAddr gets `AVDynamicHDRPlus.num_cols_mastering_display_actual_peak_luminance` address.
|
||||
// GetNumColsMasteringDisplayActualPeakLuminanceAddr gets `AVDynamicHDRPlus.num_cols_mastering_display_actual_peak_luminance` address.
|
||||
func (dhp *AVDynamicHDRPlus) GetNumColsMasteringDisplayActualPeakLuminanceAddr() *uint8 {
|
||||
return (*uint8)(&dhp.num_cols_mastering_display_actual_peak_luminance)
|
||||
}
|
||||
|
||||
// Custom: GetMasteringDisplayActualPeakLuminance gets `AVDynamicHDRPlus.mastering_display_actual_peak_luminance` value.
|
||||
// GetMasteringDisplayActualPeakLuminance gets `AVDynamicHDRPlus.mastering_display_actual_peak_luminance` value.
|
||||
func (dhp *AVDynamicHDRPlus) GetMasteringDisplayActualPeakLuminance() (v [][]AVRational) {
|
||||
for i := 0; i < 25; i++ {
|
||||
v = append(v, unsafe.Slice((*AVRational)(&dhp.mastering_display_actual_peak_luminance[i][0]), 25))
|
||||
@@ -603,7 +603,7 @@ func (dhp *AVDynamicHDRPlus) GetMasteringDisplayActualPeakLuminance() (v [][]AVR
|
||||
return v
|
||||
}
|
||||
|
||||
// Custom: SetMasteringDisplayActualPeakLuminance sets `AVDynamicHDRPlus.mastering_display_actual_peak_luminance` value.
|
||||
// SetMasteringDisplayActualPeakLuminance sets `AVDynamicHDRPlus.mastering_display_actual_peak_luminance` value.
|
||||
func (dhp *AVDynamicHDRPlus) SetMasteringDisplayActualPeakLuminance(v [][]AVRational) {
|
||||
for i := 0; i < FFMIN(len(v), 25); i++ {
|
||||
for j := 0; j < FFMIN(len(v[i]), 25); j++ {
|
||||
@@ -612,7 +612,7 @@ func (dhp *AVDynamicHDRPlus) SetMasteringDisplayActualPeakLuminance(v [][]AVRati
|
||||
}
|
||||
}
|
||||
|
||||
// Custom: GetMasteringDisplayActualPeakLuminanceAddr gets `AVDynamicHDRPlus.mastering_display_actual_peak_luminance` address.
|
||||
// GetMasteringDisplayActualPeakLuminanceAddr gets `AVDynamicHDRPlus.mastering_display_actual_peak_luminance` address.
|
||||
func (dhp *AVDynamicHDRPlus) GetMasteringDisplayActualPeakLuminanceAddr() **AVRational {
|
||||
return (**AVRational)(unsafe.Pointer(&dhp.mastering_display_actual_peak_luminance))
|
||||
}
|
||||
|
@@ -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)
|
||||
}
|
||||
|
@@ -3,6 +3,12 @@ package ffmpeg
|
||||
/*
|
||||
#include <libavutil/log.h>
|
||||
|
||||
typedef const char* (*av_class_item_name_func)(void* ctx);
|
||||
|
||||
typedef void* (*av_class_child_next_func)(void *obj, void *prev);
|
||||
|
||||
typedef const struct AVClass* (*av_class_child_class_next_func)(const struct AVClass *prev);
|
||||
|
||||
void av_log_wrap(void *avcl, int level, char *fmt) {
|
||||
av_log(avcl, level, fmt, NULL);
|
||||
}
|
||||
@@ -58,32 +64,92 @@ func Av_IS_OUTPUT_DEVICE(c AVClassCategory) bool {
|
||||
// AVClass
|
||||
type AVClass C.struct_AVClass
|
||||
|
||||
// Custom: GetClassName gets `AVClass.class_name` value.
|
||||
// GetClassName gets `AVClass.class_name` value.
|
||||
func (cls *AVClass) GetClassName() string {
|
||||
return C.GoString(cls.class_name)
|
||||
}
|
||||
|
||||
// Custom: GetOption gets `AVClass.option` value.
|
||||
// typedef const char* (*av_class_item_name_func)(void* ctx);
|
||||
type AvClassItemNameFunc = C.av_class_item_name_func
|
||||
|
||||
// GetItemName gets `AVClass.item_name` value.
|
||||
func (cls *AVClass) GetItemName() AvClassItemNameFunc {
|
||||
return (AvClassItemNameFunc)(cls.item_name)
|
||||
}
|
||||
|
||||
// SetItemName sets `AVClass.item_name` value.
|
||||
func (cls *AVClass) SetItemName(v AvClassItemNameFunc) {
|
||||
cls.item_name = (C.av_class_item_name_func)(v)
|
||||
}
|
||||
|
||||
// GetItemNameAddr gets `AVClass.item_name` address.
|
||||
func (cls *AVClass) GetItemNameAddr() *AvClassItemNameFunc {
|
||||
return (*AvClassItemNameFunc)(&cls.item_name)
|
||||
}
|
||||
|
||||
// GetOption gets `AVClass.option` value.
|
||||
func (cls *AVClass) GetOption() *AVOption {
|
||||
return (*AVOption)(cls.option)
|
||||
}
|
||||
|
||||
// Custom: GetVersion gets `AVClass.version` value.
|
||||
// GetVersion gets `AVClass.version` value.
|
||||
func (cls *AVClass) GetVersion() int32 {
|
||||
return (int32)(cls.version)
|
||||
}
|
||||
|
||||
// Custom: GetLogLevelOffsetOffset gets `AVClass.log_level_offset_offset` value.
|
||||
// GetLogLevelOffsetOffset gets `AVClass.log_level_offset_offset` value.
|
||||
func (cls *AVClass) GetLogLevelOffsetOffset() int32 {
|
||||
return (int32)(cls.log_level_offset_offset)
|
||||
}
|
||||
|
||||
// Custom: GetParentLogContextOffset gets `AVClass.parent_log_context_offset` value.
|
||||
// GetParentLogContextOffset gets `AVClass.parent_log_context_offset` value.
|
||||
func (cls *AVClass) GetParentLogContextOffset() int32 {
|
||||
return (int32)(cls.parent_log_context_offset)
|
||||
}
|
||||
|
||||
// Custom: GetCategory gets `AVClass.category` value.
|
||||
// typedef void* (*av_class_child_next_func)(void *obj, void *prev);
|
||||
type AvClassChildNextFunc = C.av_class_child_next_func
|
||||
|
||||
// typedef const struct AVClass* (*av_class_child_class_next_func)(const struct AVClass *prev);
|
||||
type AvClassChildClassNextFunc = C.av_class_child_class_next_func
|
||||
|
||||
// GetChildNext gets `AVClass.child_next` value.
|
||||
func (cls *AVClass) GetChildNext() AvClassChildNextFunc {
|
||||
return (AvClassChildNextFunc)(cls.child_next)
|
||||
}
|
||||
|
||||
// SetChildNext sets `AVClass.child_next` value.
|
||||
func (cls *AVClass) SetChildNext(v AvClassChildNextFunc) {
|
||||
cls.child_next = (C.av_class_child_next_func)(v)
|
||||
}
|
||||
|
||||
// GetChildNextAddr gets `AVClass.child_next` address.
|
||||
func (cls *AVClass) GetChildNextAddr() *AvClassChildNextFunc {
|
||||
return (*AvClassChildNextFunc)(&cls.child_next)
|
||||
}
|
||||
|
||||
// Deprecated: No use.
|
||||
//
|
||||
// GetChildClassNext gets `AVClass.child_class_next` value.
|
||||
func (cls *AVClass) GetChildClassNext() AvClassChildClassNextFunc {
|
||||
return (AvClassChildClassNextFunc)(cls.child_class_next)
|
||||
}
|
||||
|
||||
// Deprecated: No use.
|
||||
//
|
||||
// SetChildClassNext sets `AVClass.child_class_next` value.
|
||||
func (cls *AVClass) SetChildClassNext(v AvClassChildClassNextFunc) {
|
||||
cls.child_class_next = (C.av_class_child_class_next_func)(v)
|
||||
}
|
||||
|
||||
// Deprecated: No use.
|
||||
//
|
||||
// GetChildClassNextAddr gets `AVClass.child_class_next` address.
|
||||
func (cls *AVClass) GetChildClassNextAddr() *AvClassChildClassNextFunc {
|
||||
return (*AvClassChildClassNextFunc)(&cls.child_class_next)
|
||||
}
|
||||
|
||||
// GetCategory gets `AVClass.category` value.
|
||||
func (cls *AVClass) GetCategory() AVClassCategory {
|
||||
return (AVClassCategory)(cls.category)
|
||||
}
|
||||
@@ -139,7 +205,7 @@ func AvLogSetLevel(level int32) {
|
||||
C.av_log_set_level(C.int(level))
|
||||
}
|
||||
|
||||
// typedef void (*av_log_callback_func)(void*, int, const char*, va_list)
|
||||
// typedef void (*av_log_callback_func)(void*, int, const char*, va_list);
|
||||
type AVLogCallbackFunc = C.av_log_callback_func
|
||||
|
||||
// AvLogSetCallback sets the logging callback
|
||||
|
@@ -5,6 +5,6 @@ package ffmpeg
|
||||
*/
|
||||
import "C"
|
||||
|
||||
func FFALIGN[T HelperInteger](x, a T) T {
|
||||
func FFALIGN[T Integer](x, a T) T {
|
||||
return ((x) + (a) - 1) & ^((a) - 1)
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@ import "unsafe"
|
||||
// AVMasteringDisplayMetadata
|
||||
type AVMasteringDisplayMetadata C.struct_AVMasteringDisplayMetadata
|
||||
|
||||
// Custom: GetDisplayPrimaries gets `AVMasteringDisplayMetadata.display_primaries` value.
|
||||
// GetDisplayPrimaries gets `AVMasteringDisplayMetadata.display_primaries` value.
|
||||
func (mdm *AVMasteringDisplayMetadata) GetDisplayPrimaries() (v [][]AVRational) {
|
||||
for i := 0; i < 3; i++ {
|
||||
v = append(v, unsafe.Slice((*AVRational)(&mdm.display_primaries[i][0]), 2))
|
||||
@@ -17,7 +17,7 @@ func (mdm *AVMasteringDisplayMetadata) GetDisplayPrimaries() (v [][]AVRational)
|
||||
return v
|
||||
}
|
||||
|
||||
// Custom: SetDisplayPrimaries sets `AVMasteringDisplayMetadata.display_primaries` value.
|
||||
// SetDisplayPrimaries sets `AVMasteringDisplayMetadata.display_primaries` value.
|
||||
func (mdm *AVMasteringDisplayMetadata) SetDisplayPrimaries(v [][]AVRational) {
|
||||
for i := 0; i < FFMIN(len(v), 3); i++ {
|
||||
for j := 0; j < FFMIN(len(v[i]), 2); j++ {
|
||||
@@ -26,84 +26,84 @@ func (mdm *AVMasteringDisplayMetadata) SetDisplayPrimaries(v [][]AVRational) {
|
||||
}
|
||||
}
|
||||
|
||||
// Custom: GetDisplayPrimariesAddr gets `AVMasteringDisplayMetadata.display_primaries` address.
|
||||
// GetDisplayPrimariesAddr gets `AVMasteringDisplayMetadata.display_primaries` address.
|
||||
func (mdm *AVMasteringDisplayMetadata) GetDisplayPrimariesAddr() **AVRational {
|
||||
return (**AVRational)(unsafe.Pointer(&mdm.display_primaries))
|
||||
}
|
||||
|
||||
// Custom: GetWhitePoint gets `AVMasteringDisplayMetadata.white_point` value.
|
||||
// GetWhitePoint gets `AVMasteringDisplayMetadata.white_point` value.
|
||||
func (mdm *AVMasteringDisplayMetadata) GetWhitePoint() []AVRational {
|
||||
return unsafe.Slice((*AVRational)(&mdm.white_point[0]), 2)
|
||||
}
|
||||
|
||||
// Custom: SetWhitePoint sets `AVMasteringDisplayMetadata.white_point` value.
|
||||
// SetWhitePoint sets `AVMasteringDisplayMetadata.white_point` value.
|
||||
func (mdm *AVMasteringDisplayMetadata) SetWhitePoint(v []AVRational) {
|
||||
for i := 0; i < FFMIN(len(v), 2); i++ {
|
||||
mdm.white_point[i] = (C.struct_AVRational)(v[i])
|
||||
}
|
||||
}
|
||||
|
||||
// Custom: GetWhitePointAddr gets `AVMasteringDisplayMetadata.white_point` address.
|
||||
// GetWhitePointAddr gets `AVMasteringDisplayMetadata.white_point` address.
|
||||
func (mdm *AVMasteringDisplayMetadata) GetWhitePointAddr() **AVRational {
|
||||
return (**AVRational)(unsafe.Pointer(&mdm.white_point))
|
||||
}
|
||||
|
||||
// Custom: GetMinLuminance gets `AVMasteringDisplayMetadata.min_luminance` value.
|
||||
// GetMinLuminance gets `AVMasteringDisplayMetadata.min_luminance` value.
|
||||
func (mdm *AVMasteringDisplayMetadata) GetMinLuminance() AVRational {
|
||||
return (AVRational)(mdm.min_luminance)
|
||||
}
|
||||
|
||||
// Custom: SetMinLuminance sets `AVMasteringDisplayMetadata.min_luminance` value.
|
||||
// SetMinLuminance sets `AVMasteringDisplayMetadata.min_luminance` value.
|
||||
func (mdm *AVMasteringDisplayMetadata) SetMinLuminance(v AVRational) {
|
||||
mdm.min_luminance = (C.struct_AVRational)(v)
|
||||
}
|
||||
|
||||
// Custom: GetMinLuminanceAddr gets `AVMasteringDisplayMetadata.min_luminance` address.
|
||||
// GetMinLuminanceAddr gets `AVMasteringDisplayMetadata.min_luminance` address.
|
||||
func (mdm *AVMasteringDisplayMetadata) GetMinLuminanceAddr() *AVRational {
|
||||
return (*AVRational)(&mdm.min_luminance)
|
||||
}
|
||||
|
||||
// Custom: GetMaxLuminance gets `AVMasteringDisplayMetadata.max_luminance` value.
|
||||
// GetMaxLuminance gets `AVMasteringDisplayMetadata.max_luminance` value.
|
||||
func (mdm *AVMasteringDisplayMetadata) GetMaxLuminance() AVRational {
|
||||
return (AVRational)(mdm.max_luminance)
|
||||
}
|
||||
|
||||
// Custom: SetMaxLuminance sets `AVMasteringDisplayMetadata.max_luminance` value.
|
||||
// SetMaxLuminance sets `AVMasteringDisplayMetadata.max_luminance` value.
|
||||
func (mdm *AVMasteringDisplayMetadata) SetMaxLuminance(v AVRational) {
|
||||
mdm.max_luminance = (C.struct_AVRational)(v)
|
||||
}
|
||||
|
||||
// Custom: GetMaxLuminanceAddr gets `AVMasteringDisplayMetadata.max_luminance` address.
|
||||
// GetMaxLuminanceAddr gets `AVMasteringDisplayMetadata.max_luminance` address.
|
||||
func (mdm *AVMasteringDisplayMetadata) GetMaxLuminanceAddr() *AVRational {
|
||||
return (*AVRational)(&mdm.max_luminance)
|
||||
}
|
||||
|
||||
// Custom: GetHasPrimaries gets `AVMasteringDisplayMetadata.has_primaries` value.
|
||||
// GetHasPrimaries gets `AVMasteringDisplayMetadata.has_primaries` value.
|
||||
func (mdm *AVMasteringDisplayMetadata) GetHasPrimaries() int32 {
|
||||
return (int32)(mdm.has_primaries)
|
||||
}
|
||||
|
||||
// Custom: SetHasPrimaries sets `AVMasteringDisplayMetadata.has_primaries` value.
|
||||
// SetHasPrimaries sets `AVMasteringDisplayMetadata.has_primaries` value.
|
||||
func (mdm *AVMasteringDisplayMetadata) SetHasPrimaries(v int32) {
|
||||
mdm.has_primaries = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetHasPrimariesAddr gets `AVMasteringDisplayMetadata.has_primaries` address.
|
||||
// GetHasPrimariesAddr gets `AVMasteringDisplayMetadata.has_primaries` address.
|
||||
func (mdm *AVMasteringDisplayMetadata) GetHasPrimariesAddr() *int32 {
|
||||
return (*int32)(&mdm.has_primaries)
|
||||
}
|
||||
|
||||
// Custom: GetHasLuminance gets `AVMasteringDisplayMetadata.has_luminance` value.
|
||||
// GetHasLuminance gets `AVMasteringDisplayMetadata.has_luminance` value.
|
||||
func (mdm *AVMasteringDisplayMetadata) GetHasLuminance() int32 {
|
||||
return (int32)(mdm.has_luminance)
|
||||
}
|
||||
|
||||
// Custom: SetHasLuminance sets `AVMasteringDisplayMetadata.has_luminance` value.
|
||||
// SetHasLuminance sets `AVMasteringDisplayMetadata.has_luminance` value.
|
||||
func (mdm *AVMasteringDisplayMetadata) SetHasLuminance(v int32) {
|
||||
mdm.has_luminance = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetHasLuminanceAddr gets `AVMasteringDisplayMetadata.has_luminance` address.
|
||||
// GetHasLuminanceAddr gets `AVMasteringDisplayMetadata.has_luminance` address.
|
||||
func (mdm *AVMasteringDisplayMetadata) GetHasLuminanceAddr() *int32 {
|
||||
return (*int32)(&mdm.has_luminance)
|
||||
}
|
||||
@@ -124,32 +124,32 @@ func AvMasteringDisplayMetadataCreateSideData(frame *AVFrame) *AVMasteringDispla
|
||||
// AVContentLightMetadata
|
||||
type AVContentLightMetadata C.struct_AVContentLightMetadata
|
||||
|
||||
// Custom: GetMaxCLL gets `AVContentLightMetadata.MaxCLL` value.
|
||||
// GetMaxCLL gets `AVContentLightMetadata.MaxCLL` value.
|
||||
func (clm *AVContentLightMetadata) GetMaxCLL() uint32 {
|
||||
return (uint32)(clm.MaxCLL)
|
||||
}
|
||||
|
||||
// Custom: SetMaxCLL sets `AVContentLightMetadata.MaxCLL` value.
|
||||
// SetMaxCLL sets `AVContentLightMetadata.MaxCLL` value.
|
||||
func (clm *AVContentLightMetadata) SetMaxCLL(v uint32) {
|
||||
clm.MaxCLL = (C.uint)(v)
|
||||
}
|
||||
|
||||
// Custom: GetMaxCLLAddr gets `AVContentLightMetadata.MaxCLL` address.
|
||||
// GetMaxCLLAddr gets `AVContentLightMetadata.MaxCLL` address.
|
||||
func (clm *AVContentLightMetadata) GetMaxCLLAddr() *uint32 {
|
||||
return (*uint32)(&clm.MaxCLL)
|
||||
}
|
||||
|
||||
// Custom: GetMaxFALL gets `AVContentLightMetadata.MaxFALL` value.
|
||||
// GetMaxFALL gets `AVContentLightMetadata.MaxFALL` value.
|
||||
func (clm *AVContentLightMetadata) GetMaxFALL() uint32 {
|
||||
return (uint32)(clm.MaxFALL)
|
||||
}
|
||||
|
||||
// Custom: SetMaxFALL sets `AVContentLightMetadata.MaxFALL` value.
|
||||
// SetMaxFALL sets `AVContentLightMetadata.MaxFALL` value.
|
||||
func (clm *AVContentLightMetadata) SetMaxFALL(v uint32) {
|
||||
clm.MaxFALL = (C.uint)(v)
|
||||
}
|
||||
|
||||
// Custom: GetMaxFALLAddr gets `AVContentLightMetadata.MaxFALL` address.
|
||||
// GetMaxFALLAddr gets `AVContentLightMetadata.MaxFALL` address.
|
||||
func (clm *AVContentLightMetadata) GetMaxFALLAddr() *uint32 {
|
||||
return (*uint32)(&clm.MaxFALL)
|
||||
}
|
||||
|
@@ -8,64 +8,64 @@ import "unsafe"
|
||||
|
||||
// AvMalloc allocates a memory block with alignment suitable for all memory accesses
|
||||
// (including vectors if available on the CPU).
|
||||
func AvMalloc[T HelperInteger](size T) unsafe.Pointer {
|
||||
func AvMalloc[T Integer](size T) unsafe.Pointer {
|
||||
return C.av_malloc((C.size_t)(size))
|
||||
}
|
||||
|
||||
// AvMallocz allocates a memory block with alignment suitable for all memory accesses
|
||||
// (including vectors if available on the CPU) and zero all the bytes of the
|
||||
// block.
|
||||
func AvMallocz[T HelperInteger](size T) unsafe.Pointer {
|
||||
func AvMallocz[T Integer](size T) unsafe.Pointer {
|
||||
return C.av_mallocz((C.size_t)(size))
|
||||
}
|
||||
|
||||
// AvMallocArray allocates a memory block for an array with AvMalloc().
|
||||
func AvMallocArray[U, V HelperInteger](nmemb U, size V) unsafe.Pointer {
|
||||
func AvMallocArray[U, V Integer](nmemb U, size V) unsafe.Pointer {
|
||||
return C.av_malloc_array((C.size_t)(nmemb), (C.size_t)(size))
|
||||
}
|
||||
|
||||
// AvMalloczArray allocates a memory block for an array with AvMallocz().
|
||||
func AvMalloczArray[U, V HelperInteger](nmemb U, size V) unsafe.Pointer {
|
||||
func AvMalloczArray[U, V Integer](nmemb U, size V) unsafe.Pointer {
|
||||
return C.av_mallocz_array((C.size_t)(nmemb), (C.size_t)(size))
|
||||
}
|
||||
|
||||
// AvCalloc is non-inlined equivalent of AvMalloczArray().
|
||||
func AvCalloc[U, V HelperInteger](nmemb U, size V) unsafe.Pointer {
|
||||
func AvCalloc[U, V Integer](nmemb U, size V) unsafe.Pointer {
|
||||
return C.av_calloc((C.size_t)(nmemb), (C.size_t)(size))
|
||||
}
|
||||
|
||||
// AvRealloc allocates, reallocates, or frees a block of memory.
|
||||
func AvRealloc[T HelperInteger](ptr CVoidPointer, size T) unsafe.Pointer {
|
||||
func AvRealloc[T Integer](ptr CVoidPointer, size T) unsafe.Pointer {
|
||||
return C.av_realloc(VoidPointer(ptr), (C.size_t)(size))
|
||||
}
|
||||
|
||||
// AvReallocp allocates, reallocates, or frees a block of memory through a pointer to a pointer.
|
||||
func AvReallocp[T HelperInteger](ptr CVoidPointer, size T) int32 {
|
||||
func AvReallocp[T Integer](ptr CVoidPointer, size T) int32 {
|
||||
return (int32)(C.av_reallocp(VoidPointer(ptr), (C.size_t)(size)))
|
||||
}
|
||||
|
||||
// AvReallocF allocates, reallocates, or frees a block of memory.
|
||||
func AvReallocF[U, V HelperInteger](ptr CVoidPointer, nelem U, elsize V) unsafe.Pointer {
|
||||
func AvReallocF[U, V Integer](ptr CVoidPointer, nelem U, elsize V) unsafe.Pointer {
|
||||
return C.av_realloc_f(VoidPointer(ptr), (C.size_t)(nelem), (C.size_t)(elsize))
|
||||
}
|
||||
|
||||
// AvReallocpArray allocates, reallocates, or frees an array through a pointer to a pointer.
|
||||
func AvReallocpArray[U, V HelperInteger](ptr CVoidPointer, nmemb U, size V) int32 {
|
||||
func AvReallocpArray[U, V Integer](ptr CVoidPointer, nmemb U, size V) int32 {
|
||||
return (int32)(C.av_reallocp_array(VoidPointer(ptr), (C.size_t)(nmemb), (C.size_t)(size)))
|
||||
}
|
||||
|
||||
// AvFastRealloc reallocates the given buffer if it is not large enough, otherwise do nothing.
|
||||
func AvFastRealloc[T HelperInteger](ptr CVoidPointer, size *uint32, minSize T) unsafe.Pointer {
|
||||
func AvFastRealloc[T Integer](ptr CVoidPointer, size *uint32, minSize T) unsafe.Pointer {
|
||||
return C.av_fast_realloc(VoidPointer(ptr), (*C.uint)(size), (C.size_t)(minSize))
|
||||
}
|
||||
|
||||
// AvFastMalloc allocates a buffer, reusing the given one if large enough.
|
||||
func AvFastMalloc[T HelperInteger](ptr CVoidPointer, size *uint32, minSize T) {
|
||||
func AvFastMalloc[T Integer](ptr CVoidPointer, size *uint32, minSize T) {
|
||||
C.av_fast_malloc(VoidPointer(ptr), (*C.uint)(size), (C.size_t)(minSize))
|
||||
}
|
||||
|
||||
// AvFastMallocz allocates and clear a buffer, reusing the given one if large enough.
|
||||
func AvFastMallocz[T HelperInteger](ptr CVoidPointer, size *uint32, minSize T) {
|
||||
func AvFastMallocz[T Integer](ptr CVoidPointer, size *uint32, minSize T) {
|
||||
C.av_fast_mallocz(VoidPointer(ptr), (*C.uint)(size), (C.size_t)(minSize))
|
||||
}
|
||||
|
||||
@@ -87,12 +87,12 @@ func AvStrdup(s *int8) *int8 {
|
||||
}
|
||||
|
||||
// AvStrndup
|
||||
func AvStrndup[T HelperInteger](s *int8, len T) *int8 {
|
||||
func AvStrndup[T Integer](s *int8, len T) *int8 {
|
||||
return (*int8)(C.av_strndup((*C.char)(s), (C.size_t)(len)))
|
||||
}
|
||||
|
||||
// AvMemdup duplicates a buffer with av_malloc().
|
||||
func AvMemdup[T HelperInteger](p CVoidPointer, size T) unsafe.Pointer {
|
||||
func AvMemdup[T Integer](p CVoidPointer, size T) unsafe.Pointer {
|
||||
return C.av_memdup(VoidPointer(p), (C.size_t)(size))
|
||||
}
|
||||
|
||||
@@ -112,18 +112,18 @@ func AvDynarrayAddNofree(tabPtr CVoidPointer, nbPtr *int32, elem CVoidPointer) i
|
||||
}
|
||||
|
||||
// AvDynarray2Add adds an element of size `elem_size` to a dynamic array.
|
||||
func AvDynarray2Add[T HelperInteger](tabPtr CVoidPointerPointer, nbPtr *int32,
|
||||
func AvDynarray2Add[T Integer](tabPtr CVoidPointerPointer, nbPtr *int32,
|
||||
elemSize T, elemData *uint8) unsafe.Pointer {
|
||||
return C.av_dynarray2_add(VoidPointerPointer(tabPtr),
|
||||
(*C.int)(nbPtr), (C.size_t)(elemSize), (*C.uint8_t)(elemData))
|
||||
}
|
||||
|
||||
// AvSizeMult multiplies two `size_t` values checking for overflow.
|
||||
func AvSizeMult[T HelperInteger](a, b T, r *uintptr) int32 {
|
||||
func AvSizeMult[T Integer](a, b T, r *uintptr) int32 {
|
||||
return (int32)(C.av_size_mult((C.size_t)(a), (C.size_t)(b), (*C.size_t)(unsafe.Pointer(r))))
|
||||
}
|
||||
|
||||
// AvMaxAlloc sets the maximum size that may be allocated in one block.
|
||||
func AvMaxAlloc[T HelperInteger](max T) {
|
||||
func AvMaxAlloc[T Integer](max T) {
|
||||
C.av_max_alloc((C.size_t)(max))
|
||||
}
|
||||
|
@@ -7,167 +7,167 @@ import "C"
|
||||
|
||||
type AVMotionVector C.struct_AVMotionVector
|
||||
|
||||
// Custom: GetSource gets `AVMotionVector.source` value.
|
||||
// GetSource gets `AVMotionVector.source` value.
|
||||
func (mv *AVMotionVector) GetSource() int32 {
|
||||
return (int32)(mv.source)
|
||||
}
|
||||
|
||||
// Custom: SetSource sets `AVMotionVector.source` value.
|
||||
// SetSource sets `AVMotionVector.source` value.
|
||||
func (mv *AVMotionVector) SetSource(v int32) {
|
||||
mv.source = (C.int32_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetSourceAddr gets `AVMotionVector.source` address.
|
||||
// GetSourceAddr gets `AVMotionVector.source` address.
|
||||
func (mv *AVMotionVector) GetSourceAddr() *int32 {
|
||||
return (*int32)(&mv.source)
|
||||
}
|
||||
|
||||
// Custom: GetW gets `AVMotionVector.w` value.
|
||||
// GetW gets `AVMotionVector.w` value.
|
||||
func (mv *AVMotionVector) GetW() uint8 {
|
||||
return (uint8)(mv.w)
|
||||
}
|
||||
|
||||
// Custom: SetW sets `AVMotionVector.w` value.
|
||||
// SetW sets `AVMotionVector.w` value.
|
||||
func (mv *AVMotionVector) SetW(v uint8) {
|
||||
mv.w = (C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetWAddr gets `AVMotionVector.w` address.
|
||||
// GetWAddr gets `AVMotionVector.w` address.
|
||||
func (mv *AVMotionVector) GetWAddr() *uint8 {
|
||||
return (*uint8)(&mv.w)
|
||||
}
|
||||
|
||||
// Custom: GetH gets `AVMotionVector.h` value.
|
||||
// GetH gets `AVMotionVector.h` value.
|
||||
func (mv *AVMotionVector) GetH() uint8 {
|
||||
return (uint8)(mv.h)
|
||||
}
|
||||
|
||||
// Custom: SetH sets `AVMotionVector.h` value.
|
||||
// SetH sets `AVMotionVector.h` value.
|
||||
func (mv *AVMotionVector) SetH(v uint8) {
|
||||
mv.h = (C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetHAddr gets `AVMotionVector.h` address.
|
||||
// GetHAddr gets `AVMotionVector.h` address.
|
||||
func (mv *AVMotionVector) GetHAddr() *uint8 {
|
||||
return (*uint8)(&mv.h)
|
||||
}
|
||||
|
||||
// Custom: GetSrcX gets `AVMotionVector.src_x` value.
|
||||
// GetSrcX gets `AVMotionVector.src_x` value.
|
||||
func (mv *AVMotionVector) GetSrcX() int16 {
|
||||
return (int16)(mv.src_x)
|
||||
}
|
||||
|
||||
// Custom: SetSrcX sets `AVMotionVector.src_x` value.
|
||||
// SetSrcX sets `AVMotionVector.src_x` value.
|
||||
func (mv *AVMotionVector) SetSrcX(v int16) {
|
||||
mv.src_x = (C.int16_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetSrcXAddr gets `AVMotionVector.src_x` address.
|
||||
// GetSrcXAddr gets `AVMotionVector.src_x` address.
|
||||
func (mv *AVMotionVector) GetSrcXAddr() *int16 {
|
||||
return (*int16)(&mv.src_x)
|
||||
}
|
||||
|
||||
// Custom: GetSrcY gets `AVMotionVector.src_y` value.
|
||||
// GetSrcY gets `AVMotionVector.src_y` value.
|
||||
func (mv *AVMotionVector) GetSrcY() int16 {
|
||||
return (int16)(mv.src_y)
|
||||
}
|
||||
|
||||
// Custom: SetSrcY sets `AVMotionVector.src_y` value.
|
||||
// SetSrcY sets `AVMotionVector.src_y` value.
|
||||
func (mv *AVMotionVector) SetSrcY(v int16) {
|
||||
mv.src_y = (C.int16_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetSrcYAddr gets `AVMotionVector.src_y` address.
|
||||
// GetSrcYAddr gets `AVMotionVector.src_y` address.
|
||||
func (mv *AVMotionVector) GetSrcYAddr() *int16 {
|
||||
return (*int16)(&mv.src_y)
|
||||
}
|
||||
|
||||
// Custom: GetDstX gets `AVMotionVector.dst_x` value.
|
||||
// GetDstX gets `AVMotionVector.dst_x` value.
|
||||
func (mv *AVMotionVector) GetDstX() int16 {
|
||||
return (int16)(mv.dst_x)
|
||||
}
|
||||
|
||||
// Custom: SetDstX sets `AVMotionVector.dst_x` value.
|
||||
// SetDstX sets `AVMotionVector.dst_x` value.
|
||||
func (mv *AVMotionVector) SetDstX(v int16) {
|
||||
mv.dst_x = (C.int16_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetDstXAddr gets `AVMotionVector.dst_x` address.
|
||||
// GetDstXAddr gets `AVMotionVector.dst_x` address.
|
||||
func (mv *AVMotionVector) GetDstXAddr() *int16 {
|
||||
return (*int16)(&mv.dst_x)
|
||||
}
|
||||
|
||||
// Custom: GetDstY gets `AVMotionVector.dst_y` value.
|
||||
// GetDstY gets `AVMotionVector.dst_y` value.
|
||||
func (mv *AVMotionVector) GetDstY() int16 {
|
||||
return (int16)(mv.dst_y)
|
||||
}
|
||||
|
||||
// Custom: SetDstY sets `AVMotionVector.dst_y` value.
|
||||
// SetDstY sets `AVMotionVector.dst_y` value.
|
||||
func (mv *AVMotionVector) SetDstY(v int16) {
|
||||
mv.dst_y = (C.int16_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetDstYAddr gets `AVMotionVector.dst_y` address.
|
||||
// GetDstYAddr gets `AVMotionVector.dst_y` address.
|
||||
func (mv *AVMotionVector) GetDstYAddr() *int16 {
|
||||
return (*int16)(&mv.dst_y)
|
||||
}
|
||||
|
||||
// Custom: GetFlags gets `AVMotionVector.flags` value.
|
||||
// GetFlags gets `AVMotionVector.flags` value.
|
||||
func (mv *AVMotionVector) GetFlags() uint64 {
|
||||
return (uint64)(mv.flags)
|
||||
}
|
||||
|
||||
// Custom: SetFlags sets `AVMotionVector.flags` value.
|
||||
// SetFlags sets `AVMotionVector.flags` value.
|
||||
func (mv *AVMotionVector) SetFlags(v uint64) {
|
||||
mv.flags = (C.uint64_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetFlagsAddr gets `AVMotionVector.flags` address.
|
||||
// GetFlagsAddr gets `AVMotionVector.flags` address.
|
||||
func (mv *AVMotionVector) GetFlagsAddr() *uint64 {
|
||||
return (*uint64)(&mv.flags)
|
||||
}
|
||||
|
||||
// Custom: GetMotionX gets `AVMotionVector.motion_x` value.
|
||||
// GetMotionX gets `AVMotionVector.motion_x` value.
|
||||
func (mv *AVMotionVector) GetMotionX() int32 {
|
||||
return (int32)(mv.motion_x)
|
||||
}
|
||||
|
||||
// Custom: SetMotionX sets `AVMotionVector.motion_x` value.
|
||||
// SetMotionX sets `AVMotionVector.motion_x` value.
|
||||
func (mv *AVMotionVector) SetMotionX(v int32) {
|
||||
mv.motion_x = (C.int32_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetMotionXAddr gets `AVMotionVector.motion_x` address.
|
||||
// GetMotionXAddr gets `AVMotionVector.motion_x` address.
|
||||
func (mv *AVMotionVector) GetMotionXAddr() *int32 {
|
||||
return (*int32)(&mv.motion_x)
|
||||
}
|
||||
|
||||
// Custom: GetMotionY gets `AVMotionVector.motion_y` value.
|
||||
// GetMotionY gets `AVMotionVector.motion_y` value.
|
||||
func (mv *AVMotionVector) GetMotionY() int32 {
|
||||
return (int32)(mv.motion_y)
|
||||
}
|
||||
|
||||
// Custom: SetMotionY sets `AVMotionVector.motion_y` value.
|
||||
// SetMotionY sets `AVMotionVector.motion_y` value.
|
||||
func (mv *AVMotionVector) SetMotionY(v int32) {
|
||||
mv.motion_y = (C.int32_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetMotionYAddr gets `AVMotionVector.motion_y` address.
|
||||
// GetMotionYAddr gets `AVMotionVector.motion_y` address.
|
||||
func (mv *AVMotionVector) GetMotionYAddr() *int32 {
|
||||
return (*int32)(&mv.motion_y)
|
||||
}
|
||||
|
||||
// Custom: GetMotionScale gets `AVMotionVector.motion_scale` value.
|
||||
// GetMotionScale gets `AVMotionVector.motion_scale` value.
|
||||
func (mv *AVMotionVector) GetMotionScale() uint16 {
|
||||
return (uint16)(mv.motion_scale)
|
||||
}
|
||||
|
||||
// Custom: SetMotionScale sets `AVMotionVector.motion_scale` value.
|
||||
// SetMotionScale sets `AVMotionVector.motion_scale` value.
|
||||
func (mv *AVMotionVector) SetMotionScale(v uint16) {
|
||||
mv.motion_scale = (C.uint16_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetMotionScaleAddr gets `AVMotionVector.motion_scale` address.
|
||||
// GetMotionScaleAddr gets `AVMotionVector.motion_scale` address.
|
||||
func (mv *AVMotionVector) GetMotionScaleAddr() *uint16 {
|
||||
return (*uint16)(&mv.motion_scale)
|
||||
}
|
||||
|
122
avutil_opt.go
122
avutil_opt.go
@@ -51,15 +51,11 @@ AVRational* get_av_option_default_val_q_addr(AVOption *opt) {
|
||||
return &opt->default_val.q;
|
||||
}
|
||||
|
||||
int av_opt_set_int_list_wrap(void *obj, const char *name, void *val, uint64_t term, int flags, int size) {
|
||||
if (av_int_list_length(val, term) > INT_MAX / size) {
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
return av_opt_set_bin(obj, name, (const uint8_t *)val, av_int_list_length(val, term) * size , flags);
|
||||
}
|
||||
*/
|
||||
import "C"
|
||||
import (
|
||||
"math"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
@@ -91,147 +87,147 @@ const (
|
||||
// AVOption
|
||||
type AVOption C.struct_AVOption
|
||||
|
||||
// Custom: GetName gets `AVOption.name` value.
|
||||
// GetName gets `AVOption.name` value.
|
||||
func (opt *AVOption) GetName() string {
|
||||
return C.GoString(opt.name)
|
||||
}
|
||||
|
||||
// Custom: GetHelp gets `AVOption.help` value.
|
||||
// GetHelp gets `AVOption.help` value.
|
||||
func (opt *AVOption) GetHelp() string {
|
||||
return C.GoString(opt.help)
|
||||
}
|
||||
|
||||
// Custom: GetOffset gets `AVOption.offset` value.
|
||||
// GetOffset gets `AVOption.offset` value.
|
||||
func (opt *AVOption) GetOffset() int32 {
|
||||
return (int32)(opt.offset)
|
||||
}
|
||||
|
||||
// Custom: SetOffset sets `AVOption.offset` value.
|
||||
// SetOffset sets `AVOption.offset` value.
|
||||
func (opt *AVOption) SetOffset(v int32) {
|
||||
opt.offset = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetOffsetAddr gets `AVOption.offset` address.
|
||||
// GetOffsetAddr gets `AVOption.offset` address.
|
||||
func (opt *AVOption) GetOffsetAddr() *int32 {
|
||||
return (*int32)(&opt.offset)
|
||||
}
|
||||
|
||||
// Custom: GetType gets `AVOption.type` value.
|
||||
// GetType gets `AVOption.type` value.
|
||||
func (opt *AVOption) GetType() AVOptionType {
|
||||
return (AVOptionType)(opt._type)
|
||||
}
|
||||
|
||||
// Custom: SetType sets `AVOption.type` value.
|
||||
// SetType sets `AVOption.type` value.
|
||||
func (opt *AVOption) SetType(v AVOptionType) {
|
||||
opt._type = (C.enum_AVOptionType)(v)
|
||||
}
|
||||
|
||||
// Custom: GetTypeAddr gets `AVOption.type` address.
|
||||
// GetTypeAddr gets `AVOption.type` address.
|
||||
func (opt *AVOption) GetTypeAddr() *AVOptionType {
|
||||
return (*AVOptionType)(unsafe.Pointer(&opt._type))
|
||||
}
|
||||
|
||||
// Custom: GetDefaultValI64 gets `AVOption.default_val.i64` value.
|
||||
// GetDefaultValI64 gets `AVOption.default_val.i64` value.
|
||||
func (opt *AVOption) GetDefaultValI64() int64 {
|
||||
return (int64)(C.get_av_option_default_val_i64((*C.struct_AVOption)(opt)))
|
||||
}
|
||||
|
||||
// Custom: SetDefaultValI64 sets `AVOption.default_val.i64` value.
|
||||
// SetDefaultValI64 sets `AVOption.default_val.i64` value.
|
||||
func (opt *AVOption) SetDefaultValI64(v int64) {
|
||||
C.set_av_option_default_val_i64((*C.struct_AVOption)(opt), (C.int64_t)(v))
|
||||
}
|
||||
|
||||
// Custom: GetDefaultValI64Addr gets `AVOption.default_val.i64` address.
|
||||
// GetDefaultValI64Addr gets `AVOption.default_val.i64` address.
|
||||
func (opt *AVOption) GetDefaultValI64Addr() *int64 {
|
||||
return (*int64)(C.get_av_option_default_val_i64_addr((*C.struct_AVOption)(opt)))
|
||||
}
|
||||
|
||||
// Custom: GetDefaultValDbl gets `AVOption.default_val.dbl` value.
|
||||
// GetDefaultValDbl gets `AVOption.default_val.dbl` value.
|
||||
func (opt *AVOption) GetDefaultValDbl() float64 {
|
||||
return (float64)(C.get_av_option_default_val_dbl((*C.struct_AVOption)(opt)))
|
||||
}
|
||||
|
||||
// Custom: SetDefaultValDbl sets `AVOption.default_val.dbl` value.
|
||||
// SetDefaultValDbl sets `AVOption.default_val.dbl` value.
|
||||
func (opt *AVOption) SetDefaultValDbl(v float64) {
|
||||
C.set_av_option_default_val_dbl((*C.struct_AVOption)(opt), (C.double)(v))
|
||||
}
|
||||
|
||||
// Custom: GetDefaultValDblAddr gets `AVOption.default_val.dbl` address.
|
||||
// GetDefaultValDblAddr gets `AVOption.default_val.dbl` address.
|
||||
func (opt *AVOption) GetDefaultValDblAddr() *float64 {
|
||||
return (*float64)(C.get_av_option_default_val_dbl_addr((*C.struct_AVOption)(opt)))
|
||||
}
|
||||
|
||||
// Custom: GetDefaultValStr gets `AVOption.default_val.str` value.
|
||||
// GetDefaultValStr gets `AVOption.default_val.str` value.
|
||||
func (opt *AVOption) GetDefaultValStr() string {
|
||||
return C.GoString(C.get_av_option_default_val_str((*C.struct_AVOption)(opt)))
|
||||
}
|
||||
|
||||
// Custom: SetDefaultValStr sets `AVOption.default_val.str` value.
|
||||
// SetDefaultValStr sets `AVOption.default_val.str` value.
|
||||
func (opt *AVOption) SetDefaultValStr(v *int8) {
|
||||
C.set_av_option_default_val_str((*C.struct_AVOption)(opt), (*C.char)(v))
|
||||
}
|
||||
|
||||
// Custom: GetDefaultValStrAddr gets `AVOption.default_val.str` address.
|
||||
// GetDefaultValStrAddr gets `AVOption.default_val.str` address.
|
||||
func (opt *AVOption) GetDefaultValStrAddr() **int8 {
|
||||
return (**int8)(unsafe.Pointer(C.get_av_option_default_val_str_addr((*C.struct_AVOption)(opt))))
|
||||
}
|
||||
|
||||
// Custom: GetDefaultValQ gets `AVOption.default_val.q` value.
|
||||
// GetDefaultValQ gets `AVOption.default_val.q` value.
|
||||
func (opt *AVOption) GetDefaultValQ() AVRational {
|
||||
return (AVRational)(C.get_av_option_default_val_q((*C.struct_AVOption)(opt)))
|
||||
}
|
||||
|
||||
// Custom: SetDefaultValQ sets `AVOption.default_val.q` value.
|
||||
// SetDefaultValQ sets `AVOption.default_val.q` value.
|
||||
func (opt *AVOption) SetDefaultValQ(v AVRational) {
|
||||
C.set_av_option_default_val_q((*C.struct_AVOption)(opt), (C.struct_AVRational)(v))
|
||||
}
|
||||
|
||||
// Custom: GetDefaultValQAddr gets `AVOption.default_val.q` address.
|
||||
// GetDefaultValQAddr gets `AVOption.default_val.q` address.
|
||||
func (opt *AVOption) GetDefaultValQAddr() *AVRational {
|
||||
return (*AVRational)(C.get_av_option_default_val_q_addr((*C.struct_AVOption)(opt)))
|
||||
}
|
||||
|
||||
// Custom: GetMin gets `AVOption.min` value.
|
||||
// GetMin gets `AVOption.min` value.
|
||||
func (opt *AVOption) GetMin() float64 {
|
||||
return (float64)(opt.min)
|
||||
}
|
||||
|
||||
// Custom: SetMin sets `AVOption.min` value.
|
||||
// SetMin sets `AVOption.min` value.
|
||||
func (opt *AVOption) SetMin(v float64) {
|
||||
opt.min = (C.double)(v)
|
||||
}
|
||||
|
||||
// Custom: GetMinAddr gets `AVOption.min` address.
|
||||
// GetMinAddr gets `AVOption.min` address.
|
||||
func (opt *AVOption) GetMinAddr() *float64 {
|
||||
return (*float64)(&opt.min)
|
||||
}
|
||||
|
||||
// Custom: GetMax gets `AVOption.max` value.
|
||||
// GetMax gets `AVOption.max` value.
|
||||
func (opt *AVOption) GetMax() float64 {
|
||||
return (float64)(opt.max)
|
||||
}
|
||||
|
||||
// Custom: SetMax sets `AVOption.max` value.
|
||||
// SetMax sets `AVOption.max` value.
|
||||
func (opt *AVOption) SetMax(v float64) {
|
||||
opt.max = (C.double)(v)
|
||||
}
|
||||
|
||||
// Custom: GetMaxAddr gets `AVOption.max` address.
|
||||
// GetMaxAddr gets `AVOption.max` address.
|
||||
func (opt *AVOption) GetMaxAddr() *float64 {
|
||||
return (*float64)(&opt.max)
|
||||
}
|
||||
|
||||
// Custom: GetFlags gets `AVOption.flags` value.
|
||||
// GetFlags gets `AVOption.flags` value.
|
||||
func (opt *AVOption) GetFlags() int32 {
|
||||
return (int32)(opt.flags)
|
||||
}
|
||||
|
||||
// Custom: SetFlags sets `AVOption.flags` value.
|
||||
// SetFlags sets `AVOption.flags` value.
|
||||
func (opt *AVOption) SetFlags(v int32) {
|
||||
opt.flags = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetFlagsAddr gets `AVOption.flags` address.
|
||||
// GetFlagsAddr gets `AVOption.flags` address.
|
||||
func (opt *AVOption) GetFlagsAddr() *int32 {
|
||||
return (*int32)(&opt.flags)
|
||||
}
|
||||
@@ -253,7 +249,7 @@ const (
|
||||
AV_OPT_FLAG_CHILD_CONSTS = int32(C.AV_OPT_FLAG_CHILD_CONSTS)
|
||||
)
|
||||
|
||||
// Custom: GetUnit gets `AVOption.unit` value.
|
||||
// GetUnit gets `AVOption.unit` value.
|
||||
func (opt *AVOption) GetUnit() string {
|
||||
return C.GoString(opt.unit)
|
||||
}
|
||||
@@ -261,82 +257,82 @@ func (opt *AVOption) GetUnit() string {
|
||||
// AVOptionRange
|
||||
type AVOptionRange C.struct_AVOptionRange
|
||||
|
||||
// Custom: GetStr gets `AVOptionRange.str` value.
|
||||
// GetStr gets `AVOptionRange.str` value.
|
||||
func (optr *AVOptionRange) GetStr() string {
|
||||
return C.GoString(optr.str)
|
||||
}
|
||||
|
||||
// Custom: GetValueMin gets `AVOptionRange.value_min` value.
|
||||
// GetValueMin gets `AVOptionRange.value_min` value.
|
||||
func (optr *AVOptionRange) GetValueMin() float64 {
|
||||
return (float64)(optr.value_min)
|
||||
}
|
||||
|
||||
// Custom: SetValueMin sets `AVOptionRange.value_min` value.
|
||||
// SetValueMin sets `AVOptionRange.value_min` value.
|
||||
func (optr *AVOptionRange) SetValueMin(v float64) {
|
||||
optr.value_min = (C.double)(v)
|
||||
}
|
||||
|
||||
// Custom: GetValueMinAddr gets `AVOptionRange.value_min` address.
|
||||
// GetValueMinAddr gets `AVOptionRange.value_min` address.
|
||||
func (optr *AVOptionRange) GetValueMinAddr() *float64 {
|
||||
return (*float64)(&optr.value_min)
|
||||
}
|
||||
|
||||
// Custom: GetValueMax gets `AVOptionRange.value_max` value.
|
||||
// GetValueMax gets `AVOptionRange.value_max` value.
|
||||
func (optr *AVOptionRange) GetValueMax() float64 {
|
||||
return (float64)(optr.value_max)
|
||||
}
|
||||
|
||||
// Custom: SetValueMax sets `AVOptionRange.value_max` value.
|
||||
// SetValueMax sets `AVOptionRange.value_max` value.
|
||||
func (optr *AVOptionRange) SetValueMax(v float64) {
|
||||
optr.value_max = (C.double)(v)
|
||||
}
|
||||
|
||||
// Custom: GetValueMaxAddr gets `AVOptionRange.value_max` address.
|
||||
// GetValueMaxAddr gets `AVOptionRange.value_max` address.
|
||||
func (optr *AVOptionRange) GetValueMaxAddr() *float64 {
|
||||
return (*float64)(&optr.value_max)
|
||||
}
|
||||
|
||||
// Custom: GetComponentMin gets `AVOptionRange.component_min` value.
|
||||
// GetComponentMin gets `AVOptionRange.component_min` value.
|
||||
func (optr *AVOptionRange) GetComponentMin() float64 {
|
||||
return (float64)(optr.component_min)
|
||||
}
|
||||
|
||||
// Custom: SetComponentMin sets `AVOptionRange.component_min` value.
|
||||
// SetComponentMin sets `AVOptionRange.component_min` value.
|
||||
func (optr *AVOptionRange) SetComponentMin(v float64) {
|
||||
optr.component_min = (C.double)(v)
|
||||
}
|
||||
|
||||
// Custom: GetComponentMinAddr gets `AVOptionRange.component_min` address.
|
||||
// GetComponentMinAddr gets `AVOptionRange.component_min` address.
|
||||
func (optr *AVOptionRange) GetComponentMinAddr() *float64 {
|
||||
return (*float64)(&optr.component_min)
|
||||
}
|
||||
|
||||
// Custom: GetComponentMax gets `AVOptionRange.component_max` value.
|
||||
// GetComponentMax gets `AVOptionRange.component_max` value.
|
||||
func (optr *AVOptionRange) GetComponentMax() float64 {
|
||||
return (float64)(optr.component_max)
|
||||
}
|
||||
|
||||
// Custom: SetComponentMax sets `AVOptionRange.component_max` value.
|
||||
// SetComponentMax sets `AVOptionRange.component_max` value.
|
||||
func (optr *AVOptionRange) SetComponentMax(v float64) {
|
||||
optr.component_max = (C.double)(v)
|
||||
}
|
||||
|
||||
// Custom: GetComponentMaxAddr gets `AVOptionRange.component_max` address.
|
||||
// GetComponentMaxAddr gets `AVOptionRange.component_max` address.
|
||||
func (optr *AVOptionRange) GetComponentMaxAddr() *float64 {
|
||||
return (*float64)(&optr.component_max)
|
||||
}
|
||||
|
||||
// Custom: GetIsRange gets `AVOptionRange.isrange` value.
|
||||
// GetIsRange gets `AVOptionRange.isrange` value.
|
||||
func (optr *AVOptionRange) GetIsRange() int32 {
|
||||
return (int32)(optr.is_range)
|
||||
}
|
||||
|
||||
// Custom: SetIsRange sets `AVOptionRange.isrange` value.
|
||||
// SetIsRange sets `AVOptionRange.isrange` value.
|
||||
func (optr *AVOptionRange) SetIsRange(v int32) {
|
||||
optr.is_range = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetIsRangeAddr gets `AVOptionRange.isrange` address.
|
||||
// GetIsRangeAddr gets `AVOptionRange.isrange` address.
|
||||
func (optr *AVOptionRange) GetIsRangeAddr() *int32 {
|
||||
return (*int32)(&optr.is_range)
|
||||
}
|
||||
@@ -344,7 +340,7 @@ func (optr *AVOptionRange) GetIsRangeAddr() *int32 {
|
||||
// AVOptionRanges
|
||||
type AVOptionRanges C.struct_AVOptionRanges
|
||||
|
||||
// Custom: GetRange gets `AVOptionRanges.range` value.
|
||||
// GetRange gets `AVOptionRanges.range` value.
|
||||
func (optrs *AVOptionRanges) GetRange() []*AVOptionRange {
|
||||
if optrs._range == nil {
|
||||
return nil
|
||||
@@ -353,12 +349,12 @@ func (optrs *AVOptionRanges) GetRange() []*AVOptionRange {
|
||||
optrs.nb_components*optrs.nb_ranges)
|
||||
}
|
||||
|
||||
// Custom: GetNbRanges gets `AVOptionRanges.nb_ranges` value.
|
||||
// GetNbRanges gets `AVOptionRanges.nb_ranges` value.
|
||||
func (optrs *AVOptionRanges) GetNbRanges() int32 {
|
||||
return (int32)(optrs.nb_ranges)
|
||||
}
|
||||
|
||||
// Custom: GetNbComponents gets `AVOptionRanges.nb_components` value.
|
||||
// GetNbComponents gets `AVOptionRanges.nb_components` value.
|
||||
func (optrs *AVOptionRanges) GetNbComponents() int32 {
|
||||
return (int32)(optrs.nb_components)
|
||||
}
|
||||
@@ -508,6 +504,8 @@ func AvOptChildNext(obj, prev CVoidPointer) unsafe.Pointer {
|
||||
}
|
||||
|
||||
// Deprecated: Use AvOptChildClassIterate instead.
|
||||
//
|
||||
// AvOptChildClassNext
|
||||
func AvOptChildClassNext(parent, prev *AVClass) *AVClass {
|
||||
return (*AVClass)(C.av_opt_child_class_next((*C.struct_AVClass)(parent),
|
||||
(*C.struct_AVClass)(prev)))
|
||||
@@ -598,13 +596,17 @@ func AvOptSetDictVal(obj CVoidPointer, name string, val *AVDictionary, searchFla
|
||||
}
|
||||
|
||||
// AvOptSetIntList sets a binary option to an integer list.
|
||||
func AvOptSetIntList[T HelperInteger](obj CVoidPointer, name string,
|
||||
val *T, term uint64, flags int32) int32 {
|
||||
func AvOptSetIntList[U, V Integer](obj CVoidPointer, name string,
|
||||
val *U, term V, flags int32) int32 {
|
||||
namePtr, nameFunc := StringCasting(name)
|
||||
defer nameFunc()
|
||||
size := (int32)(unsafe.Sizeof(*val))
|
||||
return (int32)(C.av_opt_set_int_list_wrap(VoidPointer(obj), (*C.char)(namePtr),
|
||||
unsafe.Pointer(val), (C.uint64_t)(term), (C.int)(flags), (C.int)(size)))
|
||||
elmSize := (uint32)(unsafe.Sizeof(*val))
|
||||
lstSize := AvIntListLengthForSize(elmSize, val, term)
|
||||
if lstSize > uint32(math.MaxInt32)/elmSize {
|
||||
return AVERROR(syscall.EINVAL)
|
||||
}
|
||||
return (int32)(C.av_opt_set_bin(VoidPointer(obj), (*C.char)(namePtr),
|
||||
(*C.uint8_t)(unsafe.Pointer(val)), (C.int)(elmSize*lstSize), (C.int)(flags)))
|
||||
}
|
||||
|
||||
// AvOptGet
|
||||
|
@@ -8,167 +8,230 @@ import "unsafe"
|
||||
|
||||
type AVComponentDescriptor C.struct_AVComponentDescriptor
|
||||
|
||||
// Custom: GetPlane gets `AVComponentDescriptor.plane` value.
|
||||
// GetPlane gets `AVComponentDescriptor.plane` value.
|
||||
func (cd *AVComponentDescriptor) GetPlane() int32 {
|
||||
return (int32)(cd.plane)
|
||||
}
|
||||
|
||||
// Custom: SetPlane sets `AVComponentDescriptor.plane` value.
|
||||
// SetPlane sets `AVComponentDescriptor.plane` value.
|
||||
func (cd *AVComponentDescriptor) SetPlane(v int32) {
|
||||
cd.plane = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetPlaneAddr gets `AVComponentDescriptor.plane` address.
|
||||
// GetPlaneAddr gets `AVComponentDescriptor.plane` address.
|
||||
func (cd *AVComponentDescriptor) GetPlaneAddr() *int32 {
|
||||
return (*int32)(&cd.plane)
|
||||
}
|
||||
|
||||
// Custom: GetStep gets `AVComponentDescriptor.step` value.
|
||||
// GetStep gets `AVComponentDescriptor.step` value.
|
||||
func (cd *AVComponentDescriptor) GetStep() int32 {
|
||||
return (int32)(cd.step)
|
||||
}
|
||||
|
||||
// Custom: SetStep sets `AVComponentDescriptor.step` value.
|
||||
// SetStep sets `AVComponentDescriptor.step` value.
|
||||
func (cd *AVComponentDescriptor) SetStep(v int32) {
|
||||
cd.step = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetStepAddr gets `AVComponentDescriptor.step` address.
|
||||
// GetStepAddr gets `AVComponentDescriptor.step` address.
|
||||
func (cd *AVComponentDescriptor) GetStepAddr() *int32 {
|
||||
return (*int32)(&cd.step)
|
||||
}
|
||||
|
||||
// Custom: GetOffset gets `AVComponentDescriptor.offset` value.
|
||||
// GetOffset gets `AVComponentDescriptor.offset` value.
|
||||
func (cd *AVComponentDescriptor) GetOffset() int32 {
|
||||
return (int32)(cd.offset)
|
||||
}
|
||||
|
||||
// Custom: SetOffset sets `AVComponentDescriptor.offset` value.
|
||||
// SetOffset sets `AVComponentDescriptor.offset` value.
|
||||
func (cd *AVComponentDescriptor) SetOffset(v int32) {
|
||||
cd.offset = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetOffsetAddr gets `AVComponentDescriptor.offset` address.
|
||||
// GetOffsetAddr gets `AVComponentDescriptor.offset` address.
|
||||
func (cd *AVComponentDescriptor) GetOffsetAddr() *int32 {
|
||||
return (*int32)(&cd.offset)
|
||||
}
|
||||
|
||||
// Custom: GetShift gets `AVComponentDescriptor.shift` value.
|
||||
// GetShift gets `AVComponentDescriptor.shift` value.
|
||||
func (cd *AVComponentDescriptor) GetShift() int32 {
|
||||
return (int32)(cd.shift)
|
||||
}
|
||||
|
||||
// Custom: SetShift sets `AVComponentDescriptor.shift` value.
|
||||
// SetShift sets `AVComponentDescriptor.shift` value.
|
||||
func (cd *AVComponentDescriptor) SetShift(v int32) {
|
||||
cd.shift = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetShiftAddr gets `AVComponentDescriptor.shift` address.
|
||||
// GetShiftAddr gets `AVComponentDescriptor.shift` address.
|
||||
func (cd *AVComponentDescriptor) GetShiftAddr() *int32 {
|
||||
return (*int32)(&cd.shift)
|
||||
}
|
||||
|
||||
// Custom: GetDepth gets `AVComponentDescriptor.depth` value.
|
||||
// GetDepth gets `AVComponentDescriptor.depth` value.
|
||||
func (cd *AVComponentDescriptor) GetDepth() int32 {
|
||||
return (int32)(cd.depth)
|
||||
}
|
||||
|
||||
// Custom: SetDepth sets `AVComponentDescriptor.depth` value.
|
||||
// SetDepth sets `AVComponentDescriptor.depth` value.
|
||||
func (cd *AVComponentDescriptor) SetDepth(v int32) {
|
||||
cd.depth = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetDepthAddr gets `AVComponentDescriptor.depth` address.
|
||||
// GetDepthAddr gets `AVComponentDescriptor.depth` address.
|
||||
func (cd *AVComponentDescriptor) GetDepthAddr() *int32 {
|
||||
return (*int32)(&cd.depth)
|
||||
}
|
||||
|
||||
// Deprecated: Use step instead.
|
||||
//
|
||||
// GetStepMinus1 gets `AVComponentDescriptor.step_minus1` value.
|
||||
func (cd *AVComponentDescriptor) GetStepMinus1() int32 {
|
||||
return (int32)(cd.step_minus1)
|
||||
}
|
||||
|
||||
// Deprecated: Use step instead.
|
||||
//
|
||||
// SetStepMinus1 sets `AVComponentDescriptor.step_minus1` value.
|
||||
func (cd *AVComponentDescriptor) SetStepMinus1(v int32) {
|
||||
cd.step_minus1 = (C.int)(v)
|
||||
}
|
||||
|
||||
// Deprecated: Use step instead.
|
||||
//
|
||||
// GetStepMinus1Addr gets `AVComponentDescriptor.step_minus1` address.
|
||||
func (cd *AVComponentDescriptor) GetStepMinus1Addr() *int32 {
|
||||
return (*int32)(&cd.step_minus1)
|
||||
}
|
||||
|
||||
// Deprecated: Use depth instead.
|
||||
//
|
||||
// GetDepthMinus1 gets `AVComponentDescriptor.depth_minus1` value.
|
||||
func (cd *AVComponentDescriptor) GetDepthMinus1() int32 {
|
||||
return (int32)(cd.depth_minus1)
|
||||
}
|
||||
|
||||
// Deprecated: Use depth instead.
|
||||
//
|
||||
// SetDepthMinus1 sets `AVComponentDescriptor.depth_minus1` value.
|
||||
func (cd *AVComponentDescriptor) SetDepthMinus1(v int32) {
|
||||
cd.depth_minus1 = (C.int)(v)
|
||||
}
|
||||
|
||||
// Deprecated: Use depth instead.
|
||||
//
|
||||
// GetDepthMinus1Addr gets `AVComponentDescriptor.depth_minus1` address.
|
||||
func (cd *AVComponentDescriptor) GetDepthMinus1Addr() *int32 {
|
||||
return (*int32)(&cd.depth_minus1)
|
||||
}
|
||||
|
||||
// Deprecated: Use offset instead.
|
||||
//
|
||||
// GetOffsetPlus1 gets `AVComponentDescriptor.offset_plus1` value.
|
||||
func (cd *AVComponentDescriptor) GetOffsetPlus1() int32 {
|
||||
return (int32)(cd.offset_plus1)
|
||||
}
|
||||
|
||||
// Deprecated: Use offset instead.
|
||||
//
|
||||
// SetOffsetPlus1 sets `AVComponentDescriptor.offset_plus1` value.
|
||||
func (cd *AVComponentDescriptor) SetOffsetPlus1(v int32) {
|
||||
cd.offset_plus1 = (C.int)(v)
|
||||
}
|
||||
|
||||
// Deprecated: Use offset instead.
|
||||
//
|
||||
// GetOffsetPlus1Addr gets `AVComponentDescriptor.offset_plus1` address.
|
||||
func (cd *AVComponentDescriptor) GetOffsetPlus1Addr() *int32 {
|
||||
return (*int32)(&cd.offset_plus1)
|
||||
}
|
||||
|
||||
// AVPixFmtDescriptor
|
||||
type AVPixFmtDescriptor C.struct_AVPixFmtDescriptor
|
||||
|
||||
// Custom: GetName gets `AVPixFmtDescriptor.name` value.
|
||||
// GetName gets `AVPixFmtDescriptor.name` value.
|
||||
func (pfd *AVPixFmtDescriptor) GetName() string {
|
||||
return C.GoString(pfd.name)
|
||||
}
|
||||
|
||||
// Custom: GetNbComponents gets `AVPixFmtDescriptor.nb_components` value.
|
||||
// GetNbComponents gets `AVPixFmtDescriptor.nb_components` value.
|
||||
func (pfd *AVPixFmtDescriptor) GetNbComponents() uint8 {
|
||||
return (uint8)(pfd.nb_components)
|
||||
}
|
||||
|
||||
// Custom: SetNbComponents sets `AVPixFmtDescriptor.nb_components` value.
|
||||
// SetNbComponents sets `AVPixFmtDescriptor.nb_components` value.
|
||||
func (pfd *AVPixFmtDescriptor) SetNbComponents(v uint8) {
|
||||
pfd.nb_components = (C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetNbComponentsAddr gets `AVPixFmtDescriptor.nb_components` address.
|
||||
// GetNbComponentsAddr gets `AVPixFmtDescriptor.nb_components` address.
|
||||
func (pfd *AVPixFmtDescriptor) GetNbComponentsAddr() *uint8 {
|
||||
return (*uint8)(&pfd.nb_components)
|
||||
}
|
||||
|
||||
// Custom: GetLog2ChromaW gets `AVPixFmtDescriptor.log2_chroma_w` value.
|
||||
// GetLog2ChromaW gets `AVPixFmtDescriptor.log2_chroma_w` value.
|
||||
func (pfd *AVPixFmtDescriptor) GetLog2ChromaW() uint8 {
|
||||
return (uint8)(pfd.log2_chroma_w)
|
||||
}
|
||||
|
||||
// Custom: SetLog2ChromaW sets `AVPixFmtDescriptor.log2_chroma_w` value.
|
||||
// SetLog2ChromaW sets `AVPixFmtDescriptor.log2_chroma_w` value.
|
||||
func (pfd *AVPixFmtDescriptor) SetLog2ChromaW(v uint8) {
|
||||
pfd.log2_chroma_w = (C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetLog2ChromaWAddr gets `AVPixFmtDescriptor.log2_chroma_w` address.
|
||||
// GetLog2ChromaWAddr gets `AVPixFmtDescriptor.log2_chroma_w` address.
|
||||
func (pfd *AVPixFmtDescriptor) GetLog2ChromaWAddr() *uint8 {
|
||||
return (*uint8)(&pfd.log2_chroma_w)
|
||||
}
|
||||
|
||||
// Custom: GetLog2ChromaH gets `AVPixFmtDescriptor.log2_chroma_h` value.
|
||||
// GetLog2ChromaH gets `AVPixFmtDescriptor.log2_chroma_h` value.
|
||||
func (pfd *AVPixFmtDescriptor) GetLog2ChromaH() uint8 {
|
||||
return (uint8)(pfd.log2_chroma_h)
|
||||
}
|
||||
|
||||
// Custom: SetLog2ChromaH sets `AVPixFmtDescriptor.log2_chroma_h` value.
|
||||
// SetLog2ChromaH sets `AVPixFmtDescriptor.log2_chroma_h` value.
|
||||
func (pfd *AVPixFmtDescriptor) SetLog2ChromaH(v uint8) {
|
||||
pfd.log2_chroma_h = (C.uint8_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetLog2ChromaHAddr gets `AVPixFmtDescriptor.log2_chroma_h` address.
|
||||
// GetLog2ChromaHAddr gets `AVPixFmtDescriptor.log2_chroma_h` address.
|
||||
func (pfd *AVPixFmtDescriptor) GetLog2ChromaHAddr() *uint8 {
|
||||
return (*uint8)(&pfd.log2_chroma_h)
|
||||
}
|
||||
|
||||
// Custom: GetFlags gets `AVPixFmtDescriptor.flags` value.
|
||||
// GetFlags gets `AVPixFmtDescriptor.flags` value.
|
||||
func (pfd *AVPixFmtDescriptor) GetFlags() uint64 {
|
||||
return (uint64)(pfd.flags)
|
||||
}
|
||||
|
||||
// Custom: SetFlags sets `AVPixFmtDescriptor.flags` value.
|
||||
// SetFlags sets `AVPixFmtDescriptor.flags` value.
|
||||
func (pfd *AVPixFmtDescriptor) SetFlags(v uint64) {
|
||||
pfd.flags = (C.uint64_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetFlagsAddr gets `AVPixFmtDescriptor.flags` address.
|
||||
// GetFlagsAddr gets `AVPixFmtDescriptor.flags` address.
|
||||
func (pfd *AVPixFmtDescriptor) GetFlagsAddr() *uint64 {
|
||||
return (*uint64)(&pfd.flags)
|
||||
}
|
||||
|
||||
// Custom: GetComp gets `AVPixFmtDescriptor.comp` value.
|
||||
// GetComp gets `AVPixFmtDescriptor.comp` value.
|
||||
func (pfd *AVPixFmtDescriptor) GetComp() []AVComponentDescriptor {
|
||||
return unsafe.Slice((*AVComponentDescriptor)(&pfd.comp[0]), 4)
|
||||
}
|
||||
|
||||
// Custom: SetComp sets `AVPixFmtDescriptor.comp` value.
|
||||
// SetComp sets `AVPixFmtDescriptor.comp` value.
|
||||
func (pfd *AVPixFmtDescriptor) SetComp(v []AVComponentDescriptor) {
|
||||
for i := 0; i < FFMIN(len(v), 4); i++ {
|
||||
pfd.comp[i] = (C.struct_AVComponentDescriptor)(v[i])
|
||||
}
|
||||
}
|
||||
|
||||
// Custom: GetCompAddr gets `AVPixFmtDescriptor.comp` address.
|
||||
// GetCompAddr gets `AVPixFmtDescriptor.comp` address.
|
||||
func (pfd *AVPixFmtDescriptor) GetCompAddr() **AVComponentDescriptor {
|
||||
return (**AVComponentDescriptor)(unsafe.Pointer(&pfd.comp))
|
||||
}
|
||||
|
||||
// Custom: GetAlias gets `AVPixFmtDescriptor.alias` value.
|
||||
// GetAlias gets `AVPixFmtDescriptor.alias` value.
|
||||
func (pfd *AVPixFmtDescriptor) GetAlias() string {
|
||||
return C.GoString(pfd.alias)
|
||||
}
|
||||
|
@@ -8,12 +8,12 @@ import "C"
|
||||
// AVRational
|
||||
type AVRational C.struct_AVRational
|
||||
|
||||
// Custom: GetNum gets `AVRational.num` value.
|
||||
// GetNum gets `AVRational.num` value.
|
||||
func (q *AVRational) GetNum() int32 {
|
||||
return (int32)(q.num)
|
||||
}
|
||||
|
||||
// Custom: GetDen gets `AVRational.den` value.
|
||||
// GetDen gets `AVRational.den` value.
|
||||
func (q *AVRational) GetDen() int32 {
|
||||
return (int32)(q.den)
|
||||
}
|
||||
|
@@ -8,62 +8,62 @@ import "C"
|
||||
// AVReplayGain
|
||||
type AVReplayGain C.struct_AVReplayGain
|
||||
|
||||
// Custom: GetTrackGain gets `AVReplayGain.track_gain` value.
|
||||
// GetTrackGain gets `AVReplayGain.track_gain` value.
|
||||
func (rg *AVReplayGain) GetTrackGain() int32 {
|
||||
return (int32)(rg.track_gain)
|
||||
}
|
||||
|
||||
// Custom: SetTrackGain sets `AVReplayGain.track_gain` value.
|
||||
// SetTrackGain sets `AVReplayGain.track_gain` value.
|
||||
func (rg *AVReplayGain) SetTrackGain(v int32) {
|
||||
rg.track_gain = (C.int32_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetTrackGainAddr gets `AVReplayGain.track_gain` address.
|
||||
// GetTrackGainAddr gets `AVReplayGain.track_gain` address.
|
||||
func (rg *AVReplayGain) GetTrackGainAddr() *int32 {
|
||||
return (*int32)(&rg.track_gain)
|
||||
}
|
||||
|
||||
// Custom: GetTrackPeak gets `AVReplayGain.track_peak` value.
|
||||
// GetTrackPeak gets `AVReplayGain.track_peak` value.
|
||||
func (rg *AVReplayGain) GetTrackPeak() uint32 {
|
||||
return (uint32)(rg.track_peak)
|
||||
}
|
||||
|
||||
// Custom: SetTrackPeak sets `AVReplayGain.track_peak` value.
|
||||
// SetTrackPeak sets `AVReplayGain.track_peak` value.
|
||||
func (rg *AVReplayGain) SetTrackPeak(v uint32) {
|
||||
rg.track_peak = (C.uint32_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetTrackPeakAddr gets `AVReplayGain.track_peak` address.
|
||||
// GetTrackPeakAddr gets `AVReplayGain.track_peak` address.
|
||||
func (rg *AVReplayGain) GetTrackPeakAddr() *uint32 {
|
||||
return (*uint32)(&rg.track_peak)
|
||||
}
|
||||
|
||||
// Custom: GetAlbumGain gets `AVReplayGain.album_gain` value.
|
||||
// GetAlbumGain gets `AVReplayGain.album_gain` value.
|
||||
func (rg *AVReplayGain) GetAlbumGain() int32 {
|
||||
return (int32)(rg.album_gain)
|
||||
}
|
||||
|
||||
// Custom: SetAlbumGain sets `AVReplayGain.album_gain` value.
|
||||
// SetAlbumGain sets `AVReplayGain.album_gain` value.
|
||||
func (rg *AVReplayGain) SetAlbumGain(v int32) {
|
||||
rg.album_gain = (C.int32_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetAlbumGainAddr gets `AVReplayGain.album_gain` address.
|
||||
// GetAlbumGainAddr gets `AVReplayGain.album_gain` address.
|
||||
func (rg *AVReplayGain) GetAlbumGainAddr() *int32 {
|
||||
return (*int32)(&rg.album_gain)
|
||||
}
|
||||
|
||||
// Custom: GetAlbumPeak gets `AVReplayGain.album_peak` value.
|
||||
// GetAlbumPeak gets `AVReplayGain.album_peak` value.
|
||||
func (rg *AVReplayGain) GetAlbumPeak() uint32 {
|
||||
return (uint32)(rg.album_peak)
|
||||
}
|
||||
|
||||
// Custom: SetAlbumPeak sets `AVReplayGain.album_peak` value.
|
||||
// SetAlbumPeak sets `AVReplayGain.album_peak` value.
|
||||
func (rg *AVReplayGain) SetAlbumPeak(v uint32) {
|
||||
rg.album_peak = (C.uint32_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetAlbumPeakAddr gets `AVReplayGain.album_peak` address.
|
||||
// GetAlbumPeakAddr gets `AVReplayGain.album_peak` address.
|
||||
func (rg *AVReplayGain) GetAlbumPeakAddr() *uint32 {
|
||||
return (*uint32)(&rg.album_peak)
|
||||
}
|
||||
|
@@ -16,137 +16,137 @@ const (
|
||||
|
||||
type AVSphericalMapping C.struct_AVSphericalMapping
|
||||
|
||||
// Custom: GetProjection gets `AVSphericalMapping.projection` value.
|
||||
// GetProjection gets `AVSphericalMapping.projection` value.
|
||||
func (smp *AVSphericalMapping) GetProjection() AVSphericalProjection {
|
||||
return (AVSphericalProjection)(smp.projection)
|
||||
}
|
||||
|
||||
// Custom: SetProjection sets `AVSphericalMapping.projection` value.
|
||||
// SetProjection sets `AVSphericalMapping.projection` value.
|
||||
func (smp *AVSphericalMapping) SetProjection(v AVSphericalProjection) {
|
||||
smp.projection = (C.enum_AVSphericalProjection)(v)
|
||||
}
|
||||
|
||||
// Custom: GetProjectionAddr gets `AVSphericalMapping.projection` address.
|
||||
// GetProjectionAddr gets `AVSphericalMapping.projection` address.
|
||||
func (smp *AVSphericalMapping) GetProjectionAddr() *AVSphericalProjection {
|
||||
return (*AVSphericalProjection)(&smp.projection)
|
||||
}
|
||||
|
||||
// Custom: GetYaw gets `AVSphericalMapping.yaw` value.
|
||||
// GetYaw gets `AVSphericalMapping.yaw` value.
|
||||
func (smp *AVSphericalMapping) GetYaw() int32 {
|
||||
return (int32)(smp.yaw)
|
||||
}
|
||||
|
||||
// Custom: SetYaw sets `AVSphericalMapping.yaw` value.
|
||||
// SetYaw sets `AVSphericalMapping.yaw` value.
|
||||
func (smp *AVSphericalMapping) SetYaw(v int32) {
|
||||
smp.yaw = (C.int32_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetYawAddr gets `AVSphericalMapping.yaw` address.
|
||||
// GetYawAddr gets `AVSphericalMapping.yaw` address.
|
||||
func (smp *AVSphericalMapping) GetYawAddr() *int32 {
|
||||
return (*int32)(&smp.yaw)
|
||||
}
|
||||
|
||||
// Custom: GetPitch gets `AVSphericalMapping.pitch` value.
|
||||
// GetPitch gets `AVSphericalMapping.pitch` value.
|
||||
func (smp *AVSphericalMapping) GetPitch() int32 {
|
||||
return (int32)(smp.pitch)
|
||||
}
|
||||
|
||||
// Custom: SetPitch sets `AVSphericalMapping.pitch` value.
|
||||
// SetPitch sets `AVSphericalMapping.pitch` value.
|
||||
func (smp *AVSphericalMapping) SetPitch(v int32) {
|
||||
smp.pitch = (C.int32_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetPitchAddr gets `AVSphericalMapping.pitch` address.
|
||||
// GetPitchAddr gets `AVSphericalMapping.pitch` address.
|
||||
func (smp *AVSphericalMapping) GetPitchAddr() *int32 {
|
||||
return (*int32)(&smp.pitch)
|
||||
}
|
||||
|
||||
// Custom: GetRoll gets `AVSphericalMapping.roll` value.
|
||||
// GetRoll gets `AVSphericalMapping.roll` value.
|
||||
func (smp *AVSphericalMapping) GetRoll() int32 {
|
||||
return (int32)(smp.roll)
|
||||
}
|
||||
|
||||
// Custom: SetRoll sets `AVSphericalMapping.roll` value.
|
||||
// SetRoll sets `AVSphericalMapping.roll` value.
|
||||
func (smp *AVSphericalMapping) SetRoll(v int32) {
|
||||
smp.roll = (C.int32_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetRollAddr gets `AVSphericalMapping.roll` address.
|
||||
// GetRollAddr gets `AVSphericalMapping.roll` address.
|
||||
func (smp *AVSphericalMapping) GetRollAddr() *int32 {
|
||||
return (*int32)(&smp.roll)
|
||||
}
|
||||
|
||||
// Custom: GetBoundLeft gets `AVSphericalMapping.bound_left` value.
|
||||
// GetBoundLeft gets `AVSphericalMapping.bound_left` value.
|
||||
func (smp *AVSphericalMapping) GetBoundLeft() uint32 {
|
||||
return (uint32)(smp.bound_left)
|
||||
}
|
||||
|
||||
// Custom: SetBoundLeft sets `AVSphericalMapping.bound_left` value.
|
||||
// SetBoundLeft sets `AVSphericalMapping.bound_left` value.
|
||||
func (smp *AVSphericalMapping) SetBoundLeft(v uint32) {
|
||||
smp.bound_left = (C.uint32_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetBoundLeftAddr gets `AVSphericalMapping.bound_left` address.
|
||||
// GetBoundLeftAddr gets `AVSphericalMapping.bound_left` address.
|
||||
func (smp *AVSphericalMapping) GetBoundLeftAddr() *uint32 {
|
||||
return (*uint32)(&smp.bound_left)
|
||||
}
|
||||
|
||||
// Custom: GetBoundTop gets `AVSphericalMapping.bound_top` value.
|
||||
// GetBoundTop gets `AVSphericalMapping.bound_top` value.
|
||||
func (smp *AVSphericalMapping) GetBoundTop() uint32 {
|
||||
return (uint32)(smp.bound_top)
|
||||
}
|
||||
|
||||
// Custom: SetBoundTop sets `AVSphericalMapping.bound_top` value.
|
||||
// SetBoundTop sets `AVSphericalMapping.bound_top` value.
|
||||
func (smp *AVSphericalMapping) SetBoundTop(v uint32) {
|
||||
smp.bound_top = (C.uint32_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetBoundTopAddr gets `AVSphericalMapping.bound_top` address.
|
||||
// GetBoundTopAddr gets `AVSphericalMapping.bound_top` address.
|
||||
func (smp *AVSphericalMapping) GetBoundTopAddr() *uint32 {
|
||||
return (*uint32)(&smp.bound_top)
|
||||
}
|
||||
|
||||
// Custom: GetBoundRight gets `AVSphericalMapping.bound_right` value.
|
||||
// GetBoundRight gets `AVSphericalMapping.bound_right` value.
|
||||
func (smp *AVSphericalMapping) GetBoundRight() uint32 {
|
||||
return (uint32)(smp.bound_right)
|
||||
}
|
||||
|
||||
// Custom: SetBoundRight sets `AVSphericalMapping.bound_right` value.
|
||||
// SetBoundRight sets `AVSphericalMapping.bound_right` value.
|
||||
func (smp *AVSphericalMapping) SetBoundRight(v uint32) {
|
||||
smp.bound_right = (C.uint32_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetBoundRightAddr gets `AVSphericalMapping.bound_right` address.
|
||||
// GetBoundRightAddr gets `AVSphericalMapping.bound_right` address.
|
||||
func (smp *AVSphericalMapping) GetBoundRightAddr() *uint32 {
|
||||
return (*uint32)(&smp.bound_right)
|
||||
}
|
||||
|
||||
// Custom: GetBoundBottom gets `AVSphericalMapping.bound_bottom` value.
|
||||
// GetBoundBottom gets `AVSphericalMapping.bound_bottom` value.
|
||||
func (smp *AVSphericalMapping) GetBoundBottom() uint32 {
|
||||
return (uint32)(smp.bound_bottom)
|
||||
}
|
||||
|
||||
// Custom: SetBoundBottom sets `AVSphericalMapping.bound_bottom` value.
|
||||
// SetBoundBottom sets `AVSphericalMapping.bound_bottom` value.
|
||||
func (smp *AVSphericalMapping) SetBoundBottom(v uint32) {
|
||||
smp.bound_bottom = (C.uint32_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetBoundBottomAddr gets `AVSphericalMapping.bound_bottom` address.
|
||||
// GetBoundBottomAddr gets `AVSphericalMapping.bound_bottom` address.
|
||||
func (smp *AVSphericalMapping) GetBoundBottomAddr() *uint32 {
|
||||
return (*uint32)(&smp.bound_bottom)
|
||||
}
|
||||
|
||||
// Custom: GetPadding gets `AVSphericalMapping.padding` value.
|
||||
// GetPadding gets `AVSphericalMapping.padding` value.
|
||||
func (smp *AVSphericalMapping) GetPadding() uint32 {
|
||||
return (uint32)(smp.padding)
|
||||
}
|
||||
|
||||
// Custom: SetPadding sets `AVSphericalMapping.padding` value.
|
||||
// SetPadding sets `AVSphericalMapping.padding` value.
|
||||
func (smp *AVSphericalMapping) SetPadding(v uint32) {
|
||||
smp.padding = (C.uint32_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetPaddingAddr gets `AVSphericalMapping.padding` address.
|
||||
// GetPaddingAddr gets `AVSphericalMapping.padding` address.
|
||||
func (smp *AVSphericalMapping) GetPaddingAddr() *uint32 {
|
||||
return (*uint32)(&smp.padding)
|
||||
}
|
||||
|
@@ -34,47 +34,47 @@ const (
|
||||
|
||||
type AVStereo3D C.struct_AVStereo3D
|
||||
|
||||
// Custom: GetType gets `AVStereo3D.type` value.
|
||||
// GetType gets `AVStereo3D.type` value.
|
||||
func (s3d *AVStereo3D) GetType() AVStereo3DType {
|
||||
return (AVStereo3DType)(s3d._type)
|
||||
}
|
||||
|
||||
// Custom: SetType sets `AVStereo3D.type` value.
|
||||
// SetType sets `AVStereo3D.type` value.
|
||||
func (s3d *AVStereo3D) SetType(v AVStereo3DType) {
|
||||
s3d._type = (C.enum_AVStereo3DType)(v)
|
||||
}
|
||||
|
||||
// Custom: GetTypeAddr gets `AVStereo3D.type` address.
|
||||
// GetTypeAddr gets `AVStereo3D.type` address.
|
||||
func (s3d *AVStereo3D) GetTypeAddr() *AVStereo3DType {
|
||||
return (*AVStereo3DType)(&s3d._type)
|
||||
}
|
||||
|
||||
// Custom: GetFlags gets `AVStereo3D.flags` value.
|
||||
// GetFlags gets `AVStereo3D.flags` value.
|
||||
func (s3d *AVStereo3D) GetFlags() int32 {
|
||||
return (int32)(s3d.flags)
|
||||
}
|
||||
|
||||
// Custom: SetFlags sets `AVStereo3D.flags` value.
|
||||
// SetFlags sets `AVStereo3D.flags` value.
|
||||
func (s3d *AVStereo3D) SetFlags(v int32) {
|
||||
s3d.flags = (C.int32_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetFlagsAddr gets `AVStereo3D.flags` address.
|
||||
// GetFlagsAddr gets `AVStereo3D.flags` address.
|
||||
func (s3d *AVStereo3D) GetFlagsAddr() *int32 {
|
||||
return (*int32)(&s3d.flags)
|
||||
}
|
||||
|
||||
// Custom: GetView gets `AVStereo3D.view` value.
|
||||
// GetView gets `AVStereo3D.view` value.
|
||||
func (s3d *AVStereo3D) GetView() AVStereo3DView {
|
||||
return (AVStereo3DView)(s3d.view)
|
||||
}
|
||||
|
||||
// Custom: SetView sets `AVStereo3D.view` value.
|
||||
// SetView sets `AVStereo3D.view` value.
|
||||
func (s3d *AVStereo3D) SetView(v AVStereo3DView) {
|
||||
s3d.view = (C.enum_AVStereo3DView)(v)
|
||||
}
|
||||
|
||||
// Custom: GetViewAddr gets `AVStereo3D.view` address.
|
||||
// GetViewAddr gets `AVStereo3D.view` address.
|
||||
func (s3d *AVStereo3D) GetViewAddr() *AVStereo3DView {
|
||||
return (*AVStereo3DView)(&s3d.view)
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@ const (
|
||||
)
|
||||
|
||||
// AvThreadMessageQueueAlloc allocates a new message queue.
|
||||
func AvThreadMessageQueueAlloc[T HelperInteger](mq **AVThreadMessageQueue, nelem, elsize T) int32 {
|
||||
func AvThreadMessageQueueAlloc[T Integer](mq **AVThreadMessageQueue, nelem, elsize T) int32 {
|
||||
return (int32)(C.av_thread_message_queue_alloc(
|
||||
(**C.struct_AVThreadMessageQueue)(unsafe.Pointer(mq)), (C.uint)(nelem), (C.uint)(elsize)))
|
||||
}
|
||||
|
@@ -19,62 +19,62 @@ const (
|
||||
|
||||
type AVTimecode C.AVTimecode
|
||||
|
||||
// Custom: GetStart gets `AVTimecode.start` value.
|
||||
// GetStart gets `AVTimecode.start` value.
|
||||
func (tc *AVTimecode) GetStart() int32 {
|
||||
return (int32)(tc.start)
|
||||
}
|
||||
|
||||
// Custom: SetStart sets `AVTimecode.start` value.
|
||||
// SetStart sets `AVTimecode.start` value.
|
||||
func (tc *AVTimecode) SetStart(v int32) {
|
||||
tc.start = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetStartAddr gets `AVTimecode.start` address.
|
||||
// GetStartAddr gets `AVTimecode.start` address.
|
||||
func (tc *AVTimecode) GetStartAddr() *int32 {
|
||||
return (*int32)(&tc.start)
|
||||
}
|
||||
|
||||
// Custom: GetFlags gets `AVTimecode.flags` value.
|
||||
// GetFlags gets `AVTimecode.flags` value.
|
||||
func (tc *AVTimecode) GetFlags() uint32 {
|
||||
return (uint32)(tc.flags)
|
||||
}
|
||||
|
||||
// Custom: SetFlags sets `AVTimecode.flags` value.
|
||||
// SetFlags sets `AVTimecode.flags` value.
|
||||
func (tc *AVTimecode) SetFlags(v uint32) {
|
||||
tc.flags = (C.uint32_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetFlagsAddr gets `AVTimecode.flags` address.
|
||||
// GetFlagsAddr gets `AVTimecode.flags` address.
|
||||
func (tc *AVTimecode) GetFlagsAddr() *uint32 {
|
||||
return (*uint32)(&tc.flags)
|
||||
}
|
||||
|
||||
// Custom: GetRate gets `AVTimecode.rate` value.
|
||||
// GetRate gets `AVTimecode.rate` value.
|
||||
func (tc *AVTimecode) GetRate() AVRational {
|
||||
return (AVRational)(tc.rate)
|
||||
}
|
||||
|
||||
// Custom: SetRate sets `AVTimecode.rate` value.
|
||||
// SetRate sets `AVTimecode.rate` value.
|
||||
func (tc *AVTimecode) SetRate(v AVRational) {
|
||||
tc.rate = (C.struct_AVRational)(v)
|
||||
}
|
||||
|
||||
// Custom: GetRateAddr gets `AVTimecode.rate` address.
|
||||
// GetRateAddr gets `AVTimecode.rate` address.
|
||||
func (tc *AVTimecode) GetRateAddr() *AVRational {
|
||||
return (*AVRational)(&tc.rate)
|
||||
}
|
||||
|
||||
// Custom: GetFps gets `AVTimecode.fps` value.
|
||||
// GetFps gets `AVTimecode.fps` value.
|
||||
func (tc *AVTimecode) GetFps() uint32 {
|
||||
return (uint32)(tc.fps)
|
||||
}
|
||||
|
||||
// Custom: SetFps sets `AVTimecode.fps` value.
|
||||
// SetFps sets `AVTimecode.fps` value.
|
||||
func (tc *AVTimecode) SetFps(v uint32) {
|
||||
tc.fps = (C.uint)(v)
|
||||
}
|
||||
|
||||
// Custom: GetFpsAddr gets `AVTimecode.fps` address.
|
||||
// GetFpsAddr gets `AVTimecode.fps` address.
|
||||
func (tc *AVTimecode) GetFpsAddr() *uint32 {
|
||||
return (*uint32)(&tc.fps)
|
||||
}
|
||||
|
@@ -16,7 +16,7 @@ func AvTsMakeString(ts int64) string {
|
||||
}
|
||||
|
||||
// AvTs2str
|
||||
func AvTs2str[T HelperInteger](ts T) string {
|
||||
func AvTs2str[T Integer](ts T) string {
|
||||
return AvTsMakeString(int64(ts))
|
||||
}
|
||||
|
||||
@@ -28,6 +28,6 @@ func AvTsMakeTimeString(ts int64, tb *AVRational) string {
|
||||
}
|
||||
|
||||
// AvTs2timestr
|
||||
func AvTs2timestr[T HelperInteger](ts T, tb *AVRational) string {
|
||||
func AvTs2timestr[T Integer](ts T, tb *AVRational) string {
|
||||
return AvTsMakeTimeString((int64)(ts), tb)
|
||||
}
|
||||
|
42
avutil_tx.go
42
avutil_tx.go
@@ -12,39 +12,39 @@ type AVTXContext C.struct_AVTXContext
|
||||
// AVComplexFloat
|
||||
type AVComplexFloat C.struct_AVComplexFloat
|
||||
|
||||
// Custom: Make new AVComplexFloat.
|
||||
// Make new AVComplexFloat.
|
||||
func AvMakeComxFloat(re, im float32) AVComplexFloat {
|
||||
return (AVComplexFloat)(C.struct_AVComplexFloat{
|
||||
re: (C.float)(re),
|
||||
im: (C.float)(im)})
|
||||
}
|
||||
|
||||
// Custom: GetRe gets `AVComplexFloat.re` value.
|
||||
// GetRe gets `AVComplexFloat.re` value.
|
||||
func (cf *AVComplexFloat) GetRe() float32 {
|
||||
return (float32)(cf.re)
|
||||
}
|
||||
|
||||
// Custom: SetRe sets `AVComplexFloat.re` value.
|
||||
// SetRe sets `AVComplexFloat.re` value.
|
||||
func (cf *AVComplexFloat) SetRe(v float32) {
|
||||
cf.re = (C.float)(v)
|
||||
}
|
||||
|
||||
// Custom: GetReAddr gets `AVComplexFloat.re` address.
|
||||
// GetReAddr gets `AVComplexFloat.re` address.
|
||||
func (cf *AVComplexFloat) GetReAddr() *float32 {
|
||||
return (*float32)(&cf.re)
|
||||
}
|
||||
|
||||
// Custom: GetIm gets `AVComplexFloat.im` value.
|
||||
// GetIm gets `AVComplexFloat.im` value.
|
||||
func (cf *AVComplexFloat) GetIm() float32 {
|
||||
return (float32)(cf.im)
|
||||
}
|
||||
|
||||
// Custom: SetIm sets `AVComplexFloat.im` value.
|
||||
// SetIm sets `AVComplexFloat.im` value.
|
||||
func (cf *AVComplexFloat) SetIm(v float32) {
|
||||
cf.im = (C.float)(v)
|
||||
}
|
||||
|
||||
// Custom: GetImAddr gets `AVComplexFloat.im` address.
|
||||
// GetImAddr gets `AVComplexFloat.im` address.
|
||||
func (cf *AVComplexFloat) GetImAddr() *float32 {
|
||||
return (*float32)(&cf.im)
|
||||
}
|
||||
@@ -52,39 +52,39 @@ func (cf *AVComplexFloat) GetImAddr() *float32 {
|
||||
// AVComplexDouble
|
||||
type AVComplexDouble C.struct_AVComplexDouble
|
||||
|
||||
// Custom: Make new AVComplexDouble.
|
||||
// Make new AVComplexDouble.
|
||||
func AvMakeComxDouble(re, im float64) AVComplexDouble {
|
||||
return (AVComplexDouble)(C.struct_AVComplexDouble{
|
||||
re: (C.double)(re),
|
||||
im: (C.double)(im)})
|
||||
}
|
||||
|
||||
// Custom: GetRe gets `AVComplexDouble.re` value.
|
||||
// GetRe gets `AVComplexDouble.re` value.
|
||||
func (cd *AVComplexDouble) GetRe() float64 {
|
||||
return (float64)(cd.re)
|
||||
}
|
||||
|
||||
// Custom: SetRe sets `AVComplexDouble.re` value.
|
||||
// SetRe sets `AVComplexDouble.re` value.
|
||||
func (cd *AVComplexDouble) SetRe(v float64) {
|
||||
cd.re = (C.double)(v)
|
||||
}
|
||||
|
||||
// Custom: GetReAddr gets `AVComplexDouble.re` address.
|
||||
// GetReAddr gets `AVComplexDouble.re` address.
|
||||
func (cd *AVComplexDouble) GetReAddr() *float64 {
|
||||
return (*float64)(&cd.re)
|
||||
}
|
||||
|
||||
// Custom: GetIm gets `AVComplexDouble.im` value.
|
||||
// GetIm gets `AVComplexDouble.im` value.
|
||||
func (cd *AVComplexDouble) GetIm() float64 {
|
||||
return (float64)(cd.im)
|
||||
}
|
||||
|
||||
// Custom: SetIm sets `AVComplexDouble.im` value.
|
||||
// SetIm sets `AVComplexDouble.im` value.
|
||||
func (cd *AVComplexDouble) SetIm(v float64) {
|
||||
cd.im = (C.double)(v)
|
||||
}
|
||||
|
||||
// Custom: GetImAddr gets `AVComplexDouble.im` address.
|
||||
// GetImAddr gets `AVComplexDouble.im` address.
|
||||
func (cd *AVComplexDouble) GetImAddr() *float64 {
|
||||
return (*float64)(&cd.im)
|
||||
}
|
||||
@@ -92,39 +92,39 @@ func (cd *AVComplexDouble) GetImAddr() *float64 {
|
||||
// AVComplexInt32
|
||||
type AVComplexInt32 C.struct_AVComplexInt32
|
||||
|
||||
// Custom: Make new AVComplexFloat.
|
||||
// Make new AVComplexFloat.
|
||||
func AvMakeComxInt32(re, im int32) AVComplexInt32 {
|
||||
return (AVComplexInt32)(C.struct_AVComplexInt32{
|
||||
re: (C.int32_t)(re),
|
||||
im: (C.int32_t)(im)})
|
||||
}
|
||||
|
||||
// Custom: GetRe gets `AVComplexInt32.re` value.
|
||||
// GetRe gets `AVComplexInt32.re` value.
|
||||
func (ci *AVComplexInt32) GetRe() int32 {
|
||||
return (int32)(ci.re)
|
||||
}
|
||||
|
||||
// Custom: SetRe sets `AVComplexInt32.re` value.
|
||||
// SetRe sets `AVComplexInt32.re` value.
|
||||
func (ci *AVComplexInt32) SetRe(v int32) {
|
||||
ci.re = (C.int32_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetReAddr gets `AVComplexInt32.re` address.
|
||||
// GetReAddr gets `AVComplexInt32.re` address.
|
||||
func (ci *AVComplexInt32) GetReAddr() *int32 {
|
||||
return (*int32)(&ci.re)
|
||||
}
|
||||
|
||||
// Custom: GetIm gets `AVComplexInt32.im` value.
|
||||
// GetIm gets `AVComplexInt32.im` value.
|
||||
func (ci *AVComplexInt32) GetIm() int32 {
|
||||
return (int32)(ci.im)
|
||||
}
|
||||
|
||||
// Custom: SetIm sets `AVComplexInt32.im` value.
|
||||
// SetIm sets `AVComplexInt32.im` value.
|
||||
func (ci *AVComplexInt32) SetIm(v int32) {
|
||||
ci.im = (C.int32_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetImAddr gets `AVComplexInt32.im` address.
|
||||
// GetImAddr gets `AVComplexInt32.im` address.
|
||||
func (ci *AVComplexInt32) GetImAddr() *int32 {
|
||||
return (*int32)(&ci.im)
|
||||
}
|
||||
|
@@ -19,82 +19,82 @@ const (
|
||||
// AVVideoEncParams
|
||||
type AVVideoEncParams C.struct_AVVideoEncParams
|
||||
|
||||
// Custom: GetNbBlocks gets `AVVideoEncParams.nb_blocks` value.
|
||||
// GetNbBlocks gets `AVVideoEncParams.nb_blocks` value.
|
||||
func (vep *AVVideoEncParams) GetNbBlocks() uint32 {
|
||||
return (uint32)(vep.nb_blocks)
|
||||
}
|
||||
|
||||
// Custom: SetNbBlocks sets `AVVideoEncParams.nb_blocks` value.
|
||||
// SetNbBlocks sets `AVVideoEncParams.nb_blocks` value.
|
||||
func (vep *AVVideoEncParams) SetNbBlocks(v uint32) {
|
||||
vep.nb_blocks = (C.uint)(v)
|
||||
}
|
||||
|
||||
// Custom: GetNbBlocksAddr gets `AVVideoEncParams.nb_blocks` address.
|
||||
// GetNbBlocksAddr gets `AVVideoEncParams.nb_blocks` address.
|
||||
func (vep *AVVideoEncParams) GetNbBlocksAddr() *uint32 {
|
||||
return (*uint32)(&vep.nb_blocks)
|
||||
}
|
||||
|
||||
// Custom: GetBlocksOffset gets `AVVideoEncParams.blocks_offset` value.
|
||||
// GetBlocksOffset gets `AVVideoEncParams.blocks_offset` value.
|
||||
func (vep *AVVideoEncParams) GetBlocksOffset() uintptr {
|
||||
return (uintptr)(vep.blocks_offset)
|
||||
}
|
||||
|
||||
// Custom: SetBlocksOffset sets `AVVideoEncParams.blocks_offset` value.
|
||||
// SetBlocksOffset sets `AVVideoEncParams.blocks_offset` value.
|
||||
func (vep *AVVideoEncParams) SetBlocksOffset(v uintptr) {
|
||||
vep.blocks_offset = (C.size_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetBlocksOffsetAddr gets `AVVideoEncParams.blocks_offset` address.
|
||||
// GetBlocksOffsetAddr gets `AVVideoEncParams.blocks_offset` address.
|
||||
func (vep *AVVideoEncParams) GetBlocksOffsetAddr() *uintptr {
|
||||
return (*uintptr)(unsafe.Pointer(&vep.blocks_offset))
|
||||
}
|
||||
|
||||
// Custom: GetBlockSize gets `AVVideoEncParams.block_size` value.
|
||||
// GetBlockSize gets `AVVideoEncParams.block_size` value.
|
||||
func (vep *AVVideoEncParams) GetBlockSize() uintptr {
|
||||
return (uintptr)(vep.block_size)
|
||||
}
|
||||
|
||||
// Custom: SetBlockSize sets `AVVideoEncParams.block_size` value.
|
||||
// SetBlockSize sets `AVVideoEncParams.block_size` value.
|
||||
func (vep *AVVideoEncParams) SetBlockSize(v uintptr) {
|
||||
vep.block_size = (C.size_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetBlockSizeAddr gets `AVVideoEncParams.block_size` address.
|
||||
// GetBlockSizeAddr gets `AVVideoEncParams.block_size` address.
|
||||
func (vep *AVVideoEncParams) GetBlockSizeAddr() *uintptr {
|
||||
return (*uintptr)(unsafe.Pointer(&vep.block_size))
|
||||
}
|
||||
|
||||
// Custom: GetType gets `AVVideoEncParams.type` value.
|
||||
// GetType gets `AVVideoEncParams.type` value.
|
||||
func (vep *AVVideoEncParams) GetType() AVVideoEncParamsType {
|
||||
return (AVVideoEncParamsType)(vep._type)
|
||||
}
|
||||
|
||||
// Custom: SetType sets `AVVideoEncParams.type` value.
|
||||
// SetType sets `AVVideoEncParams.type` value.
|
||||
func (vep *AVVideoEncParams) SetType(v AVVideoEncParamsType) {
|
||||
vep._type = (C.enum_AVVideoEncParamsType)(v)
|
||||
}
|
||||
|
||||
// Custom: GetTypeAddr gets `AVVideoEncParams.type` address.
|
||||
// GetTypeAddr gets `AVVideoEncParams.type` address.
|
||||
func (vep *AVVideoEncParams) GetTypeAddr() *AVVideoEncParamsType {
|
||||
return (*AVVideoEncParamsType)(&vep._type)
|
||||
}
|
||||
|
||||
// Custom: GetQp gets `AVVideoEncParams.qp` value.
|
||||
// GetQp gets `AVVideoEncParams.qp` value.
|
||||
func (vep *AVVideoEncParams) GetQp() int32 {
|
||||
return (int32)(vep.qp)
|
||||
}
|
||||
|
||||
// Custom: SetQp sets `AVVideoEncParams.qp` value.
|
||||
// SetQp sets `AVVideoEncParams.qp` value.
|
||||
func (vep *AVVideoEncParams) SetQp(v int32) {
|
||||
vep.qp = (C.int32_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetQpAddr gets `AVVideoEncParams.qp` address.
|
||||
// GetQpAddr gets `AVVideoEncParams.qp` address.
|
||||
func (vep *AVVideoEncParams) GetQpAddr() *int32 {
|
||||
return (*int32)(&vep.qp)
|
||||
}
|
||||
|
||||
// Custom: GetDeltaQp gets `AVVideoEncParams.delta_qp` value.
|
||||
// GetDeltaQp gets `AVVideoEncParams.delta_qp` value.
|
||||
func (vep *AVVideoEncParams) GetDeltaQp() (v [][]int32) {
|
||||
for i := 0; i < 4; i++ {
|
||||
v = append(v, unsafe.Slice((*int32)(&vep.delta_qp[i][0]), 2))
|
||||
@@ -102,7 +102,7 @@ func (vep *AVVideoEncParams) GetDeltaQp() (v [][]int32) {
|
||||
return v
|
||||
}
|
||||
|
||||
// Custom: SetDeltaQp sets `AVVideoEncParams.delta_qp` value.
|
||||
// SetDeltaQp sets `AVVideoEncParams.delta_qp` value.
|
||||
func (vep *AVVideoEncParams) SetDeltaQp(v [][]int32) {
|
||||
for i := 0; i < FFMIN(len(v), 4); i++ {
|
||||
for j := 0; j < FFMIN(len(v[i]), 2); j++ {
|
||||
@@ -111,7 +111,7 @@ func (vep *AVVideoEncParams) SetDeltaQp(v [][]int32) {
|
||||
}
|
||||
}
|
||||
|
||||
// Custom: GetDeltaQpAddr gets `AVVideoEncParams.delta_qp` address.
|
||||
// GetDeltaQpAddr gets `AVVideoEncParams.delta_qp` address.
|
||||
func (vep *AVVideoEncParams) GetDeltaQpAddr() **int32 {
|
||||
return (**int32)(unsafe.Pointer(&vep.delta_qp))
|
||||
}
|
||||
@@ -119,77 +119,77 @@ func (vep *AVVideoEncParams) GetDeltaQpAddr() **int32 {
|
||||
// AVVideoBlockParams
|
||||
type AVVideoBlockParams C.struct_AVVideoBlockParams
|
||||
|
||||
// Custom: GetSrcX gets `AVVideoBlockParams.src_x` value.
|
||||
// GetSrcX gets `AVVideoBlockParams.src_x` value.
|
||||
func (vbp *AVVideoBlockParams) GetSrcX() int32 {
|
||||
return (int32)(vbp.src_x)
|
||||
}
|
||||
|
||||
// Custom: SetSrcX sets `AVVideoBlockParams.src_x` value.
|
||||
// SetSrcX sets `AVVideoBlockParams.src_x` value.
|
||||
func (vbp *AVVideoBlockParams) SetSrcX(v int32) {
|
||||
vbp.src_x = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetSrcXAddr gets `AVVideoBlockParams.src_x` address.
|
||||
// GetSrcXAddr gets `AVVideoBlockParams.src_x` address.
|
||||
func (vbp *AVVideoBlockParams) GetSrcXAddr() *int32 {
|
||||
return (*int32)(&vbp.src_x)
|
||||
}
|
||||
|
||||
// Custom: GetSrcY gets `AVVideoBlockParams.src_y` value.
|
||||
// GetSrcY gets `AVVideoBlockParams.src_y` value.
|
||||
func (vbp *AVVideoBlockParams) GetSrcY() int32 {
|
||||
return (int32)(vbp.src_y)
|
||||
}
|
||||
|
||||
// Custom: SetSrcY sets `AVVideoBlockParams.src_y` value.
|
||||
// SetSrcY sets `AVVideoBlockParams.src_y` value.
|
||||
func (vbp *AVVideoBlockParams) SetSrcY(v int32) {
|
||||
vbp.src_y = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetSrcYAddr gets `AVVideoBlockParams.src_y` address.
|
||||
// GetSrcYAddr gets `AVVideoBlockParams.src_y` address.
|
||||
func (vbp *AVVideoBlockParams) GetSrcYAddr() *int32 {
|
||||
return (*int32)(&vbp.src_y)
|
||||
}
|
||||
|
||||
// Custom: GetW gets `AVVideoBlockParams.w` value.
|
||||
// GetW gets `AVVideoBlockParams.w` value.
|
||||
func (vbp *AVVideoBlockParams) GetW() int32 {
|
||||
return (int32)(vbp.w)
|
||||
}
|
||||
|
||||
// Custom: SetW sets `AVVideoBlockParams.w` value.
|
||||
// SetW sets `AVVideoBlockParams.w` value.
|
||||
func (vbp *AVVideoBlockParams) SetW(v int32) {
|
||||
vbp.w = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetWAddr gets `AVVideoBlockParams.w` address.
|
||||
// GetWAddr gets `AVVideoBlockParams.w` address.
|
||||
func (vbp *AVVideoBlockParams) GetWAddr() *int32 {
|
||||
return (*int32)(&vbp.w)
|
||||
}
|
||||
|
||||
// Custom: GetH gets `AVVideoBlockParams.h` value.
|
||||
// GetH gets `AVVideoBlockParams.h` value.
|
||||
func (vbp *AVVideoBlockParams) GetH() int32 {
|
||||
return (int32)(vbp.h)
|
||||
}
|
||||
|
||||
// Custom: SetH sets `AVVideoBlockParams.h` value.
|
||||
// SetH sets `AVVideoBlockParams.h` value.
|
||||
func (vbp *AVVideoBlockParams) SetH(v int32) {
|
||||
vbp.h = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetHAddr gets `AVVideoBlockParams.h` address.
|
||||
// GetHAddr gets `AVVideoBlockParams.h` address.
|
||||
func (vbp *AVVideoBlockParams) GetHAddr() *int32 {
|
||||
return (*int32)(&vbp.h)
|
||||
}
|
||||
|
||||
// Custom: GetDeltaQp gets `AVVideoBlockParams.delta_qp` value.
|
||||
// GetDeltaQp gets `AVVideoBlockParams.delta_qp` value.
|
||||
func (vbp *AVVideoBlockParams) GetDeltaQp() int32 {
|
||||
return (int32)(vbp.delta_qp)
|
||||
}
|
||||
|
||||
// Custom: SetDeltaQp sets `AVVideoBlockParams.delta_qp` value.
|
||||
// SetDeltaQp sets `AVVideoBlockParams.delta_qp` value.
|
||||
func (vbp *AVVideoBlockParams) SetDeltaQp(v int32) {
|
||||
vbp.delta_qp = (C.int32_t)(v)
|
||||
}
|
||||
|
||||
// Custom: GetDeltaQpAddr gets `AVVideoBlockParams.delta_qp` address.
|
||||
// GetDeltaQpAddr gets `AVVideoBlockParams.delta_qp` address.
|
||||
func (vbp *AVVideoBlockParams) GetDeltaQpAddr() *int32 {
|
||||
return (*int32)(&vbp.delta_qp)
|
||||
}
|
||||
|
@@ -8,19 +8,19 @@ import "unsafe"
|
||||
|
||||
type AVXTEA C.struct_AVXTEA
|
||||
|
||||
// Custom: GetKey gets `AVXTEA.key` value.
|
||||
// GetKey gets `AVXTEA.key` value.
|
||||
func (dct *AVXTEA) GetKey() []uint32 {
|
||||
return unsafe.Slice((*uint32)(&dct.key[0]), 16)
|
||||
}
|
||||
|
||||
// Custom: SetKey sets `AVXTEA.key` value.
|
||||
// SetKey sets `AVXTEA.key` value.
|
||||
func (dct *AVXTEA) SetKey(v []uint32) {
|
||||
for i := 0; i < FFMIN(len(v), 16); i++ {
|
||||
dct.key[i] = (C.uint32_t)(v[i])
|
||||
}
|
||||
}
|
||||
|
||||
// Custom: GetKeyAddr gets `AVXTEA.key` address.
|
||||
// GetKeyAddr gets `AVXTEA.key` address.
|
||||
func (dct *AVXTEA) GetKeyAddr() **uint32 {
|
||||
return (**uint32)(unsafe.Pointer(&dct.key))
|
||||
}
|
||||
|
@@ -1,5 +1,351 @@
|
||||
package main
|
||||
|
||||
func main() {
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
|
||||
ffmpeg "github.com/qrtc/ffmpeg-dev-go"
|
||||
)
|
||||
|
||||
var (
|
||||
audioStream *ffmpeg.AVStream
|
||||
videoStream *ffmpeg.AVStream
|
||||
videoFrameCount int
|
||||
audioFrameCount int
|
||||
width, height int32
|
||||
pixFmt ffmpeg.AVPixelFormat
|
||||
audioDstFile *os.File
|
||||
videoDstFile *os.File
|
||||
audioStreamIdx int32
|
||||
videoStreamIdx int32
|
||||
videoDstData [4]*uint8
|
||||
videoDstLinesize [4]int32
|
||||
videoDstBufSize int32
|
||||
srcFilename string
|
||||
)
|
||||
|
||||
func outputVideoFrame(videoDecCtx *ffmpeg.AVCodecContext, frame *ffmpeg.AVFrame) int32 {
|
||||
|
||||
if frame.GetWidth() != width || frame.GetHeight() != height || frame.GetFormat() != pixFmt {
|
||||
// To handle this change, one could call av_image_alloc again and
|
||||
// decode the following frames into another rawvideo file.
|
||||
fmt.Fprintf(os.Stderr, "Error: Width, height and pixel format have to be "+
|
||||
"constant in a rawvideo file, but the width, height or "+
|
||||
"pixel format of the input video changed:\n"+
|
||||
"old: width = %d, height = %d, format = %s\n"+
|
||||
"new: width = %d, height = %d, format = %s\n",
|
||||
width, height, ffmpeg.AvGetPixFmtName(pixFmt),
|
||||
frame.GetWidth(), frame.GetHeight(),
|
||||
ffmpeg.AvGetPixFmtName(frame.GetFormat()))
|
||||
return -1
|
||||
}
|
||||
|
||||
videoFrameCount++
|
||||
fmt.Fprintf(os.Stdout, "video_frame n:%d coded_n:%d\n", videoFrameCount, frame.GetCodedPictureNumber())
|
||||
|
||||
// copy decoded frame to destination buffer:
|
||||
// this is required since rawvideo expects non aligned data
|
||||
ffmpeg.AvImageCopy(videoDstData[:], videoDstLinesize[:], frame.GetData(), frame.GetLinesize(), pixFmt, width, height)
|
||||
|
||||
// write to rawvideo file
|
||||
videoDstFile.Write(unsafe.Slice(videoDstData[0], videoDstBufSize))
|
||||
return 0
|
||||
}
|
||||
|
||||
func outputAudioFrame(audioDecCtx *ffmpeg.AVCodecContext, frame *ffmpeg.AVFrame) (ret int32) {
|
||||
unpaddedLinesize := frame.GetNbSamples() * ffmpeg.AvGetBytesPerSample(frame.GetFormat())
|
||||
audioFrameCount++
|
||||
fmt.Fprintf(os.Stdout, "audio_frame n:%d nb_samples:%d pts:%s\n",
|
||||
audioFrameCount, frame.GetNbSamples(),
|
||||
ffmpeg.AvTs2timestr(frame.GetPts(), audioDecCtx.GetPktTimebaseAddr()))
|
||||
|
||||
// Write the raw audio data samples of the first plane. This works
|
||||
// fine for packed formats (e.g. AV_SAMPLE_FMT_S16). However,
|
||||
// most audio decoders output planar audio, which uses a separate
|
||||
// plane of audio samples for each channel (e.g. AV_SAMPLE_FMT_S16P).
|
||||
// In other words, this code will write only the first audio channel
|
||||
// in these cases.
|
||||
// You should use libswresample or libavfilter to convert the frame
|
||||
// to packed data.
|
||||
audioDstFile.Write(ffmpeg.SliceSlice(frame.GetExtendedData(), 1, unpaddedLinesize)[0])
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
func deocdePacket(dec *ffmpeg.AVCodecContext, pkt *ffmpeg.AVPacket, frame *ffmpeg.AVFrame) (ret int32) {
|
||||
|
||||
// submit the packet to the decoder
|
||||
if ret = ffmpeg.AvCodecSendPacket(dec, pkt); ret < 0 {
|
||||
fmt.Fprintf(os.Stderr, "Error submitting a packet for decoding (%s)\n", ffmpeg.AvErr2str(ret))
|
||||
return ret
|
||||
}
|
||||
|
||||
// get all the available frames from the decoder
|
||||
for ret >= 0 {
|
||||
if ret = ffmpeg.AvCodecReceiveFrame(dec, frame); ret < 0 {
|
||||
// those two return values are special and mean there is no output
|
||||
// frame available, but there were no errors during decoding
|
||||
if ret == ffmpeg.AVERROR_EOF || ret == ffmpeg.AVERROR(syscall.EAGAIN) {
|
||||
return 0
|
||||
}
|
||||
|
||||
fmt.Fprintf(os.Stderr, "Error during decoding (%s)\n", ffmpeg.AvErr2str(ret))
|
||||
return ret
|
||||
}
|
||||
|
||||
// write the frame data to output file
|
||||
if dec.GetCodec().GetType() == ffmpeg.AVMEDIA_TYPE_VIDEO {
|
||||
ret = outputVideoFrame(dec, frame)
|
||||
} else {
|
||||
ret = outputAudioFrame(dec, frame)
|
||||
}
|
||||
|
||||
ffmpeg.AvFrameUnref(frame)
|
||||
if ret < 0 {
|
||||
return ret
|
||||
}
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
func openCodecContext(fmtCtx *ffmpeg.AVFormatContext, _type ffmpeg.AVMediaType) (
|
||||
streamIdx int32, decCtx *ffmpeg.AVCodecContext, ret int32) {
|
||||
var (
|
||||
opts *ffmpeg.AVDictionary
|
||||
)
|
||||
if ret = ffmpeg.AvFindBestStream(fmtCtx, _type, -1, -1, nil, 0); ret < 0 {
|
||||
fmt.Fprintf(os.Stderr, "Could not find %s stream in input file '%s'\n",
|
||||
ffmpeg.AvGetMediaTypeString(_type), srcFilename)
|
||||
return 0, nil, ret
|
||||
} else {
|
||||
streamIdx = ret
|
||||
st := fmtCtx.GetStreams()[streamIdx]
|
||||
|
||||
// find decoder for the stream
|
||||
dec := ffmpeg.AvCodecFindDecoder(st.GetCodecpar().GetCodecId())
|
||||
if dec == nil {
|
||||
fmt.Fprintf(os.Stderr, "Failed to find %s codec\n",
|
||||
ffmpeg.AvGetMediaTypeString(_type))
|
||||
return 0, nil, ffmpeg.AVERROR(syscall.EINVAL)
|
||||
}
|
||||
|
||||
// Allocate a codec context for the decoder
|
||||
if decCtx = ffmpeg.AvCodecAllocContext3(dec); decCtx == nil {
|
||||
fmt.Fprintf(os.Stderr, "Failed to allocate the %s codec context\n",
|
||||
ffmpeg.AvGetMediaTypeString(_type))
|
||||
return 0, nil, ffmpeg.AVERROR(syscall.ENOMEM)
|
||||
}
|
||||
|
||||
// Copy codec parameters from input stream to output codec context
|
||||
if ret = ffmpeg.AvCodecParametersToContext(decCtx, st.GetCodecpar()); ret < 0 {
|
||||
fmt.Fprintf(os.Stderr, "Failed to copy %s codec parameters to decoder context\n",
|
||||
ffmpeg.AvGetMediaTypeString(_type))
|
||||
return 0, nil, ret
|
||||
}
|
||||
|
||||
// Init the decoders
|
||||
if ret = ffmpeg.AvCodecOpen2(decCtx, dec, &opts); ret < 0 {
|
||||
fmt.Fprintf(os.Stderr, "Failed to open %s codec\n",
|
||||
ffmpeg.AvGetMediaTypeString(_type))
|
||||
return 0, nil, ret
|
||||
}
|
||||
}
|
||||
|
||||
return streamIdx, decCtx, 0
|
||||
}
|
||||
|
||||
func getFormatFromSampleFmt(sampleFmt ffmpeg.AVSampleFormat) (string, int32) {
|
||||
sampleFmtEntry := []struct {
|
||||
sampleFmt ffmpeg.AVSampleFormat
|
||||
fmtBe string
|
||||
fmtLe string
|
||||
}{
|
||||
{ffmpeg.AV_SAMPLE_FMT_U8, "u8", "u8"},
|
||||
{ffmpeg.AV_SAMPLE_FMT_S16, "s16be", "s16le"},
|
||||
{ffmpeg.AV_SAMPLE_FMT_S32, "s32be", "s32le"},
|
||||
{ffmpeg.AV_SAMPLE_FMT_FLT, "f32be", "f32le"},
|
||||
{ffmpeg.AV_SAMPLE_FMT_DBL, "f64be", "f64le"},
|
||||
}
|
||||
|
||||
for _, entry := range sampleFmtEntry {
|
||||
if sampleFmt == entry.sampleFmt {
|
||||
return ffmpeg.AV_NE(entry.fmtBe, entry.fmtLe), 0
|
||||
}
|
||||
}
|
||||
|
||||
fmt.Fprintf(os.Stderr, "sample format %s is not supported as output format\n",
|
||||
ffmpeg.AvGetSampleFmtName(sampleFmt))
|
||||
return ffmpeg.NIL, -1
|
||||
}
|
||||
|
||||
func main() {
|
||||
var (
|
||||
ret int32
|
||||
err error
|
||||
fmtCtx *ffmpeg.AVFormatContext
|
||||
audioDecCtx *ffmpeg.AVCodecContext
|
||||
videoDecCtx *ffmpeg.AVCodecContext
|
||||
frame *ffmpeg.AVFrame
|
||||
pkt *ffmpeg.AVPacket
|
||||
)
|
||||
if len(os.Args) != 4 {
|
||||
fmt.Fprintf(os.Stderr, "usage: %s input_file video_output_file audio_output_file\n"+
|
||||
"API example program to show how to read frames from an input file.\n"+
|
||||
"This program reads frames from a file, decodes them, and writes decoded\n"+
|
||||
"video frames to a rawvideo file named video_output_file, and decoded\n"+
|
||||
"audio frames to a rawaudio file named audio_output_file.\n", os.Args[0])
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
srcFilename = os.Args[1]
|
||||
videoDstFilename := os.Args[2]
|
||||
audioDstFilename := os.Args[3]
|
||||
|
||||
// open input file, and allocate format context
|
||||
if ret = ffmpeg.AvFormatOpenInput(&fmtCtx, srcFilename, nil, nil); ret < 0 {
|
||||
fmt.Fprintf(os.Stderr, "Could not open source file %s\n", srcFilename)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// retrieve stream information
|
||||
if videoStreamIdx, videoDecCtx, ret = openCodecContext(fmtCtx, ffmpeg.AVMEDIA_TYPE_VIDEO); ret >= 0 {
|
||||
videoStream = fmtCtx.GetStreams()[videoStreamIdx]
|
||||
|
||||
videoDstFile, err = os.OpenFile(videoDstFilename, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0755)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Could not open destination file %s\n", videoDstFilename)
|
||||
ret = 1
|
||||
goto end
|
||||
}
|
||||
|
||||
// allocate image where the decoded image will be put
|
||||
width = videoDecCtx.GetWidth()
|
||||
height = videoDecCtx.GetHeight()
|
||||
pixFmt = videoDecCtx.GetPixFmt()
|
||||
if pixFmt == ffmpeg.AV_PIX_FMT_NONE {
|
||||
pixFmt = ffmpeg.AV_PIX_FMT_YUV420P
|
||||
}
|
||||
if ret = ffmpeg.AvImageAlloc(videoDstData[:], videoDstLinesize[:],
|
||||
width, height, pixFmt, 1); ret < 0 {
|
||||
fmt.Fprintf(os.Stderr, "Could not allocate raw video buffer (%s)\n", ffmpeg.AvErr2str(ret))
|
||||
goto end
|
||||
}
|
||||
videoDstBufSize = ret
|
||||
}
|
||||
|
||||
if audioStreamIdx, audioDecCtx, ret = openCodecContext(fmtCtx, ffmpeg.AVMEDIA_TYPE_AUDIO); ret >= 0 {
|
||||
audioStream = fmtCtx.GetStreams()[audioStreamIdx]
|
||||
|
||||
audioDstFile, err = os.OpenFile(audioDstFilename, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0755)
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Could not open destination file %s\n", audioDstFilename)
|
||||
ret = 1
|
||||
goto end
|
||||
}
|
||||
}
|
||||
|
||||
// dump input information to stderr
|
||||
ffmpeg.AvDumpFormat(fmtCtx, 0, srcFilename, 0)
|
||||
|
||||
if audioStream == nil && videoStream == nil {
|
||||
fmt.Fprintf(os.Stderr, "Could not find audio or video stream in the input, aborting\n")
|
||||
ret = 1
|
||||
goto end
|
||||
}
|
||||
|
||||
if frame = ffmpeg.AvFrameAlloc(); frame == nil {
|
||||
fmt.Fprintf(os.Stderr, "Could not allocate frame\n")
|
||||
ret = ffmpeg.AVERROR(syscall.ENOMEM)
|
||||
goto end
|
||||
}
|
||||
|
||||
if pkt = ffmpeg.AvPacketAlloc(); pkt == nil {
|
||||
fmt.Fprintf(os.Stderr, "Could not allocate packet\n")
|
||||
ret = ffmpeg.AVERROR(syscall.ENOMEM)
|
||||
goto end
|
||||
}
|
||||
|
||||
if videoStream != nil {
|
||||
fmt.Fprintf(os.Stdout, "Demuxing video from file '%s' into '%s'\n", srcFilename, videoDstFilename)
|
||||
}
|
||||
if audioStream != nil {
|
||||
fmt.Fprintf(os.Stdout, "Demuxing audio from file '%s' into '%s'\n", srcFilename, audioDstFilename)
|
||||
}
|
||||
|
||||
// read frames from the file
|
||||
for ffmpeg.AvReadFrame(fmtCtx, pkt) >= 0 {
|
||||
// check if the packet belongs to a stream we are interested in, otherwise
|
||||
// skip it
|
||||
if pkt.GetStreamIndex() == videoStreamIdx {
|
||||
ret = deocdePacket(videoDecCtx, pkt, frame)
|
||||
} else if pkt.GetStreamIndex() == audioStreamIdx {
|
||||
ret = deocdePacket(audioDecCtx, pkt, frame)
|
||||
}
|
||||
ffmpeg.AvPacketUnref(pkt)
|
||||
if ret < 0 {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// flush the decoders
|
||||
if videoDecCtx != nil {
|
||||
deocdePacket(videoDecCtx, nil, frame)
|
||||
}
|
||||
if audioDecCtx != nil {
|
||||
deocdePacket(audioDecCtx, nil, frame)
|
||||
}
|
||||
|
||||
fmt.Fprintf(os.Stdout, "Demuxing succeeded.\n")
|
||||
|
||||
if videoStream != nil {
|
||||
fmt.Fprintf(os.Stdout, "Play the output video file with the command:\n"+
|
||||
"ffplay -f rawvideo -pix_fmt %s -video_size %dx%d %s\n",
|
||||
ffmpeg.AvGetPixFmtName(videoDecCtx.GetPixFmt()),
|
||||
videoDecCtx.GetWidth(), videoDecCtx.GetHeight(), videoDstFilename)
|
||||
}
|
||||
|
||||
if audioStream != nil {
|
||||
sfmt := audioDecCtx.GetSampleFmt()
|
||||
nChannels := audioDecCtx.GetChannels()
|
||||
var _fmt string
|
||||
|
||||
if ffmpeg.AvSampleFmtIsPlanar(sfmt) != 0 {
|
||||
packed := ffmpeg.AvGetSampleFmtName(sfmt)
|
||||
if len(packed) == 0 {
|
||||
packed = "?"
|
||||
}
|
||||
fmt.Fprintf(os.Stdout, "Warning: the sample format the decoder produced is planar "+
|
||||
"(%s). This example will output the first channel only.\n", packed)
|
||||
sfmt = ffmpeg.AvGetPackedSampleFmt(sfmt)
|
||||
nChannels = 1
|
||||
}
|
||||
|
||||
if _fmt, ret = getFormatFromSampleFmt(sfmt); ret < 0 {
|
||||
goto end
|
||||
}
|
||||
|
||||
fmt.Fprintf(os.Stdout, "Play the output audio file with the command:\n"+
|
||||
"ffplay -f %s -ac %d -ar %d %s\n",
|
||||
_fmt, nChannels, audioDecCtx.GetSampleRate(), audioDstFilename)
|
||||
}
|
||||
|
||||
end:
|
||||
ffmpeg.AvCodecFreeContext(&videoDecCtx)
|
||||
ffmpeg.AvCodecFreeContext(&audioDecCtx)
|
||||
ffmpeg.AvFormatCloseInput(&fmtCtx)
|
||||
if videoDstFile != nil {
|
||||
videoDstFile.Close()
|
||||
}
|
||||
if audioDstFile != nil {
|
||||
audioDstFile.Close()
|
||||
}
|
||||
ffmpeg.AvPacketFree(&pkt)
|
||||
ffmpeg.AvFrameFree(&frame)
|
||||
ffmpeg.AvFree(videoDstData[0])
|
||||
if ret < 0 {
|
||||
os.Exit(int(ret))
|
||||
}
|
||||
}
|
||||
|
@@ -1,5 +1,260 @@
|
||||
package main
|
||||
|
||||
func main() {
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
|
||||
"github.com/qrtc/ffmpeg-dev-go"
|
||||
)
|
||||
|
||||
var (
|
||||
filterDescr = "aresample=8000,aformat=sample_fmts=s16:channel_layouts=mono"
|
||||
player = "ffplay -f s16le -ar 8000 -ac 1 -"
|
||||
audioStreamIndex int32 = -1
|
||||
)
|
||||
|
||||
func openInputFile(filename string) (decCtx *ffmpeg.AVCodecContext, fmtCtx *ffmpeg.AVFormatContext, ret int32) {
|
||||
var (
|
||||
dec *ffmpeg.AVCodec
|
||||
)
|
||||
|
||||
if ret = ffmpeg.AvFormatOpenInput(&fmtCtx, filename, nil, nil); ret < 0 {
|
||||
ffmpeg.AvLog(nil, ffmpeg.AV_LOG_ERROR, "Cannot open input file\n")
|
||||
return nil, nil, ret
|
||||
}
|
||||
|
||||
if ret = ffmpeg.AvFormatFindStreamInfo(fmtCtx, nil); ret < 0 {
|
||||
ffmpeg.AvLog(nil, ffmpeg.AV_LOG_ERROR, "Cannot find stream information\n")
|
||||
return nil, nil, ret
|
||||
}
|
||||
|
||||
// select the audio stream
|
||||
if ret = ffmpeg.AvFindBestStream(fmtCtx, ffmpeg.AVMEDIA_TYPE_AUDIO, -1, -1, &dec, 0); ret < 0 {
|
||||
ffmpeg.AvLog(nil, ffmpeg.AV_LOG_ERROR, "Cannot find an audio stream in the input file\n")
|
||||
return nil, nil, ret
|
||||
}
|
||||
audioStreamIndex = ret
|
||||
|
||||
// create decoding context
|
||||
if decCtx = ffmpeg.AvCodecAllocContext3(dec); decCtx == nil {
|
||||
return nil, nil, ffmpeg.AVERROR(syscall.ENOMEM)
|
||||
}
|
||||
ffmpeg.AvCodecParametersToContext(decCtx, fmtCtx.GetStreams()[audioStreamIndex].GetCodecpar())
|
||||
|
||||
// init the audio decoder
|
||||
if ret = ffmpeg.AvCodecOpen2(decCtx, dec, nil); ret < 0 {
|
||||
ffmpeg.AvLog(nil, ffmpeg.AV_LOG_ERROR, "Cannot open audio decoder\n")
|
||||
return nil, nil, ret
|
||||
}
|
||||
|
||||
return decCtx, fmtCtx, 0
|
||||
}
|
||||
|
||||
func initFilters(decCtx *ffmpeg.AVCodecContext, fmtCtx *ffmpeg.AVFormatContext, filtersDescr string) (
|
||||
filterGraph *ffmpeg.AVFilterGraph, buffersinkCtx, buffersrcCtx *ffmpeg.AVFilterContext, ret int32) {
|
||||
var (
|
||||
abuffersrc = ffmpeg.AvFilterGetByName("abuffer")
|
||||
abuffersink = ffmpeg.AvFilterGetByName("abuffersink")
|
||||
outputs = ffmpeg.AvFilterInoutAlloc()
|
||||
inputs = ffmpeg.AvFilterInoutAlloc()
|
||||
outSampleFmts = []ffmpeg.AVSampleFormat{ffmpeg.AV_SAMPLE_FMT_S16, -1}
|
||||
outChannelLayouts = []int64{int64(ffmpeg.AV_CH_LAYOUT_MONO), -1}
|
||||
outSampleRates = []int32{8000, -1}
|
||||
timeBase = fmtCtx.GetStreams()[audioStreamIndex].GetTimeBase()
|
||||
args string
|
||||
outlink *ffmpeg.AVFilterLink
|
||||
)
|
||||
|
||||
filterGraph = ffmpeg.AvFilterGraphAlloc()
|
||||
if outputs == nil || inputs == nil || filterGraph == nil {
|
||||
ret = ffmpeg.AVERROR(syscall.ENOMEM)
|
||||
goto end
|
||||
}
|
||||
|
||||
// buffer audio source: the decoded frames from the decoder will be inserted here.
|
||||
if decCtx.GetChannelLayout() == 0 {
|
||||
decCtx.SetChannelLayout(uint64(ffmpeg.AvGetDefaultChannelLayout(decCtx.GetChannels())))
|
||||
}
|
||||
args = fmt.Sprintf("time_base=%d/%d:sample_rate=%d:sample_fmt=%s:channel_layout=0x%d",
|
||||
timeBase.GetNum(), timeBase.GetDen(), decCtx.GetSampleRate(),
|
||||
ffmpeg.AvGetSampleFmtName(decCtx.GetSampleFmt()), decCtx.GetChannelLayout())
|
||||
|
||||
ffmpeg.AvLog(nil, ffmpeg.AV_LOG_INFO, "audio source args: %s\n", args)
|
||||
|
||||
if ret = ffmpeg.AvFilterGraphCreateFilter(&buffersrcCtx, abuffersrc, "in",
|
||||
args, nil, filterGraph); ret < 0 {
|
||||
ffmpeg.AvLog(nil, ffmpeg.AV_LOG_ERROR, "Cannot create audio buffer source\n")
|
||||
goto end
|
||||
}
|
||||
|
||||
// buffer audio sink: to terminate the filter chain.
|
||||
if ret = ffmpeg.AvFilterGraphCreateFilter(&buffersinkCtx, abuffersink, "out",
|
||||
ffmpeg.NIL, nil, filterGraph); ret < 0 {
|
||||
ffmpeg.AvLog(nil, ffmpeg.AV_LOG_ERROR, "Cannot create audio buffer sink\n")
|
||||
goto end
|
||||
}
|
||||
|
||||
if ret = ffmpeg.AvOptSetIntList(buffersinkCtx, "sample_fmts", &outSampleFmts[0], -1,
|
||||
ffmpeg.AV_OPT_SEARCH_CHILDREN); ret < 0 {
|
||||
ffmpeg.AvLog(nil, ffmpeg.AV_LOG_ERROR, "Cannot set output sample format\n")
|
||||
goto end
|
||||
}
|
||||
|
||||
if ret = ffmpeg.AvOptSetIntList(buffersinkCtx, "channel_layouts", &outChannelLayouts[0], -1,
|
||||
ffmpeg.AV_OPT_SEARCH_CHILDREN); ret < 0 {
|
||||
ffmpeg.AvLog(nil, ffmpeg.AV_LOG_ERROR, "Cannot set output channel layout\n")
|
||||
goto end
|
||||
}
|
||||
|
||||
if ret = ffmpeg.AvOptSetIntList(buffersinkCtx, "sample_rates", &outSampleRates[0], -1,
|
||||
ffmpeg.AV_OPT_SEARCH_CHILDREN); ret < 0 {
|
||||
ffmpeg.AvLog(nil, ffmpeg.AV_LOG_ERROR, "Cannot set output sample rate\n")
|
||||
goto end
|
||||
}
|
||||
|
||||
// Set the endpoints for the filter graph. The filter_graph will
|
||||
// be linked to the graph described by filters_descr.
|
||||
|
||||
// The buffer source output must be connected to the input pad of
|
||||
// the first filter described by filters_descr; since the first
|
||||
// filter input label is not specified, it is set to "in" by
|
||||
// default.
|
||||
outputs.SetName("in")
|
||||
outputs.SetFilterCtx(buffersrcCtx)
|
||||
outputs.SetPadIdx(0)
|
||||
outputs.SetNext(nil)
|
||||
|
||||
// The buffer sink input must be connected to the output pad of
|
||||
// the last filter described by filters_descr; since the last
|
||||
// filter output label is not specified, it is set to "out" by
|
||||
// default.
|
||||
inputs.SetName("out")
|
||||
inputs.SetFilterCtx(buffersinkCtx)
|
||||
inputs.SetPadIdx(0)
|
||||
inputs.SetNext(nil)
|
||||
|
||||
if ret = ffmpeg.AvFilterGraphParsePtr(filterGraph, filtersDescr, &inputs, &outputs, nil); ret < 0 {
|
||||
ffmpeg.AvLog(nil, ffmpeg.AV_LOG_ERROR, "Cannot parse filter graph\n")
|
||||
goto end
|
||||
}
|
||||
|
||||
if ret = ffmpeg.AvFilterGraphConfig(filterGraph, nil); ret < 0 {
|
||||
ffmpeg.AvLog(nil, ffmpeg.AV_LOG_ERROR, "Cannot config filter graph\n")
|
||||
goto end
|
||||
}
|
||||
|
||||
// Print summary of the sink buffer
|
||||
// Note: args buffer is reused to store channel layout string
|
||||
outlink = buffersinkCtx.GetInputs()[0]
|
||||
args = ffmpeg.AvGetChannelLayoutString(-1, outlink.GetChannelLayout())
|
||||
ffmpeg.AvLog(nil, ffmpeg.AV_LOG_INFO, "Output: srate:%dHz fmt:%s chlayout:%s\n",
|
||||
outlink.GetSampleRate(),
|
||||
ffmpeg.AvGetSampleFmtName(outlink.GetFormat()),
|
||||
args)
|
||||
|
||||
end:
|
||||
ffmpeg.AvFilterInoutFree(&inputs)
|
||||
ffmpeg.AvFilterInoutFree(&outputs)
|
||||
return filterGraph, buffersinkCtx, buffersrcCtx, ret
|
||||
}
|
||||
|
||||
func printFrame(frame *ffmpeg.AVFrame) {
|
||||
n := frame.GetNbSamples() * ffmpeg.AvGetChannelLayoutNbChannels(frame.GetChannelLayout())
|
||||
p := (*uint16)(unsafe.Pointer(frame.GetData()[0]))
|
||||
data := unsafe.Slice(p, n)
|
||||
for i := int32(0); i < n; i++ {
|
||||
os.Stdout.Write([]byte{byte(data[i] & 0xFF), byte(data[i] >> 8 & 0xFF)})
|
||||
}
|
||||
}
|
||||
|
||||
func main() {
|
||||
var (
|
||||
packet ffmpeg.AVPacket
|
||||
ret int32
|
||||
decCtx *ffmpeg.AVCodecContext
|
||||
fmtCtx *ffmpeg.AVFormatContext
|
||||
filterGraph *ffmpeg.AVFilterGraph
|
||||
buffersinkCtx *ffmpeg.AVFilterContext
|
||||
buffersrcCtx *ffmpeg.AVFilterContext
|
||||
)
|
||||
frame := ffmpeg.AvFrameAlloc()
|
||||
filtFrame := ffmpeg.AvFrameAlloc()
|
||||
if frame == nil || filtFrame == nil {
|
||||
fmt.Fprintf(os.Stderr, "Could not allocate frame")
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
if len(os.Args) != 2 {
|
||||
fmt.Fprintf(os.Stderr, "Usage: %s file | %s\n", os.Args[0], player)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
if decCtx, fmtCtx, ret = openInputFile(os.Args[1]); ret < 0 {
|
||||
goto end
|
||||
}
|
||||
if filterGraph, buffersinkCtx, buffersrcCtx, ret = initFilters(decCtx, fmtCtx, filterDescr); ret < 0 {
|
||||
goto end
|
||||
}
|
||||
|
||||
// read all packets
|
||||
for {
|
||||
if ret = ffmpeg.AvReadFrame(fmtCtx, &packet); ret < 0 {
|
||||
break
|
||||
}
|
||||
|
||||
if packet.GetStreamIndex() == audioStreamIndex {
|
||||
if ret = ffmpeg.AvCodecSendPacket(decCtx, &packet); ret < 0 {
|
||||
ffmpeg.AvLog(nil, ffmpeg.AV_LOG_ERROR, "Error while sending a packet to the decoder\n")
|
||||
break
|
||||
}
|
||||
|
||||
for ret >= 0 {
|
||||
ret = ffmpeg.AvCodecReceiveFrame(decCtx, frame)
|
||||
if ret == ffmpeg.AVERROR(syscall.EAGAIN) || ret == ffmpeg.AVERROR_EOF {
|
||||
break
|
||||
} else if ret < 0 {
|
||||
ffmpeg.AvLog(nil, ffmpeg.AV_LOG_ERROR, "Error while receiving a frame from the decoder\n")
|
||||
goto end
|
||||
}
|
||||
|
||||
if ret >= 0 {
|
||||
// push the audio data from decoded frame into the filtergraph
|
||||
if ffmpeg.AvBuffersrcAddFrameFlags(buffersrcCtx, frame, ffmpeg.AV_BUFFERSRC_FLAG_KEEP_REF) < 0 {
|
||||
ffmpeg.AvLog(nil, ffmpeg.AV_LOG_ERROR, "Error while feeding the audio filtergraph\n")
|
||||
break
|
||||
}
|
||||
|
||||
// pull filtered audio from the filtergraph
|
||||
for {
|
||||
ret = ffmpeg.AvBuffersinkGetFrame(buffersinkCtx, filtFrame)
|
||||
if ret == ffmpeg.AVERROR(syscall.EAGAIN) || ret == ffmpeg.AVERROR_EOF {
|
||||
break
|
||||
}
|
||||
if ret < 0 {
|
||||
goto end
|
||||
}
|
||||
printFrame(filtFrame)
|
||||
ffmpeg.AvFrameUnref(filtFrame)
|
||||
}
|
||||
ffmpeg.AvFrameUnref(frame)
|
||||
}
|
||||
}
|
||||
}
|
||||
ffmpeg.AvPacketUnref(&packet)
|
||||
}
|
||||
|
||||
end:
|
||||
ffmpeg.AvFilterGraphFree(&filterGraph)
|
||||
ffmpeg.AvCodecFreeContext(&decCtx)
|
||||
ffmpeg.AvFormatCloseInput(&fmtCtx)
|
||||
ffmpeg.AvFrameFree(&frame)
|
||||
ffmpeg.AvFrameFree(&filtFrame)
|
||||
|
||||
if ret < 0 && ret != ffmpeg.AVERROR_EOF {
|
||||
fmt.Fprintf(os.Stderr, "Error occurred: %s\n", ffmpeg.AvErr2str(ret))
|
||||
os.Exit(1)
|
||||
}
|
||||
os.Exit(0)
|
||||
}
|
||||
|
@@ -1,5 +1,273 @@
|
||||
package main
|
||||
|
||||
func main() {
|
||||
/*
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
static void putcs(uint16_t *p, int n)
|
||||
{
|
||||
const uint16_t *p_end = p + n;
|
||||
while (p < p_end) {
|
||||
fputc(*p & 0xff, stdout);
|
||||
fputc(*p>>8 & 0xff, stdout);
|
||||
p++;
|
||||
}
|
||||
fflush(stdout);
|
||||
}
|
||||
*/
|
||||
import "C"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"syscall"
|
||||
"time"
|
||||
"unsafe"
|
||||
|
||||
"github.com/qrtc/ffmpeg-dev-go"
|
||||
)
|
||||
|
||||
var (
|
||||
filterDescr = "scale=78:24,transpose=cclock"
|
||||
// other way:
|
||||
// scale=78:24 [scl]; [scl] transpose=cclock // assumes "[in]" and "[out]" to be input output pads respectively
|
||||
videoStreamIndex int32 = -1
|
||||
lastPts int64 = ffmpeg.AV_NOPTS_VALUE
|
||||
displayStr = " .-+#"
|
||||
)
|
||||
|
||||
func openInputFile(filename string) (decCtx *ffmpeg.AVCodecContext, fmtCtx *ffmpeg.AVFormatContext, ret int32) {
|
||||
var (
|
||||
dec *ffmpeg.AVCodec
|
||||
)
|
||||
|
||||
if ret = ffmpeg.AvFormatOpenInput(&fmtCtx, filename, nil, nil); ret < 0 {
|
||||
ffmpeg.AvLog(nil, ffmpeg.AV_LOG_ERROR, "Cannot open input file\n")
|
||||
return nil, nil, ret
|
||||
}
|
||||
|
||||
if ret = ffmpeg.AvFormatFindStreamInfo(fmtCtx, nil); ret < 0 {
|
||||
ffmpeg.AvLog(nil, ffmpeg.AV_LOG_ERROR, "Cannot find stream information\n")
|
||||
return nil, nil, ret
|
||||
}
|
||||
|
||||
// select the video stream
|
||||
if ret = ffmpeg.AvFindBestStream(fmtCtx, ffmpeg.AVMEDIA_TYPE_VIDEO, -1, -1, &dec, 0); ret < 0 {
|
||||
ffmpeg.AvLog(nil, ffmpeg.AV_LOG_ERROR, "Cannot find a video stream in the input file\n")
|
||||
return nil, nil, ret
|
||||
}
|
||||
videoStreamIndex = ret
|
||||
|
||||
// create decoding context
|
||||
if decCtx = ffmpeg.AvCodecAllocContext3(dec); decCtx == nil {
|
||||
return nil, nil, ffmpeg.AVERROR(syscall.ENOMEM)
|
||||
}
|
||||
ffmpeg.AvCodecParametersToContext(decCtx, fmtCtx.GetStreams()[videoStreamIndex].GetCodecpar())
|
||||
|
||||
// init the audio decoder
|
||||
if ret = ffmpeg.AvCodecOpen2(decCtx, dec, nil); ret < 0 {
|
||||
ffmpeg.AvLog(nil, ffmpeg.AV_LOG_ERROR, "Cannot open video decoder\n")
|
||||
return nil, nil, ret
|
||||
}
|
||||
|
||||
return decCtx, fmtCtx, 0
|
||||
}
|
||||
|
||||
func initFilters(decCtx *ffmpeg.AVCodecContext, fmtCtx *ffmpeg.AVFormatContext, filtersDescr string) (
|
||||
filterGraph *ffmpeg.AVFilterGraph, buffersinkCtx, buffersrcCtx *ffmpeg.AVFilterContext, ret int32) {
|
||||
var (
|
||||
buffersrc = ffmpeg.AvFilterGetByName("buffer")
|
||||
buffersink = ffmpeg.AvFilterGetByName("buffersink")
|
||||
outputs = ffmpeg.AvFilterInoutAlloc()
|
||||
inputs = ffmpeg.AvFilterInoutAlloc()
|
||||
timeBase = fmtCtx.GetStreams()[videoStreamIndex].GetTimeBase()
|
||||
pixFmts = []ffmpeg.AVPixelFormat{ffmpeg.AV_PIX_FMT_GRAY8, ffmpeg.AV_PIX_FMT_NONE}
|
||||
args string
|
||||
)
|
||||
|
||||
filterGraph = ffmpeg.AvFilterGraphAlloc()
|
||||
if outputs == nil || inputs == nil || filterGraph == nil {
|
||||
ret = ffmpeg.AVERROR(syscall.ENOMEM)
|
||||
goto end
|
||||
}
|
||||
|
||||
// buffer video source: the decoded frames from the decoder will be inserted here.
|
||||
args = fmt.Sprintf("video_size=%dx%d:pix_fmt=%d:time_base=%d/%d:pixel_aspect=%d/%d",
|
||||
decCtx.GetWidth(), decCtx.GetHeight(), decCtx.GetPixFmt(),
|
||||
timeBase.GetNum(), timeBase.GetDen(),
|
||||
decCtx.GetSampleAspectRatioAddr().GetNum(), decCtx.GetSampleAspectRatioAddr().GetDen())
|
||||
|
||||
ffmpeg.AvLog(nil, ffmpeg.AV_LOG_INFO, "video source args: %s\n", args)
|
||||
|
||||
if ret = ffmpeg.AvFilterGraphCreateFilter(&buffersrcCtx, buffersrc, "in",
|
||||
args, nil, filterGraph); ret < 0 {
|
||||
ffmpeg.AvLog(nil, ffmpeg.AV_LOG_ERROR, "Cannot create buffer source\n")
|
||||
goto end
|
||||
}
|
||||
|
||||
// buffer audio sink: to terminate the filter chain.
|
||||
if ret = ffmpeg.AvFilterGraphCreateFilter(&buffersinkCtx, buffersink, "out",
|
||||
ffmpeg.NIL, nil, filterGraph); ret < 0 {
|
||||
ffmpeg.AvLog(nil, ffmpeg.AV_LOG_ERROR, "Cannot create buffer sink\n")
|
||||
goto end
|
||||
}
|
||||
|
||||
if ret = ffmpeg.AvOptSetIntList(buffersinkCtx, "pix_fmts", &pixFmts[0], ffmpeg.AV_PIX_FMT_NONE,
|
||||
ffmpeg.AV_OPT_SEARCH_CHILDREN); ret < 0 {
|
||||
ffmpeg.AvLog(nil, ffmpeg.AV_LOG_ERROR, "Cannot set output pixel format\n")
|
||||
goto end
|
||||
}
|
||||
|
||||
// Set the endpoints for the filter graph. The filter_graph will
|
||||
// be linked to the graph described by filters_descr.
|
||||
|
||||
// The buffer source output must be connected to the input pad of
|
||||
// the first filter described by filters_descr; since the first
|
||||
// filter input label is not specified, it is set to "in" by
|
||||
// default.
|
||||
outputs.SetName("in")
|
||||
outputs.SetFilterCtx(buffersrcCtx)
|
||||
outputs.SetPadIdx(0)
|
||||
outputs.SetNext(nil)
|
||||
|
||||
// The buffer sink input must be connected to the output pad of
|
||||
// the last filter described by filters_descr; since the last
|
||||
// filter output label is not specified, it is set to "out" by
|
||||
// default.
|
||||
inputs.SetName("out")
|
||||
inputs.SetFilterCtx(buffersinkCtx)
|
||||
inputs.SetPadIdx(0)
|
||||
inputs.SetNext(nil)
|
||||
|
||||
if ret = ffmpeg.AvFilterGraphParsePtr(filterGraph, filtersDescr, &inputs, &outputs, nil); ret < 0 {
|
||||
ffmpeg.AvLog(nil, ffmpeg.AV_LOG_ERROR, "Cannot parse filter graph\n")
|
||||
goto end
|
||||
}
|
||||
|
||||
if ret = ffmpeg.AvFilterGraphConfig(filterGraph, nil); ret < 0 {
|
||||
ffmpeg.AvLog(nil, ffmpeg.AV_LOG_ERROR, "Cannot config filter graph\n")
|
||||
goto end
|
||||
}
|
||||
|
||||
end:
|
||||
ffmpeg.AvFilterInoutFree(&inputs)
|
||||
ffmpeg.AvFilterInoutFree(&outputs)
|
||||
return filterGraph, buffersinkCtx, buffersrcCtx, ret
|
||||
}
|
||||
|
||||
func displayFrame(frame *ffmpeg.AVFrame, timeBase ffmpeg.AVRational) {
|
||||
if frame.GetPts() != ffmpeg.AV_NOPTS_VALUE {
|
||||
if lastPts != ffmpeg.AV_NOPTS_VALUE {
|
||||
// sleep roughly the right amount of time;
|
||||
// usleep is in microseconds, just like AV_TIME_BASE.
|
||||
delay := ffmpeg.AvRescaleQ(frame.GetPts()-lastPts, timeBase, ffmpeg.AV_TIME_BASE_Q)
|
||||
if delay > 0 && delay < 1000000 {
|
||||
time.Sleep(time.Duration(delay) * time.Microsecond)
|
||||
}
|
||||
}
|
||||
lastPts = frame.GetPts()
|
||||
}
|
||||
|
||||
// Trivial ASCII grayscale display.
|
||||
data := unsafe.Slice(frame.GetData()[0], frame.GetHeight()*frame.GetHeight())
|
||||
|
||||
os.Stdout.Write([]byte{byte(033), byte('c'), byte('\n')})
|
||||
fmt.Fprintf(os.Stdout, "\n")
|
||||
for y := int32(0); y < frame.GetHeight(); y++ {
|
||||
idx := frame.GetLinesize()[0] * y
|
||||
for x := int32(0); x < frame.GetWidth(); x++ {
|
||||
fmt.Fprintf(os.Stdout, "%c", displayStr[data[idx+x]/52])
|
||||
}
|
||||
fmt.Fprintf(os.Stdout, "\n")
|
||||
}
|
||||
}
|
||||
|
||||
func main() {
|
||||
var (
|
||||
packet ffmpeg.AVPacket
|
||||
ret int32
|
||||
decCtx *ffmpeg.AVCodecContext
|
||||
fmtCtx *ffmpeg.AVFormatContext
|
||||
filterGraph *ffmpeg.AVFilterGraph
|
||||
buffersinkCtx *ffmpeg.AVFilterContext
|
||||
buffersrcCtx *ffmpeg.AVFilterContext
|
||||
)
|
||||
frame := ffmpeg.AvFrameAlloc()
|
||||
filtFrame := ffmpeg.AvFrameAlloc()
|
||||
if frame == nil || filtFrame == nil {
|
||||
fmt.Fprintf(os.Stderr, "Could not allocate frame")
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
if len(os.Args) != 2 {
|
||||
fmt.Fprintf(os.Stderr, "Usage: %s file\n", os.Args[0])
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
if decCtx, fmtCtx, ret = openInputFile(os.Args[1]); ret < 0 {
|
||||
goto end
|
||||
}
|
||||
if filterGraph, buffersinkCtx, buffersrcCtx, ret = initFilters(decCtx, fmtCtx, filterDescr); ret < 0 {
|
||||
goto end
|
||||
}
|
||||
|
||||
// read all packets
|
||||
for {
|
||||
if ret = ffmpeg.AvReadFrame(fmtCtx, &packet); ret < 0 {
|
||||
break
|
||||
}
|
||||
|
||||
if packet.GetStreamIndex() == videoStreamIndex {
|
||||
if ret = ffmpeg.AvCodecSendPacket(decCtx, &packet); ret < 0 {
|
||||
ffmpeg.AvLog(nil, ffmpeg.AV_LOG_ERROR, "Error while sending a packet to the decoder\n")
|
||||
break
|
||||
}
|
||||
|
||||
for ret >= 0 {
|
||||
ret = ffmpeg.AvCodecReceiveFrame(decCtx, frame)
|
||||
if ret == ffmpeg.AVERROR(syscall.EAGAIN) || ret == ffmpeg.AVERROR_EOF {
|
||||
break
|
||||
} else if ret < 0 {
|
||||
ffmpeg.AvLog(nil, ffmpeg.AV_LOG_ERROR, "Error while receiving a frame from the decoder\n")
|
||||
goto end
|
||||
}
|
||||
|
||||
frame.SetPts(frame.GetBestEffortTimestamp())
|
||||
|
||||
// push the decoded frame into the filtergraph
|
||||
if ffmpeg.AvBuffersrcAddFrameFlags(buffersrcCtx, frame, ffmpeg.AV_BUFFERSRC_FLAG_KEEP_REF) < 0 {
|
||||
ffmpeg.AvLog(nil, ffmpeg.AV_LOG_ERROR, "Error while feeding the filtergraph\n")
|
||||
break
|
||||
}
|
||||
|
||||
// pull filtered frames from the filtergraph
|
||||
for {
|
||||
ret = ffmpeg.AvBuffersinkGetFrame(buffersinkCtx, filtFrame)
|
||||
if ret == ffmpeg.AVERROR(syscall.EAGAIN) || ret == ffmpeg.AVERROR_EOF {
|
||||
break
|
||||
}
|
||||
if ret < 0 {
|
||||
goto end
|
||||
}
|
||||
displayFrame(filtFrame, buffersinkCtx.GetInputs()[0].GetTimeBase())
|
||||
ffmpeg.AvFrameUnref(filtFrame)
|
||||
}
|
||||
ffmpeg.AvFrameUnref(frame)
|
||||
}
|
||||
}
|
||||
ffmpeg.AvPacketUnref(&packet)
|
||||
}
|
||||
|
||||
end:
|
||||
ffmpeg.AvFilterGraphFree(&filterGraph)
|
||||
ffmpeg.AvCodecFreeContext(&decCtx)
|
||||
ffmpeg.AvFormatCloseInput(&fmtCtx)
|
||||
ffmpeg.AvFrameFree(&frame)
|
||||
ffmpeg.AvFrameFree(&filtFrame)
|
||||
|
||||
if ret < 0 && ret != ffmpeg.AVERROR_EOF {
|
||||
fmt.Fprintf(os.Stderr, "Error occurred: %s\n", ffmpeg.AvErr2str(ret))
|
||||
os.Exit(1)
|
||||
}
|
||||
os.Exit(0)
|
||||
}
|
||||
|
@@ -9,19 +9,19 @@ import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type HelperInteger interface {
|
||||
HelperSingedInteger | HelperUnsingedInteger
|
||||
type Integer interface {
|
||||
SingedInteger | UnsingedInteger
|
||||
}
|
||||
|
||||
type HelperSingedInteger interface {
|
||||
type SingedInteger interface {
|
||||
~int | ~int8 | ~int16 | ~int32 | ~int64
|
||||
}
|
||||
|
||||
type HelperUnsingedInteger interface {
|
||||
type UnsingedInteger interface {
|
||||
~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr
|
||||
}
|
||||
|
||||
const NIL = "\\'nil'\\"
|
||||
const NIL = "\\'<nil>'\\"
|
||||
|
||||
// StringCasting casts go string to c world char* with free function.
|
||||
// Note: if input is a NIL string will return a nil pointer.
|
||||
@@ -50,7 +50,7 @@ func StringSliceCasting(ss []string) (allocPtrs []*C.char, freeFunc func()) {
|
||||
}
|
||||
|
||||
// SliceSlice returns a slice of slice from a pointer to pointer.
|
||||
func SliceSlice[T any, X, Y HelperInteger](data **T, x X, y Y) (v [][]T) {
|
||||
func SliceSlice[T any, X, Y Integer](data **T, x X, y Y) (v [][]T) {
|
||||
for i := 0; i < int(x); i++ {
|
||||
v = append(v, unsafe.Slice(*PointerOffset(data, i), y))
|
||||
}
|
||||
@@ -84,7 +84,7 @@ func SliceTruncString(ptr **C.char) (v []string) {
|
||||
}
|
||||
|
||||
// PointerOffset offset the pointer point.
|
||||
func PointerOffset[U any, V HelperInteger](ptr *U, offset V) *U {
|
||||
func PointerOffset[U any, V Integer](ptr *U, offset V) *U {
|
||||
if ptr == nil {
|
||||
return nil
|
||||
}
|
||||
|
68
swscale.go
68
swscale.go
@@ -75,32 +75,32 @@ func SwsGetCoefficients(colorspace int32) *int32 {
|
||||
// SwsVector
|
||||
type SwsVector C.struct_SwsVector
|
||||
|
||||
// Custom: GetCoeff gets `SwsVector.coeff` value.
|
||||
// GetCoeff gets `SwsVector.coeff` value.
|
||||
func (sv *SwsVector) GetCoeff() *float64 {
|
||||
return (*float64)(sv.coeff)
|
||||
}
|
||||
|
||||
// Custom: SetCoeff sets `SwsVector.coeff` value.
|
||||
// SetCoeff sets `SwsVector.coeff` value.
|
||||
func (sv *SwsVector) SetCoeff(v *float64) {
|
||||
sv.coeff = (*C.double)(v)
|
||||
}
|
||||
|
||||
// Custom: GetCoeffAddr gets `SwsVector.coeff` address.
|
||||
// GetCoeffAddr gets `SwsVector.coeff` address.
|
||||
func (sv *SwsVector) GetCoeffAddr() **float64 {
|
||||
return (**float64)(unsafe.Pointer(&sv.coeff))
|
||||
}
|
||||
|
||||
// Custom: GetLength gets `SwsVector.length` value.
|
||||
// GetLength gets `SwsVector.length` value.
|
||||
func (sv *SwsVector) GetLength() int32 {
|
||||
return (int32)(sv.length)
|
||||
}
|
||||
|
||||
// Custom: SetLength sets `SwsVector.length` value.
|
||||
// SetLength sets `SwsVector.length` value.
|
||||
func (sv *SwsVector) SetLength(v int32) {
|
||||
sv.length = (C.int)(v)
|
||||
}
|
||||
|
||||
// Custom: GetLengthAddr gets `SwsVector.length` address.
|
||||
// GetLengthAddr gets `SwsVector.length` address.
|
||||
func (sv *SwsVector) GetLengthAddr() *int32 {
|
||||
return (*int32)(&sv.length)
|
||||
}
|
||||
@@ -108,62 +108,62 @@ func (sv *SwsVector) GetLengthAddr() *int32 {
|
||||
// SwsFilter
|
||||
type SwsFilter C.struct_SwsFilter
|
||||
|
||||
// Custom: GetLumH gets `SwsFilter.lumH` value.
|
||||
// GetLumH gets `SwsFilter.lumH` value.
|
||||
func (sf *SwsFilter) GetLumH() *SwsVector {
|
||||
return (*SwsVector)(sf.lumH)
|
||||
}
|
||||
|
||||
// Custom: SetLumH sets `SwsFilter.lumH` value.
|
||||
// SetLumH sets `SwsFilter.lumH` value.
|
||||
func (sf *SwsFilter) SetLumH(v *SwsVector) {
|
||||
sf.lumH = (*C.struct_SwsVector)(v)
|
||||
}
|
||||
|
||||
// Custom: GetLumHAddr gets `SwsFilter.lumH` address.
|
||||
// GetLumHAddr gets `SwsFilter.lumH` address.
|
||||
func (sf *SwsFilter) GetLumHAddr() **SwsVector {
|
||||
return (**SwsVector)(unsafe.Pointer(&sf.lumH))
|
||||
}
|
||||
|
||||
// Custom: GetLumV gets `SwsFilter.lumV` value.
|
||||
// GetLumV gets `SwsFilter.lumV` value.
|
||||
func (sf *SwsFilter) GetLumV() *SwsVector {
|
||||
return (*SwsVector)(sf.lumV)
|
||||
}
|
||||
|
||||
// Custom: SetLumV sets `SwsFilter.lumV` value.
|
||||
// SetLumV sets `SwsFilter.lumV` value.
|
||||
func (sf *SwsFilter) SetLumV(v *SwsVector) {
|
||||
sf.lumV = (*C.struct_SwsVector)(v)
|
||||
}
|
||||
|
||||
// Custom: GetLumVAddr gets `SwsFilter.lumV` address.
|
||||
// GetLumVAddr gets `SwsFilter.lumV` address.
|
||||
func (sf *SwsFilter) GetLumVAddr() **SwsVector {
|
||||
return (**SwsVector)(unsafe.Pointer(&sf.lumV))
|
||||
}
|
||||
|
||||
// Custom: GetChrH gets `SwsFilter.chrH` value.
|
||||
// GetChrH gets `SwsFilter.chrH` value.
|
||||
func (sf *SwsFilter) GetChrH() *SwsVector {
|
||||
return (*SwsVector)(sf.chrH)
|
||||
}
|
||||
|
||||
// Custom: SetChrH sets `SwsFilter.chrH` value.
|
||||
// SetChrH sets `SwsFilter.chrH` value.
|
||||
func (sf *SwsFilter) SetChrH(v *SwsVector) {
|
||||
sf.chrH = (*C.struct_SwsVector)(v)
|
||||
}
|
||||
|
||||
// Custom: GetChrHAddr gets `SwsFilter.chrH` address.
|
||||
// GetChrHAddr gets `SwsFilter.chrH` address.
|
||||
func (sf *SwsFilter) GetChrHAddr() **SwsVector {
|
||||
return (**SwsVector)(unsafe.Pointer(&sf.chrH))
|
||||
}
|
||||
|
||||
// Custom: GetChrV gets `SwsFilter.chrV` value.
|
||||
// GetChrV gets `SwsFilter.chrV` value.
|
||||
func (sf *SwsFilter) GetChrV() *SwsVector {
|
||||
return (*SwsVector)(sf.chrV)
|
||||
}
|
||||
|
||||
// Custom: SetChrV sets `SwsFilter.chrV` value.
|
||||
// SetChrV sets `SwsFilter.chrV` value.
|
||||
func (sf *SwsFilter) SetChrV(v *SwsVector) {
|
||||
sf.chrV = (*C.struct_SwsVector)(v)
|
||||
}
|
||||
|
||||
// Custom: GetChrVAddr gets `SwsFilter.chrV` address.
|
||||
// GetChrVAddr gets `SwsFilter.chrV` address.
|
||||
func (sf *SwsFilter) GetChrVAddr() **SwsVector {
|
||||
return (**SwsVector)(unsafe.Pointer(&sf.chrV))
|
||||
}
|
||||
@@ -276,42 +276,58 @@ func SwsNormalizeVec(a *SwsVector, height float64) {
|
||||
C.sws_normalizeVec((*C.struct_SwsVector)(a), (C.double)(height))
|
||||
}
|
||||
|
||||
// Deprecated: No use
|
||||
// Deprecated: No use.
|
||||
//
|
||||
// SwsGetConstVec
|
||||
func SwsGetConstVec(c float64, length int32) *SwsVector {
|
||||
return (*SwsVector)(C.sws_getConstVec((C.double)(c), (C.int)(length)))
|
||||
}
|
||||
|
||||
// Deprecated: No use
|
||||
// Deprecated: No use.
|
||||
//
|
||||
// SwsGetIdentityVec
|
||||
func SwsGetIdentityVec() *SwsVector {
|
||||
return (*SwsVector)(C.sws_getIdentityVec())
|
||||
}
|
||||
|
||||
// Deprecated: No use
|
||||
// Deprecated: No use.
|
||||
//
|
||||
// SwsConvVec
|
||||
func SwsConvVec(a, b *SwsVector) {
|
||||
C.sws_convVec((*C.struct_SwsVector)(a), (*C.struct_SwsVector)(b))
|
||||
}
|
||||
|
||||
// Deprecated: No use
|
||||
// Deprecated: No use.
|
||||
//
|
||||
// SwsAddVec
|
||||
func SwsAddVec(a, b *SwsVector) {
|
||||
C.sws_addVec((*C.struct_SwsVector)(a), (*C.struct_SwsVector)(b))
|
||||
}
|
||||
|
||||
// Deprecated: No use
|
||||
// Deprecated: No use.
|
||||
//
|
||||
// SwsSubVec
|
||||
func SwsSubVec(a, b *SwsVector) {
|
||||
C.sws_subVec((*C.struct_SwsVector)(a), (*C.struct_SwsVector)(b))
|
||||
}
|
||||
|
||||
// Deprecated: No use
|
||||
// Deprecated: No use.
|
||||
//
|
||||
// SwsShiftVec
|
||||
func SwsShiftVec(a *SwsVector, shift int32) {
|
||||
C.sws_shiftVec((*C.struct_SwsVector)(a), (C.int)(shift))
|
||||
}
|
||||
|
||||
// Deprecated: No use
|
||||
// Deprecated: No use.
|
||||
//
|
||||
// SwsCloneVec
|
||||
func SwsCloneVec(a *SwsVector) *SwsVector {
|
||||
return (*SwsVector)(C.sws_cloneVec((*C.struct_SwsVector)(a)))
|
||||
}
|
||||
|
||||
// Deprecated: No use
|
||||
// Deprecated: No use.
|
||||
//
|
||||
// SwsPrintVec2
|
||||
func SwsPrintVec2(a *SwsVector, logCtx *AVClass, logLevel int32) {
|
||||
C.sws_printVec2((*C.struct_SwsVector)(a),
|
||||
(*C.struct_AVClass)(logCtx), (C.int)(logLevel))
|
||||
|
Reference in New Issue
Block a user