From 7a0773ebf2c565049865ab0b0d968b2961d26490 Mon Sep 17 00:00:00 2001 From: aggresss Date: Fri, 27 Oct 2023 06:28:28 +0800 Subject: [PATCH] 2023-10-27 06:28:27 CST W43D5 --- avcodec.go | 2161 ++++++++++++++++---------- avcodec_avdct.go | 54 +- avcodec_avfft.go | 4 +- avcodec_bsf.go | 58 +- avcodec_codec.go | 50 +- avcodec_codec_desc.go | 14 +- avcodec_codec_par.go | 174 +-- avcodec_dirac.go | 156 +- avcodec_dv_profile.go | 102 +- avcodec_packet.go | 126 +- avcodec_vaapi.go | 4 +- avcodec_xvmc.go | 4 +- avdevice.go | 122 +- avfilter.go | 360 +++-- avfilter_buffersink.go | 20 +- avfilter_buffersrc.go | 54 +- avformat.go | 903 ++++++----- avformat_avio.go | 246 +-- avutil.go | 4 +- avutil_base64.go | 4 +- avutil_blowfish.go | 12 +- avutil_buffer.go | 6 +- avutil_common.go | 32 +- avutil_cpu.go | 4 + avutil_des.go | 12 +- avutil_dict.go | 4 +- avutil_dovi_meta.go | 48 +- avutil_downmix_info.go | 36 +- avutil_encryption_info.go | 114 +- avutil_error.go | 2 +- avutil_fifo.go | 12 +- avutil_film_grain_params.go | 114 +- avutil_frame.go | 516 +++--- avutil_hdr_dynamic_metadata.go | 228 +-- avutil_hwcontext.go | 142 +- avutil_log.go | 80 +- avutil_macros.go | 2 +- avutil_mastering_display_metadata.go | 48 +- avutil_mem.go | 34 +- avutil_motion_vector.go | 66 +- avutil_opt.go | 122 +- avutil_pixdesc.go | 127 +- avutil_rational.go | 4 +- avutil_replaygain.go | 24 +- avutil_spherical.go | 54 +- avutil_stereo3d.go | 18 +- avutil_threadmessage.go | 2 +- avutil_timecode.go | 24 +- avutil_timestamp.go | 4 +- avutil_tx.go | 42 +- avutil_video_enc_params.go | 66 +- avutil_xtea.go | 6 +- examples/demuxing-decoding/main.go | 348 ++++- examples/filtering-audio/main.go | 257 ++- examples/filtering-video/main.go | 270 +++- ffmpeg_helper.go | 14 +- swscale.go | 68 +- 57 files changed, 4729 insertions(+), 2853 deletions(-) diff --git a/avcodec.go b/avcodec.go index c311cf3..8cf6b19 100644 --- a/avcodec.go +++ b/avcodec.go @@ -3,8 +3,6 @@ package ffmpeg /* #include -typedef int (*avcodec_context_excute_func)(AVCodecContext *c2, void *arg2); - typedef void (*avcodec_context_draw_horiz_band_func)(struct AVCodecContext *s, const AVFrame *src, int offset[AV_NUM_DATA_POINTERS], int y, int type, int height); @@ -14,10 +12,34 @@ typedef enum AVPixelFormat (*avcodec_context_get_format_func)(struct AVCodecCont typedef int (*avcodec_context_get_buffer2_func)(struct AVCodecContext *s, AVFrame *frame, int flags); +typedef void (*avcodec_context_rtp_callback_func)(struct AVCodecContext *avctx, void *data, int size, int mb_nb); + typedef int (*avcodec_context_get_encode_buffer_func)(struct AVCodecContext *s, AVPacket *pkt, int flags); +typedef int (*avcodec_context_execute_func)(AVCodecContext *c2, void *arg2); + +typedef int (*avcodec_context_internal_execute_func)(struct AVCodecContext *c, + avcodec_context_execute_func func, void *arg2, int *ret, int count, int size); + +typedef int (*avcodec_context_execute2_func)(AVCodecContext *c2, void *arg2, int, int); + +typedef int (*avcodec_context_internal_execute2_func)(struct AVCodecContext *c, + avcodec_context_execute2_func func, void *arg2, int *ret, int count); + typedef int (*av_lockmgr_cb)(void **mutex, enum AVLockOp op); + +typedef int (*avcodec_parser_init_func)(AVCodecParserContext *s); + +typedef int (*avcodec_parser_parse_func)(AVCodecParserContext *s, + AVCodecContext *avctx, + const uint8_t **poutbuf, int *poutbuf_size, + const uint8_t *buf, int buf_size); + +typedef void (*avcodec_parser_close_func)(AVCodecParserContext *s); + +typedef int (*avcodec_parser_split_func)(AVCodecContext *avctx, const uint8_t *buf, int buf_size); + */ import "C" import ( @@ -111,52 +133,52 @@ const ( // Note there may be multiple such areas for one frame. type AVPanScan C.struct_AVPanScan -// Custom: GetId gets `AVPanScan.id` value. +// GetId gets `AVPanScan.id` value. func (psn *AVPanScan) GetId() int32 { return (int32)(psn.id) } -// Custom: SetId sets `AVPanScan.id` value. +// SetId sets `AVPanScan.id` value. func (psn *AVPanScan) SetId(v int32) { psn.id = (C.int)(v) } -// Custom: GetIdAddr gets `AVPanScan.id` address. +// GetIdAddr gets `AVPanScan.id` address. func (psn *AVPanScan) GetIdAddr() *int32 { return (*int32)(&psn.id) } -// Custom: GetWidth gets `AVPanScan.width` value. +// GetWidth gets `AVPanScan.width` value. func (psn *AVPanScan) GetWidth() int32 { return (int32)(psn.width) } -// Custom: SetWidth sets `AVPanScan.width` value. +// SetWidth sets `AVPanScan.width` value. func (psn *AVPanScan) SetWidth(v int32) { psn.width = (C.int)(v) } -// Custom: GetWidthAddr gets `AVPanScan.width` address. +// GetWidthAddr gets `AVPanScan.width` address. func (psn *AVPanScan) GetWidthAddr() *int32 { return (*int32)(&psn.width) } -// Custom: GetHeight gets `AVPanScan.height` value. +// GetHeight gets `AVPanScan.height` value. func (psn *AVPanScan) GetHeight() int32 { return (int32)(psn.height) } -// Custom: SetHeight sets `AVPanScan.height` value. +// SetHeight sets `AVPanScan.height` value. func (psn *AVPanScan) SetHeight(v int32) { psn.height = (C.int)(v) } -// Custom: GetHeightAddr gets `AVPanScan.height` address. +// GetHeightAddr gets `AVPanScan.height` address. func (psn *AVPanScan) GetHeightAddr() *int32 { return (*int32)(&psn.height) } -// Custom: GetPosition gets `AVPanScan.position` value. +// GetPosition gets `AVPanScan.position` value. func (psn *AVPanScan) GetPosition() (v [][]int16) { for i := 0; i < 3; i++ { v = append(v, unsafe.Slice((*int16)(&psn.position[i][0]), 2)) @@ -164,7 +186,7 @@ func (psn *AVPanScan) GetPosition() (v [][]int16) { return v } -// Custom: SetPosition sets `AVPanScan.position` value. +// SetPosition sets `AVPanScan.position` value. func (psn *AVPanScan) SetPosition(v [][]int16) { for i := 0; i < FFMIN(len(v), 3); i++ { for j := 0; j < FFMIN(len(v[i]), 2); j++ { @@ -173,7 +195,7 @@ func (psn *AVPanScan) SetPosition(v [][]int16) { } } -// Custom: GetPositionAddr gets `AVPanScan.position` address. +// GetPositionAddr gets `AVPanScan.position` address. func (psn *AVPanScan) GetPositionAddr() **int16 { return (**int16)(unsafe.Pointer(&psn.position)) } @@ -183,77 +205,77 @@ func (psn *AVPanScan) GetPositionAddr() **int16 { // parameters for H.264/HEVC. type AVCPBProperties C.struct_AVCPBProperties -// Custom: GetMaxBitrate gets `AVCPBProperties.max_bitrate` value. +// GetMaxBitrate gets `AVCPBProperties.max_bitrate` value. func (cpbp *AVCPBProperties) GetMaxBitrate() int32 { return (int32)(cpbp.max_bitrate) } -// Custom: SetMaxBitrate sets `AVCPBProperties.max_bitrate` value. +// SetMaxBitrate sets `AVCPBProperties.max_bitrate` value. func (cpbp *AVCPBProperties) SetMaxBitrate(v int32) { cpbp.max_bitrate = (C.int)(v) } -// Custom: GetMaxBitrateAddr gets `AVCPBProperties.max_bitrate` address. +// GetMaxBitrateAddr gets `AVCPBProperties.max_bitrate` address. func (cpbp *AVCPBProperties) GetMaxBitrateAddr() *int32 { return (*int32)(&cpbp.max_bitrate) } -// Custom: GetMinBitrate gets `AVCPBProperties.min_bitrate` value. +// GetMinBitrate gets `AVCPBProperties.min_bitrate` value. func (cpbp *AVCPBProperties) GetMinBitrate() int32 { return (int32)(cpbp.min_bitrate) } -// Custom: SetMinBitrate sets `AVCPBProperties.min_bitrate` value. +// SetMinBitrate sets `AVCPBProperties.min_bitrate` value. func (cpbp *AVCPBProperties) SetMinBitrate(v int32) { cpbp.min_bitrate = (C.int)(v) } -// Custom: GetMinBitrateAddr gets `AVCPBProperties.min_bitrate` address. +// GetMinBitrateAddr gets `AVCPBProperties.min_bitrate` address. func (cpbp *AVCPBProperties) GetMinBitrateAddr() *int32 { return (*int32)(&cpbp.min_bitrate) } -// Custom: GetAvgBitrate gets `AVCPBProperties.avg_bitrate` value. +// GetAvgBitrate gets `AVCPBProperties.avg_bitrate` value. func (cpbp *AVCPBProperties) GetAvgBitrate() int32 { return (int32)(cpbp.avg_bitrate) } -// Custom: SetAvgBitrate sets `AVCPBProperties.avg_bitrate` value. +// SetAvgBitrate sets `AVCPBProperties.avg_bitrate` value. func (cpbp *AVCPBProperties) SetAvgBitrate(v int32) { cpbp.avg_bitrate = (C.int)(v) } -// Custom: GetAvgBitrateAddr gets `AVCPBProperties.avg_bitrate` address. +// GetAvgBitrateAddr gets `AVCPBProperties.avg_bitrate` address. func (cpbp *AVCPBProperties) GetAvgBitrateAddr() *int32 { return (*int32)(&cpbp.avg_bitrate) } -// Custom: GetBufferSize gets `AVCPBProperties.buffer_size` value. +// GetBufferSize gets `AVCPBProperties.buffer_size` value. func (cpbp *AVCPBProperties) GetBufferSize() int32 { return (int32)(cpbp.buffer_size) } -// Custom: SetBufferSize sets `AVCPBProperties.buffer_size` value. +// SetBufferSize sets `AVCPBProperties.buffer_size` value. func (cpbp *AVCPBProperties) SetBufferSize(v int32) { cpbp.buffer_size = (C.int)(v) } -// Custom: GetBufferSizeAddr gets `AVCPBProperties.buffer_size` address. +// GetBufferSizeAddr gets `AVCPBProperties.buffer_size` address. func (cpbp *AVCPBProperties) GetBufferSizeAddr() *int32 { return (*int32)(&cpbp.buffer_size) } -// Custom: GetVbvDelay gets `AVCPBProperties.vbv_delay` value. +// GetVbvDelay gets `AVCPBProperties.vbv_delay` value. func (cpbp *AVCPBProperties) GetVbvDelay() uint64 { return (uint64)(cpbp.vbv_delay) } -// Custom: SetVbvDelay sets `AVCPBProperties.vbv_delay` value. +// SetVbvDelay sets `AVCPBProperties.vbv_delay` value. func (cpbp *AVCPBProperties) SetVbvDelay(v uint64) { cpbp.vbv_delay = (C.uint64_t)(v) } -// Custom: GetVbvDelayAddr gets `AVCPBProperties.vbv_delay` address. +// GetVbvDelayAddr gets `AVCPBProperties.vbv_delay` address. func (cpbp *AVCPBProperties) GetVbvDelayAddr() *uint64 { return (*uint64)(&cpbp.vbv_delay) } @@ -263,32 +285,32 @@ func (cpbp *AVCPBProperties) GetVbvDelayAddr() *uint64 { // as defined in ISO/IEC 14496-12 type AVProducerReferenceTime C.struct_AVProducerReferenceTime -// Custom: GetWallclock gets `AVProducerReferenceTime.wallclock` value. +// GetWallclock gets `AVProducerReferenceTime.wallclock` value. func (prt *AVProducerReferenceTime) GetWallclock() int64 { return (int64)(prt.wallclock) } -// Custom: SetWallclock sets `AVProducerReferenceTime.wallclock` value. +// SetWallclock sets `AVProducerReferenceTime.wallclock` value. func (prt *AVProducerReferenceTime) SetWallclock(v int64) { prt.wallclock = (C.int64_t)(v) } -// Custom: GetWallclockAddr gets `AVProducerReferenceTime.wallclock` address. +// GetWallclockAddr gets `AVProducerReferenceTime.wallclock` address. func (prt *AVProducerReferenceTime) GetWallclockAddr() *int64 { return (*int64)(&prt.wallclock) } -// Custom: GetFlags gets `AVProducerReferenceTime.flags` value. +// GetFlags gets `AVProducerReferenceTime.flags` value. func (prt *AVProducerReferenceTime) GetFlags() int32 { return (int32)(prt.flags) } -// Custom: SetFlags sets `AVProducerReferenceTime.flags` value. +// SetFlags sets `AVProducerReferenceTime.flags` value. func (prt *AVProducerReferenceTime) SetFlags(v int32) { prt.flags = (C.int)(v) } -// Custom: GetFlagsAddr gets `AVProducerReferenceTime.flags` address. +// GetFlagsAddr gets `AVProducerReferenceTime.flags` address. func (prt *AVProducerReferenceTime) GetFlagsAddr() *int32 { return (*int32)(&prt.flags) } @@ -301,377 +323,377 @@ const ( // AvCodecContext is main external API structure. type AVCodecContext C.struct_AVCodecContext -// Custom: GetAVClass gets `AVCodecContext.av_class` value. +// GetAVClass gets `AVCodecContext.av_class` value. func (avctx *AVCodecContext) GetAvClass() *AVClass { return (*AVClass)(avctx.av_class) } -// Custom: SetAvClass sets `AVCodecContext.av_class` value. +// SetAvClass sets `AVCodecContext.av_class` value. func (avctx *AVCodecContext) SetAvClass(v *AVClass) { avctx.av_class = (*C.struct_AVClass)(v) } -// Custom: GetAvClassAddr gets `AVCodecContext.av_class` address. +// GetAvClassAddr gets `AVCodecContext.av_class` address. func (avctx *AVCodecContext) GetAvClassAddr() **AVClass { return (**AVClass)(unsafe.Pointer(&avctx.av_class)) } -// Custom: GetLogLevelOffset gets `AVCodecContext.log_level_offset` value. +// GetLogLevelOffset gets `AVCodecContext.log_level_offset` value. func (avctx *AVCodecContext) GetLogLevelOffset() int32 { return (int32)(avctx.log_level_offset) } -// Custom: SetLogLevelOffset sets `AVCodecContext.log_level_offset` value. +// SetLogLevelOffset sets `AVCodecContext.log_level_offset` value. func (avctx *AVCodecContext) SetLogLevelOffset(v int32) { avctx.log_level_offset = (C.int)(v) } -// Custom: GetLogLevelOffsetAddr gets `AVCodecContext.log_level_offset` address. +// GetLogLevelOffsetAddr gets `AVCodecContext.log_level_offset` address. func (avctx *AVCodecContext) GetLogLevelOffsetAddr() *int32 { return (*int32)(&avctx.log_level_offset) } -// Custom: GetCodecType gets `AVCodecContext.codectype` value. +// GetCodecType gets `AVCodecContext.codectype` value. func (avctx *AVCodecContext) GetCodecType() AVMediaType { return (AVMediaType)(avctx.codec_type) } -// Custom: SetCodecType sets `AVCodecContext.codectype` value. +// SetCodecType sets `AVCodecContext.codectype` value. func (avctx *AVCodecContext) SetCodecType(v AVMediaType) { avctx.codec_type = (C.enum_AVMediaType)(v) } -// Custom: GetCodecTypeAddr gets `AVCodecContext.codectype` address. +// GetCodecTypeAddr gets `AVCodecContext.codectype` address. func (avctx *AVCodecContext) GetCodecTypeAddr() *AVMediaType { return (*AVMediaType)(&avctx.codec_type) } -// Custom: GetCodec gets `AVCodecContext.codec` value. +// GetCodec gets `AVCodecContext.codec` value. func (avctx *AVCodecContext) GetCodec() *AVCodec { return (*AVCodec)(avctx.codec) } -// Custom: SetCodec sets `AVCodecContext.codec` value. +// SetCodec sets `AVCodecContext.codec` value. func (avctx *AVCodecContext) SetCodec(v *AVCodec) { avctx.codec = (*C.struct_AVCodec)(v) } -// Custom: GetCodecAddr gets `AVCodecContext.codec` address. +// GetCodecAddr gets `AVCodecContext.codec` address. func (avctx *AVCodecContext) GetCodecAddr() **AVCodec { return (**AVCodec)(unsafe.Pointer(&avctx.codec)) } -// Custom: GetCodecId gets `AVCodecContext.codec_id` value. +// GetCodecId gets `AVCodecContext.codec_id` value. func (avctx *AVCodecContext) GetCodecId() AVCodecID { return (AVCodecID)(avctx.codec_id) } -// Custom: SetCodecId sets `AVCodecContext.codec_id` value. +// SetCodecId sets `AVCodecContext.codec_id` value. func (avctx *AVCodecContext) SetCodecId(v AVCodecID) { avctx.codec_id = (C.enum_AVCodecID)(v) } -// Custom: GetCodecIdAddr gets `AVCodecContext.codec_id` address. +// GetCodecIdAddr gets `AVCodecContext.codec_id` address. func (avctx *AVCodecContext) GetCodecIdAddr() *AVCodecID { return (*AVCodecID)(unsafe.Pointer(&avctx.codec_id)) } -// Custom: GetCodecTag gets `AVCodecContext.codec_tag` value. +// GetCodecTag gets `AVCodecContext.codec_tag` value. func (avctx *AVCodecContext) GetCodecTag() uint32 { return (uint32)(avctx.codec_tag) } -// Custom: SetCodecTag sets `AVCodecContext.codec_tag` value. +// SetCodecTag sets `AVCodecContext.codec_tag` value. func (avctx *AVCodecContext) SetCodecTag(v uint32) { avctx.codec_tag = (C.uint)(v) } -// Custom: GetCodecTagAddr gets `AVCodecContext.codec_tag` address. +// GetCodecTagAddr gets `AVCodecContext.codec_tag` address. func (avctx *AVCodecContext) GetCodecTagAddr() *uint32 { return (*uint32)(&avctx.codec_tag) } -// Custom: GetPrivData gets `AVCodecContext.priv_data` value. +// GetPrivData gets `AVCodecContext.priv_data` value. func (avctx *AVCodecContext) GetPrivData() unsafe.Pointer { return avctx.priv_data } -// Custom: SetPrivData sets `AVCodecContext.priv_data` value. +// SetPrivData sets `AVCodecContext.priv_data` value. func (avctx *AVCodecContext) SetPrivData(v CVoidPointer) { avctx.priv_data = VoidPointer(v) } -// Custom: GetPrivDataAddr gets `AVCodecContext.priv_data` address. +// GetPrivDataAddr gets `AVCodecContext.priv_data` address. func (avctx *AVCodecContext) GetPrivDataAddr() unsafe.Pointer { return (unsafe.Pointer)(&avctx.priv_data) } -// Custom: GetOpaque gets `AVCodecContext.opaque` value. +// GetOpaque gets `AVCodecContext.opaque` value. func (avctx *AVCodecContext) GetOpaque() unsafe.Pointer { return avctx.opaque } -// Custom: SetOpaque sets `AVCodecContext.opaque` value. +// SetOpaque sets `AVCodecContext.opaque` value. func (avctx *AVCodecContext) SetOpaque(v CVoidPointer) { avctx.opaque = VoidPointer(v) } -// Custom: GetOpaqueAddr gets `AVCodecContext.opaque` address. +// GetOpaqueAddr gets `AVCodecContext.opaque` address. func (avctx *AVCodecContext) GetOpaqueAddr() unsafe.Pointer { return (unsafe.Pointer)(&avctx.opaque) } -// Custom: GetBitRate gets `AVCodecContext.bit_rate` value. +// GetBitRate gets `AVCodecContext.bit_rate` value. func (avctx *AVCodecContext) GetBitRate() int64 { return (int64)(avctx.bit_rate) } -// Custom: SetBitRate sets `AVCodecContext.bit_rate` value. +// SetBitRate sets `AVCodecContext.bit_rate` value. func (avctx *AVCodecContext) SetBitRate(v int64) { avctx.bit_rate = (C.int64_t)(v) } -// Custom: GetBitRateAddr gets `AVCodecContext.bit_rate` address. +// GetBitRateAddr gets `AVCodecContext.bit_rate` address. func (avctx *AVCodecContext) GetBitRateAddr() *int64 { return (*int64)(&avctx.bit_rate) } -// Custom: GetBitRateTolerance gets `AVCodecContext.bit_rate_tolerance` value. +// GetBitRateTolerance gets `AVCodecContext.bit_rate_tolerance` value. func (avctx *AVCodecContext) GetBitRateTolerance() int32 { return (int32)(avctx.bit_rate_tolerance) } -// Custom: SetBitRateTolerance sets `AVCodecContext.bit_rate_tolerance` value. +// SetBitRateTolerance sets `AVCodecContext.bit_rate_tolerance` value. func (avctx *AVCodecContext) SetBitRateTolerance(v int32) { avctx.bit_rate_tolerance = (C.int)(v) } -// Custom: GetBitRateToleranceAddr gets `AVCodecContext.bit_rate_tolerance` address. +// GetBitRateToleranceAddr gets `AVCodecContext.bit_rate_tolerance` address. func (avctx *AVCodecContext) GetBitRateToleranceAddr() *int32 { return (*int32)(&avctx.bit_rate_tolerance) } -// Custom: GetGlobalQuality gets `AVCodecContext.global_quality` value. +// GetGlobalQuality gets `AVCodecContext.global_quality` value. func (avctx *AVCodecContext) GetGlobalQuality() int32 { return (int32)(avctx.global_quality) } -// Custom: SetGlobalQuality sets `AVCodecContext.global_quality` value. +// SetGlobalQuality sets `AVCodecContext.global_quality` value. func (avctx *AVCodecContext) SetGlobalQuality(v int32) { avctx.global_quality = (C.int)(v) } -// Custom: GetGlobalQualityAddr gets `AVCodecContext.global_quality` address. +// GetGlobalQualityAddr gets `AVCodecContext.global_quality` address. func (avctx *AVCodecContext) GetGlobalQualityAddr() *int32 { return (*int32)(&avctx.global_quality) } -// Custom: GetCompressionLevel gets `AVCodecContext.compression_level` value. +// GetCompressionLevel gets `AVCodecContext.compression_level` value. func (avctx *AVCodecContext) GetCompressionLevel() int32 { return (int32)(avctx.compression_level) } -// Custom: SetCompressionLevel sets `AVCodecContext.compression_level` value. +// SetCompressionLevel sets `AVCodecContext.compression_level` value. func (avctx *AVCodecContext) SetCompressionLevel(v int32) { avctx.compression_level = (C.int)(v) } -// Custom: GetCompressionLevelAddr gets `AVCodecContext.compression_level` address. +// GetCompressionLevelAddr gets `AVCodecContext.compression_level` address. func (avctx *AVCodecContext) GetCompressionLevelAddr() *int32 { return (*int32)(&avctx.compression_level) } -// Custom: GetFlags gets `AVCodecContext.flags` value. +// GetFlags gets `AVCodecContext.flags` value. func (avctx *AVCodecContext) GetFlags() int32 { return (int32)(avctx.flags) } -// Custom: SetFlags sets `AVCodecContext.flags` value. +// SetFlags sets `AVCodecContext.flags` value. func (avctx *AVCodecContext) SetFlags(v int32) { avctx.flags = (C.int)(v) } -// Custom: GetFlagsAddr gets `AVCodecContext.flags` address. +// GetFlagsAddr gets `AVCodecContext.flags` address. func (avctx *AVCodecContext) GetFlagsAddr() *int32 { return (*int32)(&avctx.flags) } -// Custom: GetFlags2 gets `AVCodecContext.flags2` value. +// GetFlags2 gets `AVCodecContext.flags2` value. func (avctx *AVCodecContext) GetFlags2() int32 { return (int32)(avctx.flags2) } -// Custom: SetFlags2 sets `AVCodecContext.flags2` value. +// SetFlags2 sets `AVCodecContext.flags2` value. func (avctx *AVCodecContext) SetFlags2(v int32) { avctx.flags2 = (C.int)(v) } -// Custom: GetFlags2Addr gets `AVCodecContext.flags2` address. +// GetFlags2Addr gets `AVCodecContext.flags2` address. func (avctx *AVCodecContext) GetFlags2Addr() *int32 { return (*int32)(&avctx.flags2) } -// Custom: GetExtradata gets `AVCodecContext.extradata` value. +// GetExtradata gets `AVCodecContext.extradata` value. func (avctx *AVCodecContext) GetExtradata() *uint8 { return (*uint8)(avctx.extradata) } -// Custom: SetExtradata sets `AVCodecContext.extradata` value. +// SetExtradata sets `AVCodecContext.extradata` value. func (avctx *AVCodecContext) SetExtradata(v *uint8) { avctx.extradata = (*C.uint8_t)(v) } -// Custom: GetExtradataAddr gets `AVCodecContext.extradata` address. +// GetExtradataAddr gets `AVCodecContext.extradata` address. func (avctx *AVCodecContext) GetExtradataAddr() **uint8 { return (**uint8)(unsafe.Pointer(&avctx.extradata)) } -// Custom: GetExtradataSize gets `AVCodecContext.extradata_size` value. +// GetExtradataSize gets `AVCodecContext.extradata_size` value. func (avctx *AVCodecContext) GetExtradataSize() int32 { return (int32)(avctx.extradata_size) } -// Custom: SetExtradataSize sets `AVCodecContext.extradata_size` value. +// SetExtradataSize sets `AVCodecContext.extradata_size` value. func (avctx *AVCodecContext) SetExtradataSize(v int32) { avctx.extradata_size = (C.int)(v) } -// Custom: GetExtradataSizeAddr gets `AVCodecContext.extradata_size` address. +// GetExtradataSizeAddr gets `AVCodecContext.extradata_size` address. func (avctx *AVCodecContext) GetExtradataSizeAddr() *int32 { return (*int32)(&avctx.extradata_size) } -// Custom: GetTimeBase gets `AVCodecContext.time_base` value. +// GetTimeBase gets `AVCodecContext.time_base` value. func (avctx *AVCodecContext) GetTimeBase() AVRational { return (AVRational)(avctx.time_base) } -// Custom: SetTimeBase sets `AVCodecContext.time_base` value. +// SetTimeBase sets `AVCodecContext.time_base` value. func (avctx *AVCodecContext) SetTimeBase(v AVRational) { avctx.time_base = (C.struct_AVRational)(v) } -// Custom: GetTimeBaseAddr gets `AVCodecContext.time_base` address. +// GetTimeBaseAddr gets `AVCodecContext.time_base` address. func (avctx *AVCodecContext) GetTimeBaseAddr() *AVRational { return (*AVRational)(&avctx.time_base) } -// Custom: GetTicksPerFrame gets `AVCodecContext.ticks_per_frame` value. +// GetTicksPerFrame gets `AVCodecContext.ticks_per_frame` value. func (avctx *AVCodecContext) GetTicksPerFrame() int32 { return (int32)(avctx.ticks_per_frame) } -// Custom: SetTicksPerFrame sets `AVCodecContext.ticks_per_frame` value. +// SetTicksPerFrame sets `AVCodecContext.ticks_per_frame` value. func (avctx *AVCodecContext) SetTicksPerFrame(v int32) { avctx.ticks_per_frame = (C.int)(v) } -// Custom: GetTicksPerFrameAddr gets `AVCodecContext.ticks_per_frame` address. +// GetTicksPerFrameAddr gets `AVCodecContext.ticks_per_frame` address. func (avctx *AVCodecContext) GetTicksPerFrameAddr() *int32 { return (*int32)(&avctx.ticks_per_frame) } -// Custom: GetDelay gets `AVCodecContext.delay` value. +// GetDelay gets `AVCodecContext.delay` value. func (avctx *AVCodecContext) GetDelay() int32 { return (int32)(avctx.delay) } -// Custom: SetDelay sets `AVCodecContext.delay` value. +// SetDelay sets `AVCodecContext.delay` value. func (avctx *AVCodecContext) SetDelay(v int32) { avctx.delay = (C.int)(v) } -// Custom: GetDelayAddr gets `AVCodecContext.delay` address. +// GetDelayAddr gets `AVCodecContext.delay` address. func (avctx *AVCodecContext) GetDelayAddr() *int32 { return (*int32)(&avctx.delay) } -// Custom: GetWidth gets `AVCodecContext.width` value. +// GetWidth gets `AVCodecContext.width` value. func (avctx *AVCodecContext) GetWidth() int32 { return (int32)(avctx.width) } -// Custom: SetWidth sets `AVCodecContext.width` value. +// SetWidth sets `AVCodecContext.width` value. func (avctx *AVCodecContext) SetWidth(v int32) { avctx.width = (C.int)(v) } -// Custom: GetWidthAddr gets `AVCodecContext.width` address. +// GetWidthAddr gets `AVCodecContext.width` address. func (avctx *AVCodecContext) GetWidthAddr() *int32 { return (*int32)(&avctx.width) } -// Custom: GetHeight gets `AVCodecContext.height` value. +// GetHeight gets `AVCodecContext.height` value. func (avctx *AVCodecContext) GetHeight() int32 { return (int32)(avctx.height) } -// Custom: SetHeight sets `AVCodecContext.height` value. +// SetHeight sets `AVCodecContext.height` value. func (avctx *AVCodecContext) SetHeight(v int32) { avctx.height = (C.int)(v) } -// Custom: GetHeightAddr gets `AVCodecContext.height` address. +// GetHeightAddr gets `AVCodecContext.height` address. func (avctx *AVCodecContext) GetHeightAddr() *int32 { return (*int32)(&avctx.height) } -// Custom: GetCodedWidth gets `AVCodecContext.coded_width` value. +// GetCodedWidth gets `AVCodecContext.coded_width` value. func (avctx *AVCodecContext) GetCodedWidth() int32 { return (int32)(avctx.coded_width) } -// Custom: SetCodedWidth sets `AVCodecContext.coded_width` value. +// SetCodedWidth sets `AVCodecContext.coded_width` value. func (avctx *AVCodecContext) SetCodedWidth(v int32) { avctx.coded_width = (C.int)(v) } -// Custom: GetCodedWidthAddr gets `AVCodecContext.coded_width` address. +// GetCodedWidthAddr gets `AVCodecContext.coded_width` address. func (avctx *AVCodecContext) GetCodedWidthAddr() *int32 { return (*int32)(&avctx.coded_width) } -// Custom: GetCodedHeight gets `AVCodecContext.coded_height` value. +// GetCodedHeight gets `AVCodecContext.coded_height` value. func (avctx *AVCodecContext) GetCodedHeight() int32 { return (int32)(avctx.coded_height) } -// Custom: SetCodedHeight sets `AVCodecContext.coded_height` value. +// SetCodedHeight sets `AVCodecContext.coded_height` value. func (avctx *AVCodecContext) SetCodedHeight(v int32) { avctx.coded_height = (C.int)(v) } -// Custom: GetCodedHeightAddr gets `AVCodecContext.coded_height` address. +// GetCodedHeightAddr gets `AVCodecContext.coded_height` address. func (avctx *AVCodecContext) GetCodedHeightAddr() *int32 { return (*int32)(&avctx.coded_height) } -// Custom: GetGopSize gets `AVCodecContext.gop_size` value. +// GetGopSize gets `AVCodecContext.gop_size` value. func (avctx *AVCodecContext) GetGopSize() int32 { return (int32)(avctx.gop_size) } -// Custom: SetGopSize sets `AVCodecContext.gop_size` value. +// SetGopSize sets `AVCodecContext.gop_size` value. func (avctx *AVCodecContext) SetGopSize(v int32) { avctx.gop_size = (C.int)(v) } -// Custom: GetGopSizeAddr gets `AVCodecContext.gop_size` address. +// GetGopSizeAddr gets `AVCodecContext.gop_size` address. func (avctx *AVCodecContext) GetGopSizeAddr() *int32 { return (*int32)(&avctx.gop_size) } -// Custom: GetPixFmt gets `AVCodecContext.pix_fmt` value. +// GetPixFmt gets `AVCodecContext.pix_fmt` value. func (avctx *AVCodecContext) GetPixFmt() AVPixelFormat { return (AVPixelFormat)(avctx.pix_fmt) } -// Custom: SetPixFmt sets `AVCodecContext.pix_fmt` value. +// SetPixFmt sets `AVCodecContext.pix_fmt` value. func (avctx *AVCodecContext) SetPixFmt(v AVPixelFormat) { avctx.pix_fmt = (C.enum_AVPixelFormat)(v) } -// Custom: GetPixFmtAddr gets `AVCodecContext.pix_fmt` address. +// GetPixFmtAddr gets `AVCodecContext.pix_fmt` address. func (avctx *AVCodecContext) GetPixFmtAddr() *AVPixelFormat { return (*AVPixelFormat)(&avctx.pix_fmt) } @@ -681,22 +703,32 @@ func (avctx *AVCodecContext) GetPixFmtAddr() *AVPixelFormat { // int y, int type, int height); type AVCodecContextDrawHorizBandFunc = C.avcodec_context_draw_horiz_band_func -// Custom: SetDrawHorizBand sets `AVCodecContext.draw_horiz_band` value. +// GetDrawHorizBand gets `AVCodecContext.draw_horiz_band` value. +func (avctx *AVCodecContext) GetDrawHorizBand() AVCodecContextDrawHorizBandFunc { + return (AVCodecContextDrawHorizBandFunc)(avctx.draw_horiz_band) +} + +// SetDrawHorizBand sets `AVCodecContext.draw_horiz_band` value. func (avctx *AVCodecContext) SetDrawHorizBand(v AVCodecContextDrawHorizBandFunc) { avctx.draw_horiz_band = (C.avcodec_context_draw_horiz_band_func)(v) } -// Custom: GetMaxBFrames gets `AVCodecContext.max_b_frames` value. +// GetDrawHorizBandAddr gets `AVCodecContext.draw_horiz_band` value. +func (avctx *AVCodecContext) GetDrawHorizBandAddr() *AVCodecContextDrawHorizBandFunc { + return (*AVCodecContextDrawHorizBandFunc)(&avctx.draw_horiz_band) +} + +// GetMaxBFrames gets `AVCodecContext.max_b_frames` value. func (avctx *AVCodecContext) GetMaxBFrames() int32 { return (int32)(avctx.max_b_frames) } -// Custom: SetMaxBFrames sets `AVCodecContext.max_b_frames` value. +// SetMaxBFrames sets `AVCodecContext.max_b_frames` value. func (avctx *AVCodecContext) SetMaxBFrames(v int32) { avctx.max_b_frames = (C.int)(v) } -// Custom: GetMaxBFramesAddr gets `AVCodecContext.max_b_frames` address. +// GetMaxBFramesAddr gets `AVCodecContext.max_b_frames` address. func (avctx *AVCodecContext) GetMaxBFramesAddr() *int32 { return (*int32)(&avctx.max_b_frames) } @@ -705,217 +737,245 @@ func (avctx *AVCodecContext) GetMaxBFramesAddr() *int32 { // const enum AVPixelFormat * fmt); type AVCodecContextGetFormatFunc = C.avcodec_context_get_format_func -// Custom: SetGetFormat sets `AVCodecContext.get_format` value. +// GetGetFormat gets `AVCodecContext.get_format` value. +func (avctx *AVCodecContext) GetGetFormat() AVCodecContextGetFormatFunc { + return (AVCodecContextGetFormatFunc)(avctx.get_format) +} + +// SetGetFormat sets `AVCodecContext.get_format` value. func (avctx *AVCodecContext) SetGetFormat(v AVCodecContextGetFormatFunc) { avctx.get_format = (C.avcodec_context_get_format_func)(v) } -// Custom: GetBQuantFactor gets `AVCodecContext.b_quant_factor` value. +// GetGetFormatAddr gets `AVCodecContext.get_format` address. +func (avctx *AVCodecContext) GetGetFormatAddr() *AVCodecContextGetFormatFunc { + return (*AVCodecContextGetFormatFunc)(&avctx.get_format) +} + +// GetBQuantFactor gets `AVCodecContext.b_quant_factor` value. func (avctx *AVCodecContext) GetBQuantFactor() float32 { return (float32)(avctx.b_quant_factor) } -// Custom: SetBQuantFactor sets `AVCodecContext.b_quant_factor` value. +// SetBQuantFactor sets `AVCodecContext.b_quant_factor` value. func (avctx *AVCodecContext) SetBQuantFactor(v float32) { avctx.b_quant_factor = (C.float)(v) } -// Custom: GetBQuantFactorAddr gets `AVCodecContext.b_quant_factor` address. +// GetBQuantFactorAddr gets `AVCodecContext.b_quant_factor` address. func (avctx *AVCodecContext) GetBQuantFactorAddr() *float32 { return (*float32)(&avctx.b_quant_factor) } -// Custom: GetBFrameStrategy gets `AVCodecContext.b_frame_strategy` value. +// Deprecated: Use encoder private options instead. +// +// GetBFrameStrategy gets `AVCodecContext.b_frame_strategy` value. func (avctx *AVCodecContext) GetBFrameStrategy() int32 { return (int32)(avctx.b_frame_strategy) } -// Custom: SetBFrameStrategy sets `AVCodecContext.b_frame_strategy` value. +// Deprecated: Use encoder private options instead. +// +// SetBFrameStrategy sets `AVCodecContext.b_frame_strategy` value. func (avctx *AVCodecContext) SetBFrameStrategy(v int32) { avctx.b_frame_strategy = (C.int)(v) } -// Custom: GetBFrameStrategyAddr gets `AVCodecContext.b_frame_strategy` address. +// Deprecated: Use encoder private options instead. +// +// GetBFrameStrategyAddr gets `AVCodecContext.b_frame_strategy` address. func (avctx *AVCodecContext) GetBFrameStrategyAddr() *int32 { return (*int32)(&avctx.b_frame_strategy) } -// Custom: GetBQuantOffset gets `AVCodecContext.b_quant_offset` value. +// GetBQuantOffset gets `AVCodecContext.b_quant_offset` value. func (avctx *AVCodecContext) GetBQuantOffset() float32 { return (float32)(avctx.b_quant_offset) } -// Custom: SetBQuantOffset sets `AVCodecContext.b_quant_offset` value. +// SetBQuantOffset sets `AVCodecContext.b_quant_offset` value. func (avctx *AVCodecContext) SetBQuantOffset(v float32) { avctx.b_quant_offset = (C.float)(v) } -// Custom: GetBQuantOffsetAddr gets `AVCodecContext.b_quant_offset` address. +// GetBQuantOffsetAddr gets `AVCodecContext.b_quant_offset` address. func (avctx *AVCodecContext) GetBQuantOffsetAddr() *float32 { return (*float32)(&avctx.b_quant_offset) } -// Custom: GetHasBFrames gets `AVCodecContext.has_b_frames` value. +// GetHasBFrames gets `AVCodecContext.has_b_frames` value. func (avctx *AVCodecContext) GetHasBFrames() int32 { return (int32)(avctx.has_b_frames) } -// Custom: SetHasBFrames sets `AVCodecContext.has_b_frames` value. +// SetHasBFrames sets `AVCodecContext.has_b_frames` value. func (avctx *AVCodecContext) SetHasBFrames(v int32) { avctx.has_b_frames = (C.int)(v) } -// Custom: GetHasBFramesAddr gets `AVCodecContext.has_b_frames` address. +// GetHasBFramesAddr gets `AVCodecContext.has_b_frames` address. func (avctx *AVCodecContext) GetHasBFramesAddr() *int32 { return (*int32)(&avctx.has_b_frames) } -// Custom: GetMpegQuant gets `AVCodecContext.mpeg_quant` value. +// Deprecated: Use encoder private options instead. +// +// GetMpegQuant gets `AVCodecContext.mpeg_quant` value. func (avctx *AVCodecContext) GetMpegQuant() int32 { return (int32)(avctx.mpeg_quant) } -// Custom: SetMpegQuant sets `AVCodecContext.mpeg_quant` value. +// Deprecated: Use encoder private options instead. +// +// SetMpegQuant sets `AVCodecContext.mpeg_quant` value. func (avctx *AVCodecContext) SetMpegQuant(v int32) { avctx.mpeg_quant = (C.int)(v) } -// Custom: GetMpegQuantAddr gets `AVCodecContext.mpeg_quant` address. +// Deprecated: Use encoder private options instead. +// +// GetMpegQuantAddr gets `AVCodecContext.mpeg_quant` address. func (avctx *AVCodecContext) GetMpegQuantAddr() *int32 { return (*int32)(&avctx.mpeg_quant) } -// Custom: GetIQuantFactor gets `AVCodecContext.i_quant_factor` value. +// GetIQuantFactor gets `AVCodecContext.i_quant_factor` value. func (avctx *AVCodecContext) GetIQuantFactor() float32 { return (float32)(avctx.i_quant_factor) } -// Custom: SetIQuantFactor sets `AVCodecContext.i_quant_factor` value. +// SetIQuantFactor sets `AVCodecContext.i_quant_factor` value. func (avctx *AVCodecContext) SetIQuantFactor(v float32) { avctx.i_quant_factor = (C.float)(v) } -// Custom: GetIQuantFactorAddr gets `AVCodecContext.i_quant_factor` address. +// GetIQuantFactorAddr gets `AVCodecContext.i_quant_factor` address. func (avctx *AVCodecContext) GetIQuantFactorAddr() *float32 { return (*float32)(&avctx.i_quant_factor) } -// Custom: GetIQuantOffset gets `AVCodecContext.i_quant_offset` value. +// GetIQuantOffset gets `AVCodecContext.i_quant_offset` value. func (avctx *AVCodecContext) GetIQuantOffset() float32 { return (float32)(avctx.i_quant_offset) } -// Custom: SetIQuantOffset sets `AVCodecContext.i_quant_offset` value. +// SetIQuantOffset sets `AVCodecContext.i_quant_offset` value. func (avctx *AVCodecContext) SetIQuantOffset(v float32) { avctx.i_quant_offset = (C.float)(v) } -// Custom: GetIQuantOffsetAddr gets `AVCodecContext.i_quant_offset` address. +// GetIQuantOffsetAddr gets `AVCodecContext.i_quant_offset` address. func (avctx *AVCodecContext) GetIQuantOffsetAddr() *float32 { return (*float32)(&avctx.i_quant_offset) } -// Custom: GetLumiMasking gets `AVCodecContext.lumi_masking` value. +// GetLumiMasking gets `AVCodecContext.lumi_masking` value. func (avctx *AVCodecContext) GetLumiMasking() float32 { return (float32)(avctx.lumi_masking) } -// Custom: SetLumiMasking sets `AVCodecContext.lumi_masking` value. +// SetLumiMasking sets `AVCodecContext.lumi_masking` value. func (avctx *AVCodecContext) SetLumiMasking(v float32) { avctx.lumi_masking = (C.float)(v) } -// Custom: GetLumiMaskingAddr gets `AVCodecContext.lumi_masking` address. +// GetLumiMaskingAddr gets `AVCodecContext.lumi_masking` address. func (avctx *AVCodecContext) GetLumiMaskingAddr() *float32 { return (*float32)(&avctx.lumi_masking) } -// Custom: GetTemporalCplxMasking gets `AVCodecContext.temporal_cplx_masking` value. +// GetTemporalCplxMasking gets `AVCodecContext.temporal_cplx_masking` value. func (avctx *AVCodecContext) GetTemporalCplxMasking() float32 { return (float32)(avctx.temporal_cplx_masking) } -// Custom: SetTemporalCplxMasking sets `AVCodecContext.temporal_cplx_masking` value. +// SetTemporalCplxMasking sets `AVCodecContext.temporal_cplx_masking` value. func (avctx *AVCodecContext) SetTemporalCplxMasking(v float32) { avctx.temporal_cplx_masking = (C.float)(v) } -// Custom: GetTemporalCplxMaskingAddr gets `AVCodecContext.temporal_cplx_masking` address. +// GetTemporalCplxMaskingAddr gets `AVCodecContext.temporal_cplx_masking` address. func (avctx *AVCodecContext) GetTemporalCplxMaskingAddr() *float32 { return (*float32)(&avctx.temporal_cplx_masking) } -// Custom: GetSpatialCplxMasking gets `AVCodecContext.spatial_cplx_masking` value. +// GetSpatialCplxMasking gets `AVCodecContext.spatial_cplx_masking` value. func (avctx *AVCodecContext) GetSpatialCplxMasking() float32 { return (float32)(avctx.spatial_cplx_masking) } -// Custom: SetSpatialCplxMasking sets `AVCodecContext.spatial_cplx_masking` value. +// SetSpatialCplxMasking sets `AVCodecContext.spatial_cplx_masking` value. func (avctx *AVCodecContext) SetSpatialCplxMasking(v float32) { avctx.spatial_cplx_masking = (C.float)(v) } -// Custom: GetSpatialCplxMaskingAddr gets `AVCodecContext.spatial_cplx_masking` address. +// GetSpatialCplxMaskingAddr gets `AVCodecContext.spatial_cplx_masking` address. func (avctx *AVCodecContext) GetSpatialCplxMaskingAddr() *float32 { return (*float32)(&avctx.spatial_cplx_masking) } -// Custom: GetPMasking gets `AVCodecContext.p_masking` value. +// GetPMasking gets `AVCodecContext.p_masking` value. func (avctx *AVCodecContext) GetPMasking() float32 { return (float32)(avctx.p_masking) } -// Custom: SetPMasking sets `AVCodecContext.p_masking` value. +// SetPMasking sets `AVCodecContext.p_masking` value. func (avctx *AVCodecContext) SetPMasking(v float32) { avctx.p_masking = (C.float)(v) } -// Custom: GetPMaskingAddr gets `AVCodecContext.p_masking` address. +// GetPMaskingAddr gets `AVCodecContext.p_masking` address. func (avctx *AVCodecContext) GetPMaskingAddr() *float32 { return (*float32)(&avctx.p_masking) } -// Custom: GetDarkMasking gets `AVCodecContext.dark_masking` value. +// GetDarkMasking gets `AVCodecContext.dark_masking` value. func (avctx *AVCodecContext) GetDarkMasking() float32 { return (float32)(avctx.dark_masking) } -// Custom: SetDarkMasking sets `AVCodecContext.dark_masking` value. +// SetDarkMasking sets `AVCodecContext.dark_masking` value. func (avctx *AVCodecContext) SetDarkMasking(v float32) { avctx.dark_masking = (C.float)(v) } -// Custom: GetDarkMaskingAddr gets `AVCodecContext.dark_masking` address. +// GetDarkMaskingAddr gets `AVCodecContext.dark_masking` address. func (avctx *AVCodecContext) GetDarkMaskingAddr() *float32 { return (*float32)(&avctx.dark_masking) } -// Custom: GetSliceCount gets `AVCodecContext.slice_count` value. +// GetSliceCount gets `AVCodecContext.slice_count` value. func (avctx *AVCodecContext) GetSliceCount() int32 { return (int32)(avctx.slice_count) } -// Custom: SetSliceCount sets `AVCodecContext.slice_count` value. +// SetSliceCount sets `AVCodecContext.slice_count` value. func (avctx *AVCodecContext) SetSliceCount(v int32) { avctx.slice_count = (C.int)(v) } -// Custom: GetSliceCountAddr gets `AVCodecContext.slice_count` address. +// GetSliceCountAddr gets `AVCodecContext.slice_count` address. func (avctx *AVCodecContext) GetSliceCountAddr() *int32 { return (*int32)(&avctx.slice_count) } -// Custom: GetPredictionMethod gets `AVCodecContext.prediction_method` value. +// Deprecated: Use encoder private options instead. +// +// GetPredictionMethod gets `AVCodecContext.prediction_method` value. func (avctx *AVCodecContext) GetPredictionMethod() int32 { return (int32)(avctx.prediction_method) } -// Custom: SetPredictionMethod sets `AVCodecContext.prediction_method` value. +// Deprecated: Use encoder private options instead. +// +// SetPredictionMethod sets `AVCodecContext.prediction_method` value. func (avctx *AVCodecContext) SetPredictionMethod(v int32) { avctx.prediction_method = (C.int)(v) } -// Custom: GetPredictionMethodAddr gets `AVCodecContext.prediction_method` address. +// Deprecated: Use encoder private options instead. +// +// GetPredictionMethodAddr gets `AVCodecContext.prediction_method` address. func (avctx *AVCodecContext) GetPredictionMethodAddr() *int32 { return (*int32)(&avctx.prediction_method) } @@ -926,92 +986,92 @@ const ( FF_PRED_MEDIAN = int32(C.FF_PRED_MEDIAN) ) -// Custom: GetSliceOffset gets `AVCodecContext.slice_offset` value. +// GetSliceOffset gets `AVCodecContext.slice_offset` value. func (avctx *AVCodecContext) GetSliceOffset() *int32 { return (*int32)(avctx.slice_offset) } -// Custom: SetSliceOffset sets `AVCodecContext.slice_offset` value. +// SetSliceOffset sets `AVCodecContext.slice_offset` value. func (avctx *AVCodecContext) SetSliceOffset(v *int32) { avctx.slice_offset = (*C.int)(v) } -// Custom: GetSliceOffsetAddr gets `AVCodecContext.slice_offset` address. +// GetSliceOffsetAddr gets `AVCodecContext.slice_offset` address. func (avctx *AVCodecContext) GetSliceOffsetAddr() **int32 { return (**int32)(unsafe.Pointer(&avctx.slice_offset)) } -// Custom: GetSampleAspectRatio gets `AVCodecContext.sample_aspect_ratio` value. +// GetSampleAspectRatio gets `AVCodecContext.sample_aspect_ratio` value. func (avctx *AVCodecContext) GetSampleAspectRatio() AVRational { return (AVRational)(avctx.sample_aspect_ratio) } -// Custom: SetSampleAspectRatio sets `AVCodecContext.sample_aspect_ratio` value. +// SetSampleAspectRatio sets `AVCodecContext.sample_aspect_ratio` value. func (avctx *AVCodecContext) SetSampleAspectRatio(v AVRational) { avctx.sample_aspect_ratio = (C.struct_AVRational)(v) } -// Custom: GetSampleAspectRatioAddr gets `AVCodecContext.sample_aspect_ratio` address. +// GetSampleAspectRatioAddr gets `AVCodecContext.sample_aspect_ratio` address. func (avctx *AVCodecContext) GetSampleAspectRatioAddr() *AVRational { return (*AVRational)(&avctx.sample_aspect_ratio) } -// Custom: GetMeCmp gets `AVCodecContext.me_cmp` value. +// GetMeCmp gets `AVCodecContext.me_cmp` value. func (avctx *AVCodecContext) GetMeCmp() int32 { return (int32)(avctx.me_cmp) } -// Custom: SetMeCmp sets `AVCodecContext.me_cmp` value. +// SetMeCmp sets `AVCodecContext.me_cmp` value. func (avctx *AVCodecContext) SetMeCmp(v int32) { avctx.me_cmp = (C.int)(v) } -// Custom: GetMeCmpAddr gets `AVCodecContext.me_cmp` address. +// GetMeCmpAddr gets `AVCodecContext.me_cmp` address. func (avctx *AVCodecContext) GetMeCmpAddr() *int32 { return (*int32)(&avctx.me_cmp) } -// Custom: GetMeSubCmp gets `AVCodecContext.me_sub_cmp` value. +// GetMeSubCmp gets `AVCodecContext.me_sub_cmp` value. func (avctx *AVCodecContext) GetMeSubCmp() int32 { return (int32)(avctx.me_sub_cmp) } -// Custom: SetMeSubCmp sets `AVCodecContext.me_sub_cmp` value. +// SetMeSubCmp sets `AVCodecContext.me_sub_cmp` value. func (avctx *AVCodecContext) SetMeSubCmp(v int32) { avctx.me_sub_cmp = (C.int)(v) } -// Custom: GetMeSubCmpAddr gets `AVCodecContext.me_sub_cmp` address. +// GetMeSubCmpAddr gets `AVCodecContext.me_sub_cmp` address. func (avctx *AVCodecContext) GetMeSubCmpAddr() *int32 { return (*int32)(&avctx.me_sub_cmp) } -// Custom: GetMbCmp gets `AVCodecContext.mb_cmp` value. +// GetMbCmp gets `AVCodecContext.mb_cmp` value. func (avctx *AVCodecContext) GetMbCmp() int32 { return (int32)(avctx.mb_cmp) } -// Custom: SetMbCmp sets `AVCodecContext.mb_cmp` value. +// SetMbCmp sets `AVCodecContext.mb_cmp` value. func (avctx *AVCodecContext) SetMbCmp(v int32) { avctx.mb_cmp = (C.int)(v) } -// Custom: GetMbCmpAddr gets `AVCodecContext.mb_cmp` address. +// GetMbCmpAddr gets `AVCodecContext.mb_cmp` address. func (avctx *AVCodecContext) GetMbCmpAddr() *int32 { return (*int32)(&avctx.mb_cmp) } -// Custom: GetIldctCmp gets `AVCodecContext.ildct_cmp` value. +// GetIldctCmp gets `AVCodecContext.ildct_cmp` value. func (avctx *AVCodecContext) GetIldctCmp() int32 { return (int32)(avctx.ildct_cmp) } -// Custom: SetIldctCmp sets `AVCodecContext.ildct_cmp` value. +// SetIldctCmp sets `AVCodecContext.ildct_cmp` value. func (avctx *AVCodecContext) SetIldctCmp(v int32) { avctx.ildct_cmp = (C.int)(v) } -// Custom: GetIldctCmpAddr gets `AVCodecContext.ildct_cmp` address. +// GetIldctCmpAddr gets `AVCodecContext.ildct_cmp` address. func (avctx *AVCodecContext) GetIldctCmpAddr() *int32 { return (*int32)(&avctx.ildct_cmp) } @@ -1036,107 +1096,113 @@ const ( FF_CMP_CHROMA = int32(C.FF_CMP_CHROMA) ) -// Custom: GetDiaSize gets `AVCodecContext.dia_size` value. +// GetDiaSize gets `AVCodecContext.dia_size` value. func (avctx *AVCodecContext) GetDiaSize() int32 { return (int32)(avctx.dia_size) } -// Custom: SetDiaSize sets `AVCodecContext.dia_size` value. +// SetDiaSize sets `AVCodecContext.dia_size` value. func (avctx *AVCodecContext) SetDiaSize(v int32) { avctx.dia_size = (C.int)(v) } -// Custom: GetDiaSizeAddr gets `AVCodecContext.dia_size` address. +// GetDiaSizeAddr gets `AVCodecContext.dia_size` address. func (avctx *AVCodecContext) GetDiaSizeAddr() *int32 { return (*int32)(&avctx.dia_size) } -// Custom: GetLastPredictorCount gets `AVCodecContext.last_predictor_count` value. +// GetLastPredictorCount gets `AVCodecContext.last_predictor_count` value. func (avctx *AVCodecContext) GetLastPredictorCount() int32 { return (int32)(avctx.last_predictor_count) } -// Custom: SetLastPredictorCount sets `AVCodecContext.last_predictor_count` value. +// SetLastPredictorCount sets `AVCodecContext.last_predictor_count` value. func (avctx *AVCodecContext) SetLastPredictorCount(v int32) { avctx.last_predictor_count = (C.int)(v) } -// Custom: GetLastPredictorCountAddr gets `AVCodecContext.last_predictor_count` address. +// GetLastPredictorCountAddr gets `AVCodecContext.last_predictor_count` address. func (avctx *AVCodecContext) GetLastPredictorCountAddr() *int32 { return (*int32)(&avctx.last_predictor_count) } -// Custom: GetPreMe gets `AVCodecContext.pre_me` value. +// Deprecated: Use encoder private options instead. +// +// GetPreMe gets `AVCodecContext.pre_me` value. func (avctx *AVCodecContext) GetPreMe() int32 { return (int32)(avctx.pre_me) } -// Custom: SetPreMe sets `AVCodecContext.pre_me` value. +// Deprecated: Use encoder private options instead. +// +// SetPreMe sets `AVCodecContext.pre_me` value. func (avctx *AVCodecContext) SetPreMe(v int32) { avctx.pre_me = (C.int)(v) } -// Custom: GetPreMeAddr gets `AVCodecContext.pre_me` address. +// Deprecated: Use encoder private options instead. +// +// GetPreMeAddr gets `AVCodecContext.pre_me` address. func (avctx *AVCodecContext) GetPreMeAddr() *int32 { return (*int32)(&avctx.pre_me) } -// Custom: GetMePreCmp gets `AVCodecContext.me_pre_cmp` value. +// GetMePreCmp gets `AVCodecContext.me_pre_cmp` value. func (avctx *AVCodecContext) GetMePreCmp() int32 { return (int32)(avctx.me_pre_cmp) } -// Custom: SetMePreCmp sets `AVCodecContext.me_pre_cmp` value. +// SetMePreCmp sets `AVCodecContext.me_pre_cmp` value. func (avctx *AVCodecContext) SetMePreCmp(v int32) { avctx.me_pre_cmp = (C.int)(v) } -// Custom: GetMePreCmpAddr gets `AVCodecContext.me_pre_cmp` address. +// GetMePreCmpAddr gets `AVCodecContext.me_pre_cmp` address. func (avctx *AVCodecContext) GetMePreCmpAddr() *int32 { return (*int32)(&avctx.me_pre_cmp) } -// Custom: GetPreDiaSize gets `AVCodecContext.pre_dia_size` value. +// GetPreDiaSize gets `AVCodecContext.pre_dia_size` value. func (avctx *AVCodecContext) GetPreDiaSize() int32 { return (int32)(avctx.pre_dia_size) } -// Custom: SetPreDiaSize sets `AVCodecContext.pre_dia_size` value. +// SetPreDiaSize sets `AVCodecContext.pre_dia_size` value. func (avctx *AVCodecContext) SetPreDiaSize(v int32) { avctx.pre_dia_size = (C.int)(v) } -// Custom: GetPreDiaSizeAddr gets `AVCodecContext.pre_dia_size` address. +// GetPreDiaSizeAddr gets `AVCodecContext.pre_dia_size` address. func (avctx *AVCodecContext) GetPreDiaSizeAddr() *int32 { return (*int32)(&avctx.pre_dia_size) } -// Custom: GetMeSubpelQuality gets `AVCodecContext.me_subpel_quality` value. +// GetMeSubpelQuality gets `AVCodecContext.me_subpel_quality` value. func (avctx *AVCodecContext) GetMeSubpelQuality() int32 { return (int32)(avctx.me_subpel_quality) } -// Custom: SetMeSubpelQuality sets `AVCodecContext.me_subpel_quality` value. +// SetMeSubpelQuality sets `AVCodecContext.me_subpel_quality` value. func (avctx *AVCodecContext) SetMeSubpelQuality(v int32) { avctx.me_subpel_quality = (C.int)(v) } -// Custom: GetMeSubpelQualityAddr gets `AVCodecContext.me_subpel_quality` address. +// GetMeSubpelQualityAddr gets `AVCodecContext.me_subpel_quality` address. func (avctx *AVCodecContext) GetMeSubpelQualityAddr() *int32 { return (*int32)(&avctx.me_subpel_quality) } -// Custom: GetSliceFlags gets `AVCodecContext.slice_flags` value. +// GetSliceFlags gets `AVCodecContext.slice_flags` value. func (avctx *AVCodecContext) GetSliceFlags() int32 { return (int32)(avctx.slice_flags) } -// Custom: SetSliceFlags sets `AVCodecContext.slice_flags` value. +// SetSliceFlags sets `AVCodecContext.slice_flags` value. func (avctx *AVCodecContext) SetSliceFlags(v int32) { avctx.slice_flags = (C.int)(v) } -// Custom: GetSliceFlagsAddr gets `AVCodecContext.slice_flags` address. +// GetSliceFlagsAddr gets `AVCodecContext.slice_flags` address. func (avctx *AVCodecContext) GetSliceFlagsAddr() *int32 { return (*int32)(&avctx.slice_flags) } @@ -1147,17 +1213,17 @@ const ( SLICE_FLAG_ALLOW_PLANE = int32(C.SLICE_FLAG_ALLOW_PLANE) ) -// Custom: GetMbDecision gets `AVCodecContext.mb_decision` value. +// GetMbDecision gets `AVCodecContext.mb_decision` value. func (avctx *AVCodecContext) GetMbDecision() int32 { return (int32)(avctx.mb_decision) } -// Custom: SetMbDecision sets `AVCodecContext.mb_decision` value. +// SetMbDecision sets `AVCodecContext.mb_decision` value. func (avctx *AVCodecContext) SetMbDecision(v int32) { avctx.mb_decision = (C.int)(v) } -// Custom: GetMbDecisionAddr gets `AVCodecContext.mb_decision` address. +// GetMbDecisionAddr gets `AVCodecContext.mb_decision` address. func (avctx *AVCodecContext) GetMbDecisionAddr() *int32 { return (*int32)(&avctx.mb_decision) } @@ -1168,512 +1234,563 @@ const ( FF_MB_DECISION_RD = int32(C.FF_MB_DECISION_RD) ) -// Custom: GetIntraMatrix gets `AVCodecContext.intra_matrix` value. +// GetIntraMatrix gets `AVCodecContext.intra_matrix` value. func (avctx *AVCodecContext) GetIntraMatrix() *uint16 { return (*uint16)(avctx.intra_matrix) } -// Custom: SetIntraMatrix sets `AVCodecContext.intra_matrix` value. +// SetIntraMatrix sets `AVCodecContext.intra_matrix` value. func (avctx *AVCodecContext) SetIntraMatrix(v *uint16) { avctx.intra_matrix = (*C.uint16_t)(v) } -// Custom: GetIntraMatrixAddr gets `AVCodecContext.intra_matrix` address. +// GetIntraMatrixAddr gets `AVCodecContext.intra_matrix` address. func (avctx *AVCodecContext) GetIntraMatrixAddr() **uint16 { return (**uint16)(unsafe.Pointer(&avctx.intra_matrix)) } -// Custom: GetInterMatrix gets `AVCodecContext.inter_matrix` value. +// GetInterMatrix gets `AVCodecContext.inter_matrix` value. func (avctx *AVCodecContext) GetInterMatrix() *uint16 { return (*uint16)(avctx.inter_matrix) } -// Custom: SetInterMatrix sets `AVCodecContext.inter_matrix` value. +// SetInterMatrix sets `AVCodecContext.inter_matrix` value. func (avctx *AVCodecContext) SetInterMatrix(v *uint16) { avctx.inter_matrix = (*C.uint16_t)(v) } -// Custom: GetInterMatrixAddr gets `AVCodecContext.inter_matrix` address. +// GetInterMatrixAddr gets `AVCodecContext.inter_matrix` address. func (avctx *AVCodecContext) GetInterMatrixAddr() **uint16 { return (**uint16)(unsafe.Pointer(&avctx.inter_matrix)) } -// Custom: GetScenechangeThreshold gets `AVCodecContext.scenechange_threshold` value. +// Deprecated: Use encoder private options instead. +// +// GetScenechangeThreshold gets `AVCodecContext.scenechange_threshold` value. func (avctx *AVCodecContext) GetScenechangeThreshold() int32 { return (int32)(avctx.scenechange_threshold) } -// Custom: SetScenechangeThreshold sets `AVCodecContext.scenechange_threshold` value. +// Deprecated: Use encoder private options instead. +// +// SetScenechangeThreshold sets `AVCodecContext.scenechange_threshold` value. func (avctx *AVCodecContext) SetScenechangeThreshold(v int32) { avctx.scenechange_threshold = (C.int)(v) } -// Custom: GetScenechangeThresholdAddr gets `AVCodecContext.scenechange_threshold` address. +// Deprecated: Use encoder private options instead. +// +// GetScenechangeThresholdAddr gets `AVCodecContext.scenechange_threshold` address. func (avctx *AVCodecContext) GetScenechangeThresholdAddr() *int32 { return (*int32)(&avctx.scenechange_threshold) } -// Custom: GetNoiseReduction gets `AVCodecContext.noise_reduction` value. +// Deprecated: Use encoder private options instead. +// +// GetNoiseReduction gets `AVCodecContext.noise_reduction` value. func (avctx *AVCodecContext) GetNoiseReduction() int32 { return (int32)(avctx.noise_reduction) } -// Custom: SetNoiseReduction sets `AVCodecContext.noise_reduction` value. +// Deprecated: Use encoder private options instead. +// +// SetNoiseReduction sets `AVCodecContext.noise_reduction` value. func (avctx *AVCodecContext) SetNoiseReduction(v int32) { avctx.noise_reduction = (C.int)(v) } -// Custom: GetNoiseReductionAddr gets `AVCodecContext.noise_reduction` address. +// Deprecated: Use encoder private options instead. +// +// GetNoiseReductionAddr gets `AVCodecContext.noise_reduction` address. func (avctx *AVCodecContext) GetNoiseReductionAddr() *int32 { return (*int32)(&avctx.noise_reduction) } -// Custom: GetIntraDcPrecision gets `AVCodecContext.intra_dc_precision` value. +// GetIntraDcPrecision gets `AVCodecContext.intra_dc_precision` value. func (avctx *AVCodecContext) GetIntraDcPrecision() int32 { return (int32)(avctx.intra_dc_precision) } -// Custom: SetIntraDcPrecision sets `AVCodecContext.intra_dc_precision` value. +// SetIntraDcPrecision sets `AVCodecContext.intra_dc_precision` value. func (avctx *AVCodecContext) SetIntraDcPrecision(v int32) { avctx.intra_dc_precision = (C.int)(v) } -// Custom: GetIntraDcPrecisionAddr gets `AVCodecContext.intra_dc_precision` address. +// GetIntraDcPrecisionAddr gets `AVCodecContext.intra_dc_precision` address. func (avctx *AVCodecContext) GetIntraDcPrecisionAddr() *int32 { return (*int32)(&avctx.intra_dc_precision) } -// Custom: GetSkipTop gets `AVCodecContext.skip_top` value. +// GetSkipTop gets `AVCodecContext.skip_top` value. func (avctx *AVCodecContext) GetSkipTop() int32 { return (int32)(avctx.skip_top) } -// Custom: SetSkipTop sets `AVCodecContext.skip_top` value. +// SetSkipTop sets `AVCodecContext.skip_top` value. func (avctx *AVCodecContext) SetSkipTop(v int32) { avctx.skip_top = (C.int)(v) } -// Custom: GetSkipTopAddr gets `AVCodecContext.skip_top` address. +// GetSkipTopAddr gets `AVCodecContext.skip_top` address. func (avctx *AVCodecContext) GetSkipTopAddr() *int32 { return (*int32)(&avctx.skip_top) } -// Custom: GetSkipBottom gets `AVCodecContext.skip_bottom` value. +// GetSkipBottom gets `AVCodecContext.skip_bottom` value. func (avctx *AVCodecContext) GetSkipBottom() int32 { return (int32)(avctx.skip_bottom) } -// Custom: SetSkipBottom sets `AVCodecContext.skip_bottom` value. +// SetSkipBottom sets `AVCodecContext.skip_bottom` value. func (avctx *AVCodecContext) SetSkipBottom(v int32) { avctx.skip_bottom = (C.int)(v) } -// Custom: GetSkipBottomAddr gets `AVCodecContext.skip_bottom` address. +// GetSkipBottomAddr gets `AVCodecContext.skip_bottom` address. func (avctx *AVCodecContext) GetSkipBottomAddr() *int32 { return (*int32)(&avctx.skip_bottom) } -// Custom: GetMbLmin gets `AVCodecContext.mb_lmin` value. +// GetMbLmin gets `AVCodecContext.mb_lmin` value. func (avctx *AVCodecContext) GetMbLmin() int32 { return (int32)(avctx.mb_lmin) } -// Custom: SetMbLmin sets `AVCodecContext.mb_lmin` value. +// SetMbLmin sets `AVCodecContext.mb_lmin` value. func (avctx *AVCodecContext) SetMbLmin(v int32) { avctx.mb_lmin = (C.int)(v) } -// Custom: GetMbLminAddr gets `AVCodecContext.mb_lmin` address. +// GetMbLminAddr gets `AVCodecContext.mb_lmin` address. func (avctx *AVCodecContext) GetMbLminAddr() *int32 { return (*int32)(&avctx.mb_lmin) } -// Custom: GetMbLmax gets `AVCodecContext.mb_lmax` value. +// GetMbLmax gets `AVCodecContext.mb_lmax` value. func (avctx *AVCodecContext) GetMbLmax() int32 { return (int32)(avctx.mb_lmax) } -// Custom: SetMbLmax sets `AVCodecContext.mb_lmax` value. +// SetMbLmax sets `AVCodecContext.mb_lmax` value. func (avctx *AVCodecContext) SetMbLmax(v int32) { avctx.mb_lmax = (C.int)(v) } -// Custom: GetMbLmaxAddr gets `AVCodecContext.mb_lmax` address. +// GetMbLmaxAddr gets `AVCodecContext.mb_lmax` address. func (avctx *AVCodecContext) GetMbLmaxAddr() *int32 { return (*int32)(&avctx.mb_lmax) } -// Custom: GetMePenaltyCompensation gets `AVCodecContext.me_penalty_compensation` value. +// Deprecated: Use encoder private options instead. +// +// GetMePenaltyCompensation gets `AVCodecContext.me_penalty_compensation` value. func (avctx *AVCodecContext) GetMePenaltyCompensation() int32 { return (int32)(avctx.me_penalty_compensation) } -// Custom: SetMePenaltyCompensation sets `AVCodecContext.me_penalty_compensation` value. +// Deprecated: Use encoder private options instead. +// +// SetMePenaltyCompensation sets `AVCodecContext.me_penalty_compensation` value. func (avctx *AVCodecContext) SetMePenaltyCompensation(v int32) { avctx.me_penalty_compensation = (C.int)(v) } -// Custom: GetMePenaltyCompensationAddr gets `AVCodecContext.me_penalty_compensation` address. +// Deprecated: Use encoder private options instead. +// +// GetMePenaltyCompensationAddr gets `AVCodecContext.me_penalty_compensation` address. func (avctx *AVCodecContext) GetMePenaltyCompensationAddr() *int32 { return (*int32)(&avctx.me_penalty_compensation) } -// Custom: GetBidirRefine gets `AVCodecContext.bidir_refine` value. +// GetBidirRefine gets `AVCodecContext.bidir_refine` value. func (avctx *AVCodecContext) GetBidirRefine() int32 { return (int32)(avctx.bidir_refine) } -// Custom: SetBidirRefine sets `AVCodecContext.bidir_refine` value. +// SetBidirRefine sets `AVCodecContext.bidir_refine` value. func (avctx *AVCodecContext) SetBidirRefine(v int32) { avctx.bidir_refine = (C.int)(v) } -// Custom: GetBidirRefineAddr gets `AVCodecContext.bidir_refine` address. +// GetBidirRefineAddr gets `AVCodecContext.bidir_refine` address. func (avctx *AVCodecContext) GetBidirRefineAddr() *int32 { return (*int32)(&avctx.bidir_refine) } -// Custom: GetBrdScale gets `AVCodecContext.brd_scale` value. +// Deprecated: Use encoder private options instead. +// +// GetBrdScale gets `AVCodecContext.brd_scale` value. func (avctx *AVCodecContext) GetBrdScale() int32 { return (int32)(avctx.brd_scale) } -// Custom: SetBrdScale sets `AVCodecContext.brd_scale` value. +// Deprecated: Use encoder private options instead. +// +// SetBrdScale sets `AVCodecContext.brd_scale` value. func (avctx *AVCodecContext) SetBrdScale(v int32) { avctx.brd_scale = (C.int)(v) } -// Custom: GetBrdScaleAddr gets `AVCodecContext.brd_scale` address. +// Deprecated: Use encoder private options instead. +// +// GetBrdScaleAddr gets `AVCodecContext.brd_scale` address. func (avctx *AVCodecContext) GetBrdScaleAddr() *int32 { return (*int32)(&avctx.brd_scale) } -// Custom: GetKeyintMin gets `AVCodecContext.keyint_min` value. +// GetKeyintMin gets `AVCodecContext.keyint_min` value. func (avctx *AVCodecContext) GetKeyintMin() int32 { return (int32)(avctx.keyint_min) } -// Custom: SetKeyintMin sets `AVCodecContext.keyint_min` value. +// SetKeyintMin sets `AVCodecContext.keyint_min` value. func (avctx *AVCodecContext) SetKeyintMin(v int32) { avctx.keyint_min = (C.int)(v) } -// Custom: GetKeyintMinAddr gets `AVCodecContext.keyint_min` address. +// GetKeyintMinAddr gets `AVCodecContext.keyint_min` address. func (avctx *AVCodecContext) GetKeyintMinAddr() *int32 { return (*int32)(&avctx.keyint_min) } -// Custom: GetRefs gets `AVCodecContext.refs` value. +// GetRefs gets `AVCodecContext.refs` value. func (avctx *AVCodecContext) GetRefs() int32 { return (int32)(avctx.refs) } -// Custom: SetRefs sets `AVCodecContext.refs` value. +// SetRefs sets `AVCodecContext.refs` value. func (avctx *AVCodecContext) SetRefs(v int32) { avctx.refs = (C.int)(v) } -// Custom: GetRefsAddr gets `AVCodecContext.refs` address. +// GetRefsAddr gets `AVCodecContext.refs` address. func (avctx *AVCodecContext) GetRefsAddr() *int32 { return (*int32)(&avctx.refs) } -// Custom: GetMv0Threshold gets `AVCodecContext.mv0_threshold` value. +// Deprecated: Use encoder private options instead. +// +// GetChromaoffset gets `AVCodecContext.chromaoffset` value. +func (avctx *AVCodecContext) GetChromaoffset() int32 { + return (int32)(avctx.chromaoffset) +} + +// Deprecated: Use encoder private options instead. +// +// SetChromaoffset sets `AVCodecContext.chromaoffset` value. +func (avctx *AVCodecContext) SetChromaoffset(v int32) { + avctx.chromaoffset = (C.int)(v) +} + +// Deprecated: Use encoder private options instead. +// +// GetChromaoffsetAddr gets `AVCodecContext.chromaoffset` address. +func (avctx *AVCodecContext) GetChromaoffsetAddr() *int32 { + return (*int32)(&avctx.chromaoffset) +} + +// GetMv0Threshold gets `AVCodecContext.mv0_threshold` value. func (avctx *AVCodecContext) GetMv0Threshold() int32 { return (int32)(avctx.mv0_threshold) } -// Custom: SetMv0Threshold sets `AVCodecContext.mv0_threshold` value. +// SetMv0Threshold sets `AVCodecContext.mv0_threshold` value. func (avctx *AVCodecContext) SetMv0Threshold(v int32) { avctx.mv0_threshold = (C.int)(v) } -// Custom: GetMv0ThresholdAddr gets `AVCodecContext.mv0_threshold` address. +// GetMv0ThresholdAddr gets `AVCodecContext.mv0_threshold` address. func (avctx *AVCodecContext) GetMv0ThresholdAddr() *int32 { return (*int32)(&avctx.mv0_threshold) } -// Custom: GetBSensitivity gets `AVCodecContext.b_sensitivity` value. +// Deprecated: Use encoder private options instead. +// +// GetBSensitivity gets `AVCodecContext.b_sensitivity` value. func (avctx *AVCodecContext) GetBSensitivity() int32 { return (int32)(avctx.b_sensitivity) } -// Custom: SetBSensitivity sets `AVCodecContext.b_sensitivity` value. +// Deprecated: Use encoder private options instead. +// +// SetBSensitivity sets `AVCodecContext.b_sensitivity` value. func (avctx *AVCodecContext) SetBSensitivity(v int32) { avctx.b_sensitivity = (C.int)(v) } -// Custom: GetBSensitivityAddr gets `AVCodecContext.b_sensitivity` address. +// Deprecated: Use encoder private options instead. +// +// GetBSensitivityAddr gets `AVCodecContext.b_sensitivity` address. func (avctx *AVCodecContext) GetBSensitivityAddr() *int32 { return (*int32)(&avctx.b_sensitivity) } -// Custom: GetColorPrimaries gets `AVCodecContext.color_primaries` value. +// GetColorPrimaries gets `AVCodecContext.color_primaries` value. func (avctx *AVCodecContext) GetColorPrimaries() AVColorPrimaries { return (AVColorPrimaries)(avctx.color_primaries) } -// Custom: SetColorPrimaries sets `AVCodecContext.color_primaries` value. +// SetColorPrimaries sets `AVCodecContext.color_primaries` value. func (avctx *AVCodecContext) SetColorPrimaries(v AVColorPrimaries) { avctx.color_primaries = (C.enum_AVColorPrimaries)(v) } -// Custom: GetColorPrimariesAddr gets `AVCodecContext.color_primaries` address. +// GetColorPrimariesAddr gets `AVCodecContext.color_primaries` address. func (avctx *AVCodecContext) GetColorPrimariesAddr() *AVColorPrimaries { return (*AVColorPrimaries)(unsafe.Pointer(&avctx.color_primaries)) } -// Custom: GetColorTrc gets `AVCodecContext.color_trc` value. +// GetColorTrc gets `AVCodecContext.color_trc` value. func (avctx *AVCodecContext) GetColorTrc() AVColorTransferCharacteristic { return (AVColorTransferCharacteristic)(avctx.color_trc) } -// Custom: SetColorTrc sets `AVCodecContext.color_trc` value. +// SetColorTrc sets `AVCodecContext.color_trc` value. func (avctx *AVCodecContext) SetColorTrc(v AVColorTransferCharacteristic) { avctx.color_trc = (C.enum_AVColorTransferCharacteristic)(v) } -// Custom: GetColorTrcAddr gets `AVCodecContext.color_trc` address. +// GetColorTrcAddr gets `AVCodecContext.color_trc` address. func (avctx *AVCodecContext) GetColorTrcAddr() *AVColorTransferCharacteristic { return (*AVColorTransferCharacteristic)(unsafe.Pointer(&avctx.color_trc)) } -// Custom: GetColorspace gets `AVCodecContext.colorspace` value. +// GetColorspace gets `AVCodecContext.colorspace` value. func (avctx *AVCodecContext) GetColorspace() AVColorSpace { return (AVColorSpace)(avctx.colorspace) } -// Custom: SetColorspace sets `AVCodecContext.colorspace` value. +// SetColorspace sets `AVCodecContext.colorspace` value. func (avctx *AVCodecContext) SetColorspace(v AVColorSpace) { avctx.colorspace = (C.enum_AVColorSpace)(v) } -// Custom: GetColorspaceAddr gets `AVCodecContext.colorspace` address. +// GetColorspaceAddr gets `AVCodecContext.colorspace` address. func (avctx *AVCodecContext) GetColorspaceAddr() *AVColorSpace { return (*AVColorSpace)(unsafe.Pointer(&avctx.colorspace)) } -// Custom: GetColorRange gets `AVCodecContext.colorrange` value. +// GetColorRange gets `AVCodecContext.colorrange` value. func (avctx *AVCodecContext) GetColorRange() AVColorRange { return (AVColorRange)(avctx.color_range) } -// Custom: SetColorRange sets `AVCodecContext.colorrange` value. +// SetColorRange sets `AVCodecContext.colorrange` value. func (avctx *AVCodecContext) SetColorRange(v AVColorRange) { avctx.color_range = (C.enum_AVColorRange)(v) } -// Custom: GetColorRangeAddr gets `AVCodecContext.colorrange` address. +// GetColorRangeAddr gets `AVCodecContext.colorrange` address. func (avctx *AVCodecContext) GetColorRangeAddr() *AVColorRange { return (*AVColorRange)(unsafe.Pointer(&avctx.color_range)) } -// Custom: GetChromaSampleLocation gets `AVCodecContext.chroma_sample_location` value. +// GetChromaSampleLocation gets `AVCodecContext.chroma_sample_location` value. func (avctx *AVCodecContext) GetChromaSampleLocation() AVChromaLocation { return (AVChromaLocation)(avctx.chroma_sample_location) } -// Custom: SetChromaSampleLocation sets `AVCodecContext.chroma_sample_location` value. +// SetChromaSampleLocation sets `AVCodecContext.chroma_sample_location` value. func (avctx *AVCodecContext) SetChromaSampleLocation(v AVChromaLocation) { avctx.chroma_sample_location = (C.enum_AVChromaLocation)(v) } -// Custom: GetChromaSampleLocationAddr gets `AVCodecContext.chroma_sample_location` address. +// GetChromaSampleLocationAddr gets `AVCodecContext.chroma_sample_location` address. func (avctx *AVCodecContext) GetChromaSampleLocationAddr() *AVChromaLocation { return (*AVChromaLocation)(unsafe.Pointer(&avctx.chroma_sample_location)) } -// Custom: GetSlices gets `AVCodecContext.slices` value. +// GetSlices gets `AVCodecContext.slices` value. func (avctx *AVCodecContext) GetSlices() int32 { return (int32)(avctx.slices) } -// Custom: SetSlices sets `AVCodecContext.slices` value. +// SetSlices sets `AVCodecContext.slices` value. func (avctx *AVCodecContext) SetSlices(v int32) { avctx.slices = (C.int)(v) } -// Custom: GetSlicesAddr gets `AVCodecContext.slices` address. +// GetSlicesAddr gets `AVCodecContext.slices` address. func (avctx *AVCodecContext) GetSlicesAddr() *int32 { return (*int32)(&avctx.slices) } -// Custom: GetFieldOrder gets `AVCodecContext.field_order` value. +// GetFieldOrder gets `AVCodecContext.field_order` value. func (avctx *AVCodecContext) GetFieldOrder() AVFieldOrder { return (AVFieldOrder)(avctx.field_order) } -// Custom: SetFieldOrder sets `AVCodecContext.field_order` value. +// SetFieldOrder sets `AVCodecContext.field_order` value. func (avctx *AVCodecContext) SetFieldOrder(v AVFieldOrder) { avctx.field_order = (C.enum_AVFieldOrder)(v) } -// Custom: GetFieldOrderAddr gets `AVCodecContext.field_order` address. +// GetFieldOrderAddr gets `AVCodecContext.field_order` address. func (avctx *AVCodecContext) GetFieldOrderAddr() *AVFieldOrder { return (*AVFieldOrder)(unsafe.Pointer(&avctx.field_order)) } -// Custom: GetSampleRate gets `AVCodecContext.sample_rate` value. +// GetSampleRate gets `AVCodecContext.sample_rate` value. func (avctx *AVCodecContext) GetSampleRate() int32 { return (int32)(avctx.sample_rate) } -// Custom: SetSampleRate sets `AVCodecContext.sample_rate` value. +// SetSampleRate sets `AVCodecContext.sample_rate` value. func (avctx *AVCodecContext) SetSampleRate(v int32) { avctx.sample_rate = (C.int)(v) } -// Custom: GetSampleRateAddr gets `AVCodecContext.sample_rate` address. +// GetSampleRateAddr gets `AVCodecContext.sample_rate` address. func (avctx *AVCodecContext) GetSampleRateAddr() *int32 { return (*int32)(&avctx.sample_rate) } -// Custom: GetChannels gets `AVCodecContext.channels` value. +// GetChannels gets `AVCodecContext.channels` value. func (avctx *AVCodecContext) GetChannels() int32 { return (int32)(avctx.channels) } -// Custom: SetChannels sets `AVCodecContext.channels` value. +// SetChannels sets `AVCodecContext.channels` value. func (avctx *AVCodecContext) SetChannels(v int32) { avctx.channels = (C.int)(v) } -// Custom: GetChannelsAddr gets `AVCodecContext.channels` address. +// GetChannelsAddr gets `AVCodecContext.channels` address. func (avctx *AVCodecContext) GetChannelsAddr() *int32 { return (*int32)(&avctx.channels) } -// Custom: GetSampleFmt gets `AVCodecContext.sample_fmt` value. +// GetSampleFmt gets `AVCodecContext.sample_fmt` value. func (avctx *AVCodecContext) GetSampleFmt() AVSampleFormat { return (AVSampleFormat)(avctx.sample_fmt) } -// Custom: SetSampleFmt sets `AVCodecContext.sample_fmt` value. +// SetSampleFmt sets `AVCodecContext.sample_fmt` value. func (avctx *AVCodecContext) SetSampleFmt(v AVSampleFormat) { avctx.sample_fmt = (C.enum_AVSampleFormat)(v) } -// Custom: GetSampleFmtAddr gets `AVCodecContext.sample_fmt` address. +// GetSampleFmtAddr gets `AVCodecContext.sample_fmt` address. func (avctx *AVCodecContext) GetSampleFmtAddr() *AVSampleFormat { return (*AVSampleFormat)(&avctx.sample_fmt) } -// Custom: GetFrameSize gets `AVCodecContext.frame_size` value. +// GetFrameSize gets `AVCodecContext.frame_size` value. func (avctx *AVCodecContext) GetFrameSize() int32 { return (int32)(avctx.frame_size) } -// Custom: SetFrameSize sets `AVCodecContext.frame_size` value. +// SetFrameSize sets `AVCodecContext.frame_size` value. func (avctx *AVCodecContext) SetFrameSize(v int32) { avctx.frame_size = (C.int)(v) } -// Custom: GetFrameSizeAddr gets `AVCodecContext.frame_size` address. +// GetFrameSizeAddr gets `AVCodecContext.frame_size` address. func (avctx *AVCodecContext) GetFrameSizeAddr() *int32 { return (*int32)(&avctx.frame_size) } -// Custom: GetFrameNumber gets `AVCodecContext.frame_number` value. +// GetFrameNumber gets `AVCodecContext.frame_number` value. func (avctx *AVCodecContext) GetFrameNumber() int32 { return (int32)(avctx.frame_number) } -// Custom: SetFrameNumber sets `AVCodecContext.frame_number` value. +// SetFrameNumber sets `AVCodecContext.frame_number` value. func (avctx *AVCodecContext) SetFrameNumber(v int32) { avctx.frame_number = (C.int)(v) } -// Custom: GetFrameNumberAddr gets `AVCodecContext.frame_number` address. +// GetFrameNumberAddr gets `AVCodecContext.frame_number` address. func (avctx *AVCodecContext) GetFrameNumberAddr() *int32 { return (*int32)(&avctx.frame_number) } -// Custom: GetBlockAlign gets `AVCodecContext.block_align` value. +// GetBlockAlign gets `AVCodecContext.block_align` value. func (avctx *AVCodecContext) GetBlockAlign() int32 { return (int32)(avctx.block_align) } -// Custom: SetBlockAlign sets `AVCodecContext.block_align` value. +// SetBlockAlign sets `AVCodecContext.block_align` value. func (avctx *AVCodecContext) SetBlockAlign(v int32) { avctx.block_align = (C.int)(v) } -// Custom: GetBlockAlignAddr gets `AVCodecContext.block_align` address. +// GetBlockAlignAddr gets `AVCodecContext.block_align` address. func (avctx *AVCodecContext) GetBlockAlignAddr() *int32 { return (*int32)(&avctx.block_align) } -// Custom: GetCutoff gets `AVCodecContext.cutoff` value. +// GetCutoff gets `AVCodecContext.cutoff` value. func (avctx *AVCodecContext) GetCutoff() int32 { return (int32)(avctx.cutoff) } -// Custom: SetCutoff sets `AVCodecContext.cutoff` value. +// SetCutoff sets `AVCodecContext.cutoff` value. func (avctx *AVCodecContext) SetCutoff(v int32) { avctx.cutoff = (C.int)(v) } -// Custom: GetCutoffAddr gets `AVCodecContext.cutoff` address. +// GetCutoffAddr gets `AVCodecContext.cutoff` address. func (avctx *AVCodecContext) GetCutoffAddr() *int32 { return (*int32)(&avctx.cutoff) } -// Custom: GetChannelLayout gets `AVCodecContext.channel_layout` value. +// GetChannelLayout gets `AVCodecContext.channel_layout` value. func (avctx *AVCodecContext) GetChannelLayout() uint64 { return (uint64)(avctx.channel_layout) } -// Custom: SetChannelLayout sets `AVCodecContext.channel_layout` value. +// SetChannelLayout sets `AVCodecContext.channel_layout` value. func (avctx *AVCodecContext) SetChannelLayout(v uint64) { avctx.channel_layout = (C.uint64_t)(v) } -// Custom: GetChannelLayoutAddr gets `AVCodecContext.channel_layout` address. +// GetChannelLayoutAddr gets `AVCodecContext.channel_layout` address. func (avctx *AVCodecContext) GetChannelLayoutAddr() *uint64 { return (*uint64)(&avctx.channel_layout) } -// Custom: GetRequestChannelLayout gets `AVCodecContext.request_channel_layout` value. +// GetRequestChannelLayout gets `AVCodecContext.request_channel_layout` value. func (avctx *AVCodecContext) GetRequestChannelLayout() uint64 { return (uint64)(avctx.request_channel_layout) } -// Custom: SetRequestChannelLayout sets `AVCodecContext.request_channel_layout` value. +// SetRequestChannelLayout sets `AVCodecContext.request_channel_layout` value. func (avctx *AVCodecContext) SetRequestChannelLayout(v uint64) { avctx.request_channel_layout = (C.uint64_t)(v) } -// Custom: GetRequestChannelLayoutAddr gets `AVCodecContext.request_channel_layout` address. +// GetRequestChannelLayoutAddr gets `AVCodecContext.request_channel_layout` address. func (avctx *AVCodecContext) GetRequestChannelLayoutAddr() *uint64 { return (*uint64)(&avctx.request_channel_layout) } -// Custom: GetAudioServiceType gets `AVCodecContext.audio_servicetype` value. +// GetAudioServiceType gets `AVCodecContext.audio_servicetype` value. func (avctx *AVCodecContext) GetAudioServiceType() AVAudioServiceType { return (AVAudioServiceType)(avctx.audio_service_type) } -// Custom: SetAudioServiceType sets `AVCodecContext.audio_servicetype` value. +// SetAudioServiceType sets `AVCodecContext.audio_servicetype` value. func (avctx *AVCodecContext) SetAudioServiceType(v AVAudioServiceType) { avctx.audio_service_type = (C.enum_AVAudioServiceType)(v) } -// Custom: GetAudioServiceTypeAddr gets `AVCodecContext.audio_servicetype` address. +// GetAudioServiceTypeAddr gets `AVCodecContext.audio_servicetype` address. func (avctx *AVCodecContext) GetAudioServiceTypeAddr() *AVAudioServiceType { return (*AVAudioServiceType)(unsafe.Pointer(&avctx.audio_service_type)) } -// Custom: GetRequestSampleFmt gets `AVCodecContext.request_sample_fmt` value. +// GetRequestSampleFmt gets `AVCodecContext.request_sample_fmt` value. func (avctx *AVCodecContext) GetRequestSampleFmt() AVSampleFormat { return (AVSampleFormat)(avctx.request_sample_fmt) } -// Custom: SetRequestSampleFmt sets `AVCodecContext.request_sample_fmt` value. +// SetRequestSampleFmt sets `AVCodecContext.request_sample_fmt` value. func (avctx *AVCodecContext) SetRequestSampleFmt(v AVSampleFormat) { avctx.request_sample_fmt = (C.enum_AVSampleFormat)(v) } -// Custom: GetRequestSampleFmtAddr gets `AVCodecContext.request_sample_fmt` address. +// GetRequestSampleFmtAddr gets `AVCodecContext.request_sample_fmt` address. func (avctx *AVCodecContext) GetRequestSampleFmtAddr() *AVSampleFormat { return (*AVSampleFormat)(&avctx.request_sample_fmt) } @@ -1681,217 +1798,233 @@ func (avctx *AVCodecContext) GetRequestSampleFmtAddr() *AVSampleFormat { // typedef int (*avcodec_context_get_buffer2_func)(struct AVCodecContext *s, AVFrame *frame, int flags); type AVCodecContextGetBuffer2Func = C.avcodec_context_get_buffer2_func -// Custom: SetGetBuffer2 sets `AVCodecContext.get_buffer2` value. +// GetGetBuffer2 gets `AVCodecContext.get_buffer2` value. +func (avctx *AVCodecContext) GetGetBuffer2() AVCodecContextGetBuffer2Func { + return (AVCodecContextGetBuffer2Func)(avctx.get_buffer2) +} + +// SetGetBuffer2 sets `AVCodecContext.get_buffer2` value. func (avctx *AVCodecContext) SetGetBuffer2(v AVCodecContextGetBuffer2Func) { avctx.get_buffer2 = (C.avcodec_context_get_buffer2_func)(v) } -// Custom: GetRefcountedFrames gets `AVCodecContext.refcounted_frames` value. +// GetGetBuffer2Addr gets `AVCodecContext.get_buffer2` address. +func (avctx *AVCodecContext) GetGetBuffer2Addr() *AVCodecContextGetBuffer2Func { + return (*AVCodecContextGetBuffer2Func)(&avctx.get_buffer2) +} + +// Deprecated: Use encoder private options instead. +// +// GetRefcountedFrames gets `AVCodecContext.refcounted_frames` value. func (avctx *AVCodecContext) GetRefcountedFrames() int32 { return (int32)(avctx.refcounted_frames) } -// Custom: SetRefcountedFrames sets `AVCodecContext.refcounted_frames` value. +// Deprecated: Use encoder private options instead. +// +// SetRefcountedFrames sets `AVCodecContext.refcounted_frames` value. func (avctx *AVCodecContext) SetRefcountedFrames(v int32) { avctx.refcounted_frames = (C.int)(v) } -// Custom: GetRefcountedFramesAddr gets `AVCodecContext.refcounted_frames` address. +// Deprecated: Use encoder private options instead. +// +// GetRefcountedFramesAddr gets `AVCodecContext.refcounted_frames` address. func (avctx *AVCodecContext) GetRefcountedFramesAddr() *int32 { return (*int32)(&avctx.refcounted_frames) } -// Custom: GetQcompress gets `AVCodecContext.qcompress` value. +// GetQcompress gets `AVCodecContext.qcompress` value. func (avctx *AVCodecContext) GetQcompress() float32 { return (float32)(avctx.qcompress) } -// Custom: SetQcompress sets `AVCodecContext.qcompress` value. +// SetQcompress sets `AVCodecContext.qcompress` value. func (avctx *AVCodecContext) SetQcompress(v float32) { avctx.qcompress = (C.float)(v) } -// Custom: GetQcompressAddr gets `AVCodecContext.qcompress` address. +// GetQcompressAddr gets `AVCodecContext.qcompress` address. func (avctx *AVCodecContext) GetQcompressAddr() *float32 { return (*float32)(&avctx.qcompress) } -// Custom: GetQblur gets `AVCodecContext.qblur` value. +// GetQblur gets `AVCodecContext.qblur` value. func (avctx *AVCodecContext) GetQblur() float32 { return (float32)(avctx.qblur) } -// Custom: SetQblur sets `AVCodecContext.qblur` value. +// SetQblur sets `AVCodecContext.qblur` value. func (avctx *AVCodecContext) SetQblur(v float32) { avctx.qblur = (C.float)(v) } -// Custom: GetQblurAddr gets `AVCodecContext.qblur` address. +// GetQblurAddr gets `AVCodecContext.qblur` address. func (avctx *AVCodecContext) GetQblurAddr() *float32 { return (*float32)(&avctx.qblur) } -// Custom: GetQmin gets `AVCodecContext.qmin` value. +// GetQmin gets `AVCodecContext.qmin` value. func (avctx *AVCodecContext) GetQmin() int32 { return (int32)(avctx.qmin) } -// Custom: SetQmin sets `AVCodecContext.qmin` value. +// SetQmin sets `AVCodecContext.qmin` value. func (avctx *AVCodecContext) SetQmin(v int32) { avctx.qmin = (C.int)(v) } -// Custom: GetQminAddr gets `AVCodecContext.qmin` address. +// GetQminAddr gets `AVCodecContext.qmin` address. func (avctx *AVCodecContext) GetQminAddr() *int32 { return (*int32)(&avctx.qmin) } -// Custom: GetQmax gets `AVCodecContext.qmax` value. +// GetQmax gets `AVCodecContext.qmax` value. func (avctx *AVCodecContext) GetQmax() int32 { return (int32)(avctx.qmax) } -// Custom: SetQmax sets `AVCodecContext.qmax` value. +// SetQmax sets `AVCodecContext.qmax` value. func (avctx *AVCodecContext) SetQmax(v int32) { avctx.qmax = (C.int)(v) } -// Custom: GetQmaxAddr gets `AVCodecContext.qmax` address. +// GetQmaxAddr gets `AVCodecContext.qmax` address. func (avctx *AVCodecContext) GetQmaxAddr() *int32 { return (*int32)(&avctx.qmax) } -// Custom: GetMaxQdiff gets `AVCodecContext.max_qdiff` value. +// GetMaxQdiff gets `AVCodecContext.max_qdiff` value. func (avctx *AVCodecContext) GetMaxQdiff() int32 { return (int32)(avctx.max_qdiff) } -// Custom: SetMaxQdiff sets `AVCodecContext.max_qdiff` value. +// SetMaxQdiff sets `AVCodecContext.max_qdiff` value. func (avctx *AVCodecContext) SetMaxQdiff(v int32) { avctx.max_qdiff = (C.int)(v) } -// Custom: GetMaxQdiffAddr gets `AVCodecContext.max_qdiff` address. +// GetMaxQdiffAddr gets `AVCodecContext.max_qdiff` address. func (avctx *AVCodecContext) GetMaxQdiffAddr() *int32 { return (*int32)(&avctx.max_qdiff) } -// Custom: GetRcBufferSize gets `AVCodecContext.rc_buffer_size` value. +// GetRcBufferSize gets `AVCodecContext.rc_buffer_size` value. func (avctx *AVCodecContext) GetRcBufferSize() int32 { return (int32)(avctx.rc_buffer_size) } -// Custom: SetRcBufferSize sets `AVCodecContext.rc_buffer_size` value. +// SetRcBufferSize sets `AVCodecContext.rc_buffer_size` value. func (avctx *AVCodecContext) SetRcBufferSize(v int32) { avctx.rc_buffer_size = (C.int)(v) } -// Custom: GetRcBufferSizeAddr gets `AVCodecContext.rc_buffer_size` address. +// GetRcBufferSizeAddr gets `AVCodecContext.rc_buffer_size` address. func (avctx *AVCodecContext) GetRcBufferSizeAddr() *int32 { return (*int32)(&avctx.rc_buffer_size) } -// Custom: GetRcOverrideCount gets `AVCodecContext.rc_override_count` value. +// GetRcOverrideCount gets `AVCodecContext.rc_override_count` value. func (avctx *AVCodecContext) GetRcOverrideCount() int32 { return (int32)(avctx.rc_override_count) } -// Custom: SetRcOverrideCount sets `AVCodecContext.rc_override_count` value. +// SetRcOverrideCount sets `AVCodecContext.rc_override_count` value. func (avctx *AVCodecContext) SetRcOverrideCount(v int32) { avctx.rc_override_count = (C.int)(v) } -// Custom: GetRcOverrideCountAddr gets `AVCodecContext.rc_override_count` address. +// GetRcOverrideCountAddr gets `AVCodecContext.rc_override_count` address. func (avctx *AVCodecContext) GetRcOverrideCountAddr() *int32 { return (*int32)(&avctx.rc_override_count) } -// Custom: GetRcOverride gets `AVCodecContext.rc_override` value. +// GetRcOverride gets `AVCodecContext.rc_override` value. func (avctx *AVCodecContext) GetRcOverride() *RcOverride { return (*RcOverride)(avctx.rc_override) } -// Custom: SetRcOverride sets `AVCodecContext.rc_override` value. +// SetRcOverride sets `AVCodecContext.rc_override` value. func (avctx *AVCodecContext) SetRcOverride(v *RcOverride) { avctx.rc_override = (*C.RcOverride)(v) } -// Custom: GetRcOverrideAddr gets `AVCodecContext.rc_override` address. +// GetRcOverrideAddr gets `AVCodecContext.rc_override` address. func (avctx *AVCodecContext) GetRcOverrideAddr() **RcOverride { return (**RcOverride)(unsafe.Pointer(&avctx.rc_override)) } -// Custom: GetRcMaxRate gets `AVCodecContext.rc_max_rate` value. +// GetRcMaxRate gets `AVCodecContext.rc_max_rate` value. func (avctx *AVCodecContext) GetRcMaxRate() int64 { return (int64)(avctx.rc_max_rate) } -// Custom: SetRcMaxRate sets `AVCodecContext.rc_max_rate` value. +// SetRcMaxRate sets `AVCodecContext.rc_max_rate` value. func (avctx *AVCodecContext) SetRcMaxRate(v int64) { avctx.rc_max_rate = (C.int64_t)(v) } -// Custom: GetRcMaxRateAddr gets `AVCodecContext.rc_max_rate` address. +// GetRcMaxRateAddr gets `AVCodecContext.rc_max_rate` address. func (avctx *AVCodecContext) GetRcMaxRateAddr() *int64 { return (*int64)(&avctx.rc_max_rate) } -// Custom: GetRcMinRate gets `AVCodecContext.rc_min_rate` value. +// GetRcMinRate gets `AVCodecContext.rc_min_rate` value. func (avctx *AVCodecContext) GetRcMinRate() int64 { return (int64)(avctx.rc_min_rate) } -// Custom: SetRcMinRate sets `AVCodecContext.rc_min_rate` value. +// SetRcMinRate sets `AVCodecContext.rc_min_rate` value. func (avctx *AVCodecContext) SetRcMinRate(v int64) { avctx.rc_min_rate = (C.int64_t)(v) } -// Custom: GetRcMinRateAddr gets `AVCodecContext.rc_min_rate` address. +// GetRcMinRateAddr gets `AVCodecContext.rc_min_rate` address. func (avctx *AVCodecContext) GetRcMinRateAddr() *int64 { return (*int64)(&avctx.rc_min_rate) } -// Custom: GetRcMaxAvailableVbvUse gets `AVCodecContext.rc_max_available_vbv_use` value. +// GetRcMaxAvailableVbvUse gets `AVCodecContext.rc_max_available_vbv_use` value. func (avctx *AVCodecContext) GetRcMaxAvailableVbvUse() float32 { return (float32)(avctx.rc_max_available_vbv_use) } -// Custom: SetRcMaxAvailableVbvUse sets `AVCodecContext.rc_max_available_vbv_use` value. +// SetRcMaxAvailableVbvUse sets `AVCodecContext.rc_max_available_vbv_use` value. func (avctx *AVCodecContext) SetRcMaxAvailableVbvUse(v float32) { avctx.rc_max_available_vbv_use = (C.float)(v) } -// Custom: GetRcMaxAvailableVbvUseAddr gets `AVCodecContext.rc_max_available_vbv_use` address. +// GetRcMaxAvailableVbvUseAddr gets `AVCodecContext.rc_max_available_vbv_use` address. func (avctx *AVCodecContext) GetRcMaxAvailableVbvUseAddr() *float32 { return (*float32)(&avctx.rc_max_available_vbv_use) } -// Custom: GetRcMinVbvOverflowUse gets `AVCodecContext.rc_min_vbv_overflow_use` value. +// GetRcMinVbvOverflowUse gets `AVCodecContext.rc_min_vbv_overflow_use` value. func (avctx *AVCodecContext) GetRcMinVbvOverflowUse() float32 { return (float32)(avctx.rc_min_vbv_overflow_use) } -// Custom: SetRcMinVbvOverflowUse sets `AVCodecContext.rc_min_vbv_overflow_use` value. +// SetRcMinVbvOverflowUse sets `AVCodecContext.rc_min_vbv_overflow_use` value. func (avctx *AVCodecContext) SetRcMinVbvOverflowUse(v float32) { avctx.rc_min_vbv_overflow_use = (C.float)(v) } -// Custom: GetRcMinVbvOverflowUseAddr gets `AVCodecContext.rc_min_vbv_overflow_use` address. +// GetRcMinVbvOverflowUseAddr gets `AVCodecContext.rc_min_vbv_overflow_use` address. func (avctx *AVCodecContext) GetRcMinVbvOverflowUseAddr() *float32 { return (*float32)(&avctx.rc_min_vbv_overflow_use) } -// Custom: GetRcInitialBufferOccupancy gets `AVCodecContext.rc_initial_buffer_occupancy` value. +// GetRcInitialBufferOccupancy gets `AVCodecContext.rc_initial_buffer_occupancy` value. func (avctx *AVCodecContext) GetRcInitialBufferOccupancy() int32 { return (int32)(avctx.rc_initial_buffer_occupancy) } -// Custom: SetRcInitialBufferOccupancy sets `AVCodecContext.rc_initial_buffer_occupancy` value. +// SetRcInitialBufferOccupancy sets `AVCodecContext.rc_initial_buffer_occupancy` value. func (avctx *AVCodecContext) SetRcInitialBufferOccupancy(v int32) { avctx.rc_initial_buffer_occupancy = (C.int)(v) } -// Custom: GetRcInitialBufferOccupancyAddr gets `AVCodecContext.rc_initial_buffer_occupancy` address. +// GetRcInitialBufferOccupancyAddr gets `AVCodecContext.rc_initial_buffer_occupancy` address. func (avctx *AVCodecContext) GetRcInitialBufferOccupancyAddr() *int32 { return (*int32)(&avctx.rc_initial_buffer_occupancy) } @@ -1903,327 +2036,467 @@ const ( FF_CODER_TYPE_RLE = int32(C.FF_CODER_TYPE_RLE) ) -// Custom: GetCoderType gets `AVCodecContext.codertype` value. +// Deprecated: Use encoder private options instead. +// +// GetCoderType gets `AVCodecContext.codertype` value. func (avctx *AVCodecContext) GetCoderType() int32 { return (int32)(avctx.coder_type) } -// Custom: SetCoderType sets `AVCodecContext.codertype` value. +// Deprecated: Use encoder private options instead. +// +// SetCoderType sets `AVCodecContext.codertype` value. func (avctx *AVCodecContext) SetCoderType(v int32) { avctx.coder_type = (C.int)(v) } -// Custom: GetCoderTypeAddr gets `AVCodecContext.codertype` address. +// Deprecated: Use encoder private options instead. +// +// GetCoderTypeAddr gets `AVCodecContext.codertype` address. func (avctx *AVCodecContext) GetCoderTypeAddr() *int32 { return (*int32)(&avctx.coder_type) } -// Custom: GetContextModel gets `AVCodecContext.context_model` value. +// Deprecated: Use encoder private options instead. +// +// GetContextModel gets `AVCodecContext.context_model` value. func (avctx *AVCodecContext) GetContextModel() int32 { return (int32)(avctx.context_model) } -// Custom: SetContextModel sets `AVCodecContext.context_model` value. +// Deprecated: Use encoder private options instead. +// +// SetContextModel sets `AVCodecContext.context_model` value. func (avctx *AVCodecContext) SetContextModel(v int32) { avctx.context_model = (C.int)(v) } -// Custom: GetContextModelAddr gets `AVCodecContext.context_model` address. +// Deprecated: Use encoder private options instead. +// +// GetContextModelAddr gets `AVCodecContext.context_model` address. func (avctx *AVCodecContext) GetContextModelAddr() *int32 { return (*int32)(&avctx.context_model) } -// Custom: GetFrameSkipThreshold gets `AVCodecContext.frame_skip_threshold` value. +// Deprecated: Use encoder private options instead. +// +// GetFrameSkipThreshold gets `AVCodecContext.frame_skip_threshold` value. func (avctx *AVCodecContext) GetFrameSkipThreshold() int32 { return (int32)(avctx.frame_skip_threshold) } -// Custom: SetFrameSkipThreshold sets `AVCodecContext.frame_skip_threshold` value. +// Deprecated: Use encoder private options instead. +// +// SetFrameSkipThreshold sets `AVCodecContext.frame_skip_threshold` value. func (avctx *AVCodecContext) SetFrameSkipThreshold(v int32) { avctx.frame_skip_threshold = (C.int)(v) } -// Custom: GetFrameSkipThresholdAddr gets `AVCodecContext.frame_skip_threshold` address. +// Deprecated: Use encoder private options instead. +// +// GetFrameSkipThresholdAddr gets `AVCodecContext.frame_skip_threshold` address. func (avctx *AVCodecContext) GetFrameSkipThresholdAddr() *int32 { return (*int32)(&avctx.frame_skip_threshold) } -// Custom: GetFrameSkipFactor gets `AVCodecContext.frame_skip_factor` value. +// Deprecated: Use encoder private options instead. +// +// GetFrameSkipFactor gets `AVCodecContext.frame_skip_factor` value. func (avctx *AVCodecContext) GetFrameSkipFactor() int32 { return (int32)(avctx.frame_skip_factor) } -// Custom: SetFrameSkipFactor sets `AVCodecContext.frame_skip_factor` value. +// Deprecated: Use encoder private options instead. +// +// SetFrameSkipFactor sets `AVCodecContext.frame_skip_factor` value. func (avctx *AVCodecContext) SetFrameSkipFactor(v int32) { avctx.frame_skip_factor = (C.int)(v) } -// Custom: GetFrameSkipFactorAddr gets `AVCodecContext.frame_skip_factor` address. +// Deprecated: Use encoder private options instead. +// +// GetFrameSkipFactorAddr gets `AVCodecContext.frame_skip_factor` address. func (avctx *AVCodecContext) GetFrameSkipFactorAddr() *int32 { return (*int32)(&avctx.frame_skip_factor) } -// Custom: GetFrameSkipExp gets `AVCodecContext.frame_skip_exp` value. +// Deprecated: Use encoder private options instead. +// +// GetFrameSkipExp gets `AVCodecContext.frame_skip_exp` value. func (avctx *AVCodecContext) GetFrameSkipExp() int32 { return (int32)(avctx.frame_skip_exp) } -// Custom: SetFrameSkipExp sets `AVCodecContext.frame_skip_exp` value. +// Deprecated: Use encoder private options instead. +// +// SetFrameSkipExp sets `AVCodecContext.frame_skip_exp` value. func (avctx *AVCodecContext) SetFrameSkipExp(v int32) { avctx.frame_skip_exp = (C.int)(v) } -// Custom: GetFrameSkipExpAddr gets `AVCodecContext.frame_skip_exp` address. +// Deprecated: Use encoder private options instead. +// +// GetFrameSkipExpAddr gets `AVCodecContext.frame_skip_exp` address. func (avctx *AVCodecContext) GetFrameSkipExpAddr() *int32 { return (*int32)(&avctx.frame_skip_exp) } -// Custom: GetFrameSkipCmp gets `AVCodecContext.frame_skip_cmp` value. +// Deprecated: Use encoder private options instead. +// +// GetFrameSkipCmp gets `AVCodecContext.frame_skip_cmp` value. func (avctx *AVCodecContext) GetFrameSkipCmp() int32 { return (int32)(avctx.frame_skip_cmp) } -// Custom: SetFrameSkipCmp sets `AVCodecContext.frame_skip_cmp` value. +// Deprecated: Use encoder private options instead. +// +// SetFrameSkipCmp sets `AVCodecContext.frame_skip_cmp` value. func (avctx *AVCodecContext) SetFrameSkipCmp(v int32) { avctx.frame_skip_cmp = (C.int)(v) } -// Custom: GetFrameSkipCmpAddr gets `AVCodecContext.frame_skip_cmp` address. +// Deprecated: Use encoder private options instead. +// +// GetFrameSkipCmpAddr gets `AVCodecContext.frame_skip_cmp` address. func (avctx *AVCodecContext) GetFrameSkipCmpAddr() *int32 { return (*int32)(&avctx.frame_skip_cmp) } -// Custom: GetTrellis gets `AVCodecContext.trellis` value. +// GetTrellis gets `AVCodecContext.trellis` value. func (avctx *AVCodecContext) GetTrellis() int32 { return (int32)(avctx.trellis) } -// Custom: SetTrellis sets `AVCodecContext.trellis` value. +// SetTrellis sets `AVCodecContext.trellis` value. func (avctx *AVCodecContext) SetTrellis(v int32) { avctx.trellis = (C.int)(v) } -// Custom: GetTrellisAddr gets `AVCodecContext.trellis` address. +// GetTrellisAddr gets `AVCodecContext.trellis` address. func (avctx *AVCodecContext) GetTrellisAddr() *int32 { return (*int32)(&avctx.trellis) } -// Custom: GetMinPredictionOrder gets `AVCodecContext.min_prediction_order` value. +// Deprecated: Use encoder private options instead. +// +// GetMinPredictionOrder gets `AVCodecContext.min_prediction_order` value. func (avctx *AVCodecContext) GetMinPredictionOrder() int32 { return (int32)(avctx.min_prediction_order) } -// Custom: SetMinPredictionOrder sets `AVCodecContext.min_prediction_order` value. +// Deprecated: Use encoder private options instead. +// +// SetMinPredictionOrder sets `AVCodecContext.min_prediction_order` value. func (avctx *AVCodecContext) SetMinPredictionOrder(v int32) { avctx.min_prediction_order = (C.int)(v) } -// Custom: GetMinPredictionOrderAddr gets `AVCodecContext.min_prediction_order` address. +// Deprecated: Use encoder private options instead. +// +// GetMinPredictionOrderAddr gets `AVCodecContext.min_prediction_order` address. func (avctx *AVCodecContext) GetMinPredictionOrderAddr() *int32 { return (*int32)(&avctx.min_prediction_order) } -// Custom: GetMaxPredictionOrder gets `AVCodecContext.max_prediction_order` value. +// Deprecated: Use encoder private options instead. +// +// GetMaxPredictionOrder gets `AVCodecContext.max_prediction_order` value. func (avctx *AVCodecContext) GetMaxPredictionOrder() int32 { return (int32)(avctx.max_prediction_order) } -// Custom: SetMaxPredictionOrder sets `AVCodecContext.max_prediction_order` value. +// Deprecated: Use encoder private options instead. +// +// SetMaxPredictionOrder sets `AVCodecContext.max_prediction_order` value. func (avctx *AVCodecContext) SetMaxPredictionOrder(v int32) { avctx.max_prediction_order = (C.int)(v) } -// Custom: GetMaxPredictionOrderAddr gets `AVCodecContext.max_prediction_order` address. +// Deprecated: Use encoder private options instead. +// +// GetMaxPredictionOrderAddr gets `AVCodecContext.max_prediction_order` address. func (avctx *AVCodecContext) GetMaxPredictionOrderAddr() *int32 { return (*int32)(&avctx.max_prediction_order) } -// Custom: GetTimecodeFrameStart gets `AVCodecContext.timecode_frame_start` value. +// Deprecated: Use encoder private options instead. +// +// GetTimecodeFrameStart gets `AVCodecContext.timecode_frame_start` value. func (avctx *AVCodecContext) GetTimecodeFrameStart() int64 { return (int64)(avctx.timecode_frame_start) } -// Custom: SetTimecodeFrameStart sets `AVCodecContext.timecode_frame_start` value. +// Deprecated: Use encoder private options instead. +// +// SetTimecodeFrameStart sets `AVCodecContext.timecode_frame_start` value. func (avctx *AVCodecContext) SetTimecodeFrameStart(v int64) { avctx.timecode_frame_start = (C.int64_t)(v) } -// Custom: GetTimecodeFrameStartAddr gets `AVCodecContext.timecode_frame_start` address. +// Deprecated: Use encoder private options instead. +// +// GetTimecodeFrameStartAddr gets `AVCodecContext.timecode_frame_start` address. func (avctx *AVCodecContext) GetTimecodeFrameStartAddr() *int64 { return (*int64)(&avctx.timecode_frame_start) } -// Custom: GetRtpPayloadSize gets `AVCodecContext.rtp_payload_size` value. +// Deprecated: Unused. +// +// typedef void (*avcodec_context_rtp_callback_func)(struct AVCodecContext *avctx, void *data, int size, int mb_nb); +type AvCodecContextRtpCallbackFunc = C.avcodec_context_rtp_callback_func + +// Deprecated: Unused. +// +// GetRtpCallback gets `AVCodecContext.rtp_callback` value. +func (avctx *AVCodecContext) GetRtpCallback() AvCodecContextRtpCallbackFunc { + return (AvCodecContextRtpCallbackFunc)(avctx.rtp_callback) +} + +// Deprecated: Unused. +// +// SetRtpCallback sets `AVCodecContext.rtp_callback` value. +func (avctx *AVCodecContext) SetRtpCallback(v AvCodecContextRtpCallbackFunc) { + avctx.rtp_callback = (C.avcodec_context_rtp_callback_func)(v) +} + +// Deprecated: Unused. +// +// GetRtpCallbackAddr gets `AVCodecContext.rtp_callback` address. +func (avctx *AVCodecContext) GetRtpCallbackAddr() *AvCodecContextRtpCallbackFunc { + return (*AvCodecContextRtpCallbackFunc)(&avctx.rtp_callback) +} + +// Deprecated: Use encoder private options instead. +// +// GetRtpPayloadSize gets `AVCodecContext.rtp_payload_size` value. func (avctx *AVCodecContext) GetRtpPayloadSize() int32 { return (int32)(avctx.rtp_payload_size) } -// Custom: SetRtpPayloadSize sets `AVCodecContext.rtp_payload_size` value. +// Deprecated: Use encoder private options instead. +// +// SetRtpPayloadSize sets `AVCodecContext.rtp_payload_size` value. func (avctx *AVCodecContext) SetRtpPayloadSize(v int32) { avctx.rtp_payload_size = (C.int)(v) } -// Custom: GetRtpPayloadSizeAddr gets `AVCodecContext.rtp_payload_size` address. +// Deprecated: Use encoder private options instead. +// +// GetRtpPayloadSizeAddr gets `AVCodecContext.rtp_payload_size` address. func (avctx *AVCodecContext) GetRtpPayloadSizeAddr() *int32 { return (*int32)(&avctx.rtp_payload_size) } -// Custom: GetMvBits gets `AVCodecContext.mv_bits` value. +// Deprecated: No use. +// +// GetMvBits gets `AVCodecContext.mv_bits` value. func (avctx *AVCodecContext) GetMvBits() int32 { return (int32)(avctx.mv_bits) } -// Custom: SetMvBits sets `AVCodecContext.mv_bits` value. +// Deprecated: No use. +// +// SetMvBits sets `AVCodecContext.mv_bits` value. func (avctx *AVCodecContext) SetMvBits(v int32) { avctx.mv_bits = (C.int)(v) } -// Custom: GetMvBitsAddr gets `AVCodecContext.mv_bits` address. +// Deprecated: No use. +// +// GetMvBitsAddr gets `AVCodecContext.mv_bits` address. func (avctx *AVCodecContext) GetMvBitsAddr() *int32 { return (*int32)(&avctx.mv_bits) } -// Custom: GetHeaderBits gets `AVCodecContext.header_bits` value. +// Deprecated: No use. +// +// GetHeaderBits gets `AVCodecContext.header_bits` value. func (avctx *AVCodecContext) GetHeaderBits() int32 { return (int32)(avctx.header_bits) } -// Custom: SetHeaderBits sets `AVCodecContext.header_bits` value. +// Deprecated: No use. +// +// SetHeaderBits sets `AVCodecContext.header_bits` value. func (avctx *AVCodecContext) SetHeaderBits(v int32) { avctx.header_bits = (C.int)(v) } -// Custom: GetHeaderBitsAddr gets `AVCodecContext.header_bits` address. +// Deprecated: No use. +// +// GetHeaderBitsAddr gets `AVCodecContext.header_bits` address. func (avctx *AVCodecContext) GetHeaderBitsAddr() *int32 { return (*int32)(&avctx.header_bits) } -// Custom: GetITexBits gets `AVCodecContext.i_tex_bits` value. +// Deprecated: No use. +// +// GetITexBits gets `AVCodecContext.i_tex_bits` value. func (avctx *AVCodecContext) GetITexBits() int32 { return (int32)(avctx.i_tex_bits) } -// Custom: SetITexBits sets `AVCodecContext.i_tex_bits` value. +// Deprecated: No use. +// +// SetITexBits sets `AVCodecContext.i_tex_bits` value. func (avctx *AVCodecContext) SetITexBits(v int32) { avctx.i_tex_bits = (C.int)(v) } -// Custom: GetITexBitsAddr gets `AVCodecContext.i_tex_bits` address. +// Deprecated: No use. +// +// GetITexBitsAddr gets `AVCodecContext.i_tex_bits` address. func (avctx *AVCodecContext) GetITexBitsAddr() *int32 { return (*int32)(&avctx.i_tex_bits) } -// Custom: GetPTexBits gets `AVCodecContext.p_tex_bits` value. +// Deprecated: No use. +// +// GetPTexBits gets `AVCodecContext.p_tex_bits` value. func (avctx *AVCodecContext) GetPTexBits() int32 { return (int32)(avctx.p_tex_bits) } -// Custom: SetPTexBits sets `AVCodecContext.p_tex_bits` value. +// Deprecated: No use. +// +// SetPTexBits sets `AVCodecContext.p_tex_bits` value. func (avctx *AVCodecContext) SetPTexBits(v int32) { avctx.p_tex_bits = (C.int)(v) } -// Custom: GetPTexBitsAddr gets `AVCodecContext.p_tex_bits` address. +// Deprecated: No use. +// +// GetPTexBitsAddr gets `AVCodecContext.p_tex_bits` address. func (avctx *AVCodecContext) GetPTexBitsAddr() *int32 { return (*int32)(&avctx.p_tex_bits) } -// Custom: GetICount gets `AVCodecContext.i_count` value. +// Deprecated: No use. +// +// GetICount gets `AVCodecContext.i_count` value. func (avctx *AVCodecContext) GetICount() int32 { return (int32)(avctx.i_count) } -// Custom: SetICount sets `AVCodecContext.i_count` value. +// Deprecated: No use. +// +// SetICount sets `AVCodecContext.i_count` value. func (avctx *AVCodecContext) SetICount(v int32) { avctx.i_count = (C.int)(v) } -// Custom: GetICountAddr gets `AVCodecContext.i_count` address. +// Deprecated: No use. +// +// GetICountAddr gets `AVCodecContext.i_count` address. func (avctx *AVCodecContext) GetICountAddr() *int32 { return (*int32)(&avctx.i_count) } -// Custom: GetPCount gets `AVCodecContext.p_count` value. +// Deprecated: No use. +// +// GetPCount gets `AVCodecContext.p_count` value. func (avctx *AVCodecContext) GetPCount() int32 { return (int32)(avctx.p_count) } -// Custom: SetPCount sets `AVCodecContext.p_count` value. +// Deprecated: No use. +// +// SetPCount sets `AVCodecContext.p_count` value. func (avctx *AVCodecContext) SetPCount(v int32) { avctx.p_count = (C.int)(v) } -// Custom: GetPCountAddr gets `AVCodecContext.p_count` address. +// Deprecated: No use. +// +// GetPCountAddr gets `AVCodecContext.p_count` address. func (avctx *AVCodecContext) GetPCountAddr() *int32 { return (*int32)(&avctx.p_count) } -// Custom: GetSkipCount gets `AVCodecContext.skip_count` value. +// Deprecated: No use. +// +// GetSkipCount gets `AVCodecContext.skip_count` value. func (avctx *AVCodecContext) GetSkipCount() int32 { return (int32)(avctx.skip_count) } -// Custom: SetSkipCount sets `AVCodecContext.skip_count` value. +// Deprecated: No use. +// +// SetSkipCount sets `AVCodecContext.skip_count` value. func (avctx *AVCodecContext) SetSkipCount(v int32) { avctx.skip_count = (C.int)(v) } -// Custom: GetSkipCountAddr gets `AVCodecContext.skip_count` address. +// Deprecated: No use. +// +// GetSkipCountAddr gets `AVCodecContext.skip_count` address. func (avctx *AVCodecContext) GetSkipCountAddr() *int32 { return (*int32)(&avctx.skip_count) } -// Custom: GetMiscBits gets `AVCodecContext.misc_bits` value. +// Deprecated: No use. +// +// GetMiscBits gets `AVCodecContext.misc_bits` value. func (avctx *AVCodecContext) GetMiscBits() int32 { return (int32)(avctx.misc_bits) } -// Custom: SetMiscBits sets `AVCodecContext.misc_bits` value. +// Deprecated: No use. +// +// SetMiscBits sets `AVCodecContext.misc_bits` value. func (avctx *AVCodecContext) SetMiscBits(v int32) { avctx.misc_bits = (C.int)(v) } -// Custom: GetMiscBitsAddr gets `AVCodecContext.misc_bits` address. +// Deprecated: No use. +// +// GetMiscBitsAddr gets `AVCodecContext.misc_bits` address. func (avctx *AVCodecContext) GetMiscBitsAddr() *int32 { return (*int32)(&avctx.misc_bits) } -// Custom: GetFrameBits gets `AVCodecContext.frame_bits` value. +// Deprecated: Unused. +// +// GetFrameBits gets `AVCodecContext.frame_bits` value. func (avctx *AVCodecContext) GetFrameBits() int32 { return (int32)(avctx.frame_bits) } -// Custom: SetFrameBits sets `AVCodecContext.frame_bits` value. +// Deprecated: Unused. +// +// SetFrameBits sets `AVCodecContext.frame_bits` value. func (avctx *AVCodecContext) SetFrameBits(v int32) { avctx.frame_bits = (C.int)(v) } -// Custom: GetFrameBitsAddr gets `AVCodecContext.frame_bits` address. +// Deprecated: Unused. +// +// GetFrameBitsAddr gets `AVCodecContext.frame_bits` address. func (avctx *AVCodecContext) GetFrameBitsAddr() *int32 { return (*int32)(&avctx.frame_bits) } -// Custom: GetStatsOut gets `AVCodecContext.stats_out` value. +// GetStatsOut gets `AVCodecContext.stats_out` value. func (avctx *AVCodecContext) GetStatsOut() string { return C.GoString(avctx.stats_out) } -// Custom: GetStatsIn gets `AVCodecContext.stats_in` value. +// GetStatsIn gets `AVCodecContext.stats_in` value. func (avctx *AVCodecContext) GetStatsIn() string { return C.GoString(avctx.stats_in) } -// Custom: GetWorkaroundBugs gets `AVCodecContext.workaround_bugs` value. +// GetWorkaroundBugs gets `AVCodecContext.workaround_bugs` value. func (avctx *AVCodecContext) GetWorkaroundBugs() int32 { return (int32)(avctx.workaround_bugs) } -// Custom: SetWorkaroundBugs sets `AVCodecContext.workaround_bugs` value. +// SetWorkaroundBugs sets `AVCodecContext.workaround_bugs` value. func (avctx *AVCodecContext) SetWorkaroundBugs(v int32) { avctx.workaround_bugs = (C.int)(v) } -// Custom: GetWorkaroundBugsAddr gets `AVCodecContext.workaround_bugs` address. +// GetWorkaroundBugsAddr gets `AVCodecContext.workaround_bugs` address. func (avctx *AVCodecContext) GetWorkaroundBugsAddr() *int32 { return (*int32)(&avctx.workaround_bugs) } @@ -2246,17 +2519,17 @@ const ( FF_BUG_IEDGE = int32(C.FF_BUG_IEDGE) ) -// Custom: GetStrictStdCompliance gets `AVCodecContext.strict_std_compliance` value. +// GetStrictStdCompliance gets `AVCodecContext.strict_std_compliance` value. func (avctx *AVCodecContext) GetStrictStdCompliance() int32 { return (int32)(avctx.strict_std_compliance) } -// Custom: SetStrictStdCompliance sets `AVCodecContext.strict_std_compliance` value. +// SetStrictStdCompliance sets `AVCodecContext.strict_std_compliance` value. func (avctx *AVCodecContext) SetStrictStdCompliance(v int32) { avctx.strict_std_compliance = (C.int)(v) } -// Custom: GetStrictStdComplianceAddr gets `AVCodecContext.strict_std_compliance` address. +// GetStrictStdComplianceAddr gets `AVCodecContext.strict_std_compliance` address. func (avctx *AVCodecContext) GetStrictStdComplianceAddr() *int32 { return (*int32)(&avctx.strict_std_compliance) } @@ -2269,17 +2542,17 @@ const ( FF_COMPLIANCE_EXPERIMENTAL = int32(C.FF_COMPLIANCE_EXPERIMENTAL) ) -// Custom: GetErrorConcealment gets `AVCodecContext.error_concealment` value. +// GetErrorConcealment gets `AVCodecContext.error_concealment` value. func (avctx *AVCodecContext) GetErrorConcealment() int32 { return (int32)(avctx.error_concealment) } -// Custom: SetErrorConcealment sets `AVCodecContext.error_concealment` value. +// SetErrorConcealment sets `AVCodecContext.error_concealment` value. func (avctx *AVCodecContext) SetErrorConcealment(v int32) { avctx.error_concealment = (C.int)(v) } -// Custom: GetErrorConcealmentAddr gets `AVCodecContext.error_concealment` address. +// GetErrorConcealmentAddr gets `AVCodecContext.error_concealment` address. func (avctx *AVCodecContext) GetErrorConcealmentAddr() *int32 { return (*int32)(&avctx.error_concealment) } @@ -2290,17 +2563,17 @@ const ( FF_EC_FAVOR_INTER = int32(C.FF_EC_FAVOR_INTER) ) -// Custom: GetDebug gets `AVCodecContext.debug` value. +// GetDebug gets `AVCodecContext.debug` value. func (avctx *AVCodecContext) GetDebug() int32 { return (int32)(avctx.debug) } -// Custom: SetDebug sets `AVCodecContext.debug` value. +// SetDebug sets `AVCodecContext.debug` value. func (avctx *AVCodecContext) SetDebug(v int32) { avctx.debug = (C.int)(v) } -// Custom: GetDebugAddr gets `AVCodecContext.debug` address. +// GetDebugAddr gets `AVCodecContext.debug` address. func (avctx *AVCodecContext) GetDebugAddr() *int32 { return (*int32)(&avctx.debug) } @@ -2323,17 +2596,17 @@ const ( FF_DEBUG_NOMC = int32(C.FF_DEBUG_NOMC) ) -// Custom: GetErrRecognition gets `AVCodecContext.err_recognition` value. +// GetErrRecognition gets `AVCodecContext.err_recognition` value. func (avctx *AVCodecContext) GetErrRecognition() int32 { return (int32)(avctx.err_recognition) } -// Custom: SetErrRecognition sets `AVCodecContext.err_recognition` value. +// SetErrRecognition sets `AVCodecContext.err_recognition` value. func (avctx *AVCodecContext) SetErrRecognition(v int32) { avctx.err_recognition = (C.int)(v) } -// Custom: GetErrRecognitionAddr gets `AVCodecContext.err_recognition` address. +// GetErrRecognitionAddr gets `AVCodecContext.err_recognition` address. func (avctx *AVCodecContext) GetErrRecognitionAddr() *int32 { return (*int32)(&avctx.err_recognition) } @@ -2349,79 +2622,79 @@ const ( AV_EF_AGGRESSIVE = int32(C.AV_EF_AGGRESSIVE) ) -// Custom: GetReorderedOpaque gets `AVCodecContext.reordered_opaque` value. +// GetReorderedOpaque gets `AVCodecContext.reordered_opaque` value. func (avctx *AVCodecContext) GetReorderedOpaque() int64 { return (int64)(avctx.reordered_opaque) } -// Custom: SetReorderedOpaque sets `AVCodecContext.reordered_opaque` value. +// SetReorderedOpaque sets `AVCodecContext.reordered_opaque` value. func (avctx *AVCodecContext) SetReorderedOpaque(v int64) { avctx.reordered_opaque = (C.int64_t)(v) } -// Custom: GetReorderedOpaqueAddr gets `AVCodecContext.reordered_opaque` address. +// GetReorderedOpaqueAddr gets `AVCodecContext.reordered_opaque` address. func (avctx *AVCodecContext) GetReorderedOpaqueAddr() *int64 { return (*int64)(&avctx.reordered_opaque) } -// Custom: GetHwaccel gets `AVCodecContext.hwaccel` value. +// GetHwaccel gets `AVCodecContext.hwaccel` value. func (avctx *AVCodecContext) GetHwaccel() *AVHWAccel { return (*AVHWAccel)(avctx.hwaccel) } -// Custom: SetHwaccel sets `AVCodecContext.hwaccel` value. +// SetHwaccel sets `AVCodecContext.hwaccel` value. func (avctx *AVCodecContext) SetHwaccel(v *AVHWAccel) { avctx.hwaccel = (*C.AVHWAccel)(v) } -// Custom: GetHwaccelAddr gets `AVCodecContext.hwaccel` address. +// GetHwaccelAddr gets `AVCodecContext.hwaccel` address. func (avctx *AVCodecContext) GetHwaccelAddr() **AVHWAccel { return (**AVHWAccel)(unsafe.Pointer(&avctx.hwaccel)) } -// Custom: GetHwaccelContext gets `AVCodecContext.hwaccel_context` value. +// GetHwaccelContext gets `AVCodecContext.hwaccel_context` value. func (avctx *AVCodecContext) GetHwaccelContext() unsafe.Pointer { return (unsafe.Pointer)(avctx.hwaccel_context) } -// Custom: SetHwaccelContext sets `AVCodecContext.hwaccel_context` value. +// SetHwaccelContext sets `AVCodecContext.hwaccel_context` value. func (avctx *AVCodecContext) SetHwaccelContext(v CVoidPointer) { avctx.hwaccel_context = VoidPointer(v) } -// Custom: GetHwaccelContextAddr gets `AVCodecContext.hwaccel_context` address. +// GetHwaccelContextAddr gets `AVCodecContext.hwaccel_context` address. func (avctx *AVCodecContext) GetHwaccelContextAddr() unsafe.Pointer { return (unsafe.Pointer)(&avctx.hwaccel_context) } -// Custom: GetError gets `AVCodecContext.error` value. +// GetError gets `AVCodecContext.error` value. func (avctx *AVCodecContext) GetError() []uint64 { return unsafe.Slice((*uint64)(&avctx.error[0]), AV_NUM_DATA_POINTERS) } -// Custom: SetError sets `AVCodecContext.error` value. +// SetError sets `AVCodecContext.error` value. func (avctx *AVCodecContext) SetError(v []uint64) { for i := 0; i < FFMIN(len(v), AV_NUM_DATA_POINTERS); i++ { avctx.error[i] = (C.uint64_t)(v[i]) } } -// Custom: GetErrorAddr gets `AVCodecContext.error` address. +// GetErrorAddr gets `AVCodecContext.error` address. func (avctx *AVCodecContext) GetErrorAddr() **uint64 { return (**uint64)(unsafe.Pointer(&avctx.error)) } -// Custom: GetDctAlgo gets `AVCodecContext.dct_algo` value. +// GetDctAlgo gets `AVCodecContext.dct_algo` value. func (avctx *AVCodecContext) GetDctAlgo() int32 { return (int32)(avctx.dct_algo) } -// Custom: SetDctAlgo sets `AVCodecContext.dct_algo` value. +// SetDctAlgo sets `AVCodecContext.dct_algo` value. func (avctx *AVCodecContext) SetDctAlgo(v int32) { avctx.dct_algo = (C.int)(v) } -// Custom: GetDctAlgoAddr gets `AVCodecContext.dct_algo` address. +// GetDctAlgoAddr gets `AVCodecContext.dct_algo` address. func (avctx *AVCodecContext) GetDctAlgoAddr() *int32 { return (*int32)(&avctx.dct_algo) } @@ -2435,17 +2708,17 @@ const ( FF_DCT_FAAN = int32(C.FF_DCT_FAAN) ) -// Custom: GetIdctAlgo gets `AVCodecContext.idct_algo` value. +// GetIdctAlgo gets `AVCodecContext.idct_algo` value. func (avctx *AVCodecContext) GetIdctAlgo() int32 { return (int32)(avctx.idct_algo) } -// Custom: SetIdctAlgo sets `AVCodecContext.idct_algo` value. +// SetIdctAlgo sets `AVCodecContext.idct_algo` value. func (avctx *AVCodecContext) SetIdctAlgo(v int32) { avctx.idct_algo = (C.int)(v) } -// Custom: GetIdctAlgoAddr gets `AVCodecContext.idct_algo` address. +// GetIdctAlgoAddr gets `AVCodecContext.idct_algo` address. func (avctx *AVCodecContext) GetIdctAlgoAddr() *int32 { return (*int32)(&avctx.idct_algo) } @@ -2467,92 +2740,98 @@ const ( FF_IDCT_SIMPLEAUTO = int32(C.FF_IDCT_SIMPLEAUTO) ) -// Custom: GetBitsPerCodedSample gets `AVCodecContext.bits_per_coded_sample` value. +// GetBitsPerCodedSample gets `AVCodecContext.bits_per_coded_sample` value. func (avctx *AVCodecContext) GetBitsPerCodedSample() int32 { return (int32)(avctx.bits_per_coded_sample) } -// Custom: SetBitsPerCodedSample sets `AVCodecContext.bits_per_coded_sample` value. +// SetBitsPerCodedSample sets `AVCodecContext.bits_per_coded_sample` value. func (avctx *AVCodecContext) SetBitsPerCodedSample(v int32) { avctx.bits_per_coded_sample = (C.int)(v) } -// Custom: GetBitsPerCodedSampleAddr gets `AVCodecContext.bits_per_coded_sample` address. +// GetBitsPerCodedSampleAddr gets `AVCodecContext.bits_per_coded_sample` address. func (avctx *AVCodecContext) GetBitsPerCodedSampleAddr() *int32 { return (*int32)(&avctx.bits_per_coded_sample) } -// Custom: GetBitsPerRawSample gets `AVCodecContext.bits_per_raw_sample` value. +// GetBitsPerRawSample gets `AVCodecContext.bits_per_raw_sample` value. func (avctx *AVCodecContext) GetBitsPerRawSample() int32 { return (int32)(avctx.bits_per_raw_sample) } -// Custom: SetBitsPerRawSample sets `AVCodecContext.bits_per_raw_sample` value. +// SetBitsPerRawSample sets `AVCodecContext.bits_per_raw_sample` value. func (avctx *AVCodecContext) SetBitsPerRawSample(v int32) { avctx.bits_per_raw_sample = (C.int)(v) } -// Custom: GetBitsPerRawSampleAddr gets `AVCodecContext.bits_per_raw_sample` address. +// GetBitsPerRawSampleAddr gets `AVCodecContext.bits_per_raw_sample` address. func (avctx *AVCodecContext) GetBitsPerRawSampleAddr() *int32 { return (*int32)(&avctx.bits_per_raw_sample) } -// Custom: GetLowres gets `AVCodecContext.lowres` value. +// GetLowres gets `AVCodecContext.lowres` value. func (avctx *AVCodecContext) GetLowres() int32 { return (int32)(avctx.lowres) } -// Custom: SetLowres sets `AVCodecContext.lowres` value. +// SetLowres sets `AVCodecContext.lowres` value. func (avctx *AVCodecContext) SetLowres(v int32) { avctx.lowres = (C.int)(v) } -// Custom: GetLowresAddr gets `AVCodecContext.lowres` address. +// GetLowresAddr gets `AVCodecContext.lowres` address. func (avctx *AVCodecContext) GetLowresAddr() *int32 { return (*int32)(&avctx.lowres) } -// Custom: GetCodedFrame gets `AVCodecContext.coded_frame` value. +// Deprecated: Use the quality factor packet side data instead. +// +// GetCodedFrame gets `AVCodecContext.coded_frame` value. func (avctx *AVCodecContext) GetCodedFrame() *AVFrame { return (*AVFrame)(avctx.coded_frame) } -// Custom: SetCodedFrame sets `AVCodecContext.coded_frame` value. +// Deprecated: Use the quality factor packet side data instead. +// +// SetCodedFrame sets `AVCodecContext.coded_frame` value. func (avctx *AVCodecContext) SetCodedFrame(v *AVFrame) { avctx.coded_frame = (*C.struct_AVFrame)(v) } -// Custom: GetCodedFrameAddr gets `AVCodecContext.coded_frame` address. +// Deprecated: Use the quality factor packet side data instead. +// +// GetCodedFrameAddr gets `AVCodecContext.coded_frame` address. func (avctx *AVCodecContext) GetCodedFrameAddr() **AVFrame { return (**AVFrame)(unsafe.Pointer(&avctx.coded_frame)) } -// Custom: GetThreadCount gets `AVCodecContext.thread_count` value. +// GetThreadCount gets `AVCodecContext.thread_count` value. func (avctx *AVCodecContext) GetThreadCount() int32 { return (int32)(avctx.thread_count) } -// Custom: SetThreadCount sets `AVCodecContext.thread_count` value. +// SetThreadCount sets `AVCodecContext.thread_count` value. func (avctx *AVCodecContext) SetThreadCount(v int32) { avctx.thread_count = (C.int)(v) } -// Custom: GetThreadCountAddr gets `AVCodecContext.thread_count` address. +// GetThreadCountAddr gets `AVCodecContext.thread_count` address. func (avctx *AVCodecContext) GetThreadCountAddr() *int32 { return (*int32)(&avctx.thread_count) } -// Custom: GetThreadType gets `AVCodecContext.threadtype` value. +// GetThreadType gets `AVCodecContext.threadtype` value. func (avctx *AVCodecContext) GetThreadType() int32 { return (int32)(avctx.thread_type) } -// Custom: SetThreadType sets `AVCodecContext.threadtype` value. +// SetThreadType sets `AVCodecContext.threadtype` value. func (avctx *AVCodecContext) SetThreadType(v int32) { avctx.thread_type = (C.int)(v) } -// Custom: GetThreadTypeAddr gets `AVCodecContext.threadtype` address. +// GetThreadTypeAddr gets `AVCodecContext.threadtype` address. func (avctx *AVCodecContext) GetThreadTypeAddr() *int32 { return (*int32)(&avctx.thread_type) } @@ -2562,62 +2841,106 @@ const ( FF_THREAD_SLICE = int32(C.FF_THREAD_SLICE) ) -// Custom: GetActiveThreadType gets `AVCodecContext.active_threadtype` value. +// GetActiveThreadType gets `AVCodecContext.active_threadtype` value. func (avctx *AVCodecContext) GetActiveThreadType() int32 { return (int32)(avctx.active_thread_type) } -// Custom: SetActiveThreadType sets `AVCodecContext.active_threadtype` value. +// SetActiveThreadType sets `AVCodecContext.active_threadtype` value. func (avctx *AVCodecContext) SetActiveThreadType(v int32) { avctx.active_thread_type = (C.int)(v) } -// Custom: GetActiveThreadTypeAddr gets `AVCodecContext.active_threadtype` address. +// GetActiveThreadTypeAddr gets `AVCodecContext.active_threadtype` address. func (avctx *AVCodecContext) GetActiveThreadTypeAddr() *int32 { return (*int32)(&avctx.active_thread_type) } -// Custom: GetThreadSafeCallbacks gets `AVCodecContext.thread_safe_callbacks` value. +// Deprecated: Unused. +// +// GetThreadSafeCallbacks gets `AVCodecContext.thread_safe_callbacks` value. func (avctx *AVCodecContext) GetThreadSafeCallbacks() int32 { return (int32)(avctx.thread_safe_callbacks) } -// Custom: SetThreadSafeCallbacks sets `AVCodecContext.thread_safe_callbacks` value. +// Deprecated: Unused. +// +// SetThreadSafeCallbacks sets `AVCodecContext.thread_safe_callbacks` value. func (avctx *AVCodecContext) SetThreadSafeCallbacks(v int32) { avctx.thread_safe_callbacks = (C.int)(v) } -// Custom: GetThreadSafeCallbacksAddr gets `AVCodecContext.thread_safe_callbacks` address. +// Deprecated: Unused. +// +// GetThreadSafeCallbacksAddr gets `AVCodecContext.thread_safe_callbacks` address. func (avctx *AVCodecContext) GetThreadSafeCallbacksAddr() *int32 { return (*int32)(&avctx.thread_safe_callbacks) } -// Custom: GetNsseWeight gets `AVCodecContext.nsse_weight` value. +// typedef int (*avcodec_context_internal_execute_func)(struct AVCodecContext *c, +// avcodec_context_execute_func func, void *arg2, int *ret, int count, int size); +type AvCodecContextInternalExecuteFunc = C.avcodec_context_internal_execute_func + +// GetExecute gets `AVCodecContext.execute` value. +func (avctx *AVCodecContext) GetExecute() AvCodecContextInternalExecuteFunc { + return (AvCodecContextInternalExecuteFunc)(avctx.execute) +} + +// SetExecute sets `AVCodecContext.execute` value. +func (avctx *AVCodecContext) SetExecute(v AvCodecContextInternalExecuteFunc) { + avctx.execute = (C.avcodec_context_internal_execute_func)(v) +} + +// GetExecuteAddr gets `AVCodecContext.execute` address. +func (avctx *AVCodecContext) GetExecuteAddr() *AvCodecContextInternalExecuteFunc { + return (*AvCodecContextInternalExecuteFunc)(&avctx.execute) +} + +// typedef int (*avcodec_context_internal_execute2_func)(struct AVCodecContext *c, +// avcodec_context_execute2_func func, void *arg2, int *ret, int count); +type AvCodecContextInternalExecute2Func = C.avcodec_context_internal_execute2_func + +// GetExecute2 gets `AVCodecContext.execute2` value. +func (avctx *AVCodecContext) GetExecute2() AvCodecContextInternalExecute2Func { + return (AvCodecContextInternalExecute2Func)(avctx.execute2) +} + +// SetExecute2 sets `AVCodecContext.execute2` value. +func (avctx *AVCodecContext) SetExecute2(v AvCodecContextInternalExecute2Func) { + avctx.execute2 = (C.avcodec_context_internal_execute2_func)(v) +} + +// GetExecute2Addr gets `AVCodecContext.execute2` address. +func (avctx *AVCodecContext) GetExecute2Addr() *AvCodecContextInternalExecute2Func { + return (*AvCodecContextInternalExecute2Func)(&avctx.execute2) +} + +// GetNsseWeight gets `AVCodecContext.nsse_weight` value. func (avctx *AVCodecContext) GetNsseWeight() int32 { return (int32)(avctx.nsse_weight) } -// Custom: SetNsseWeight sets `AVCodecContext.nsse_weight` value. +// SetNsseWeight sets `AVCodecContext.nsse_weight` value. func (avctx *AVCodecContext) SetNsseWeight(v int32) { avctx.nsse_weight = (C.int)(v) } -// Custom: GetNsseWeightAddr gets `AVCodecContext.nsse_weight` address. +// GetNsseWeightAddr gets `AVCodecContext.nsse_weight` address. func (avctx *AVCodecContext) GetNsseWeightAddr() *int32 { return (*int32)(&avctx.nsse_weight) } -// Custom: GetProfile gets `AVCodecContext.profile` value. +// GetProfile gets `AVCodecContext.profile` value. func (avctx *AVCodecContext) GetProfile() int32 { return (int32)(avctx.profile) } -// Custom: SetProfile sets `AVCodecContext.profile` value. +// SetProfile sets `AVCodecContext.profile` value. func (avctx *AVCodecContext) SetProfile(v int32) { avctx.profile = (C.int)(v) } -// Custom: GetProfileAddr gets `AVCodecContext.profile` address. +// GetProfileAddr gets `AVCodecContext.profile` address. func (avctx *AVCodecContext) GetProfileAddr() *int32 { return (*int32)(&avctx.profile) } @@ -2744,277 +3067,289 @@ const ( FF_PROFILE_KLVA_ASYNC = int32(C.FF_PROFILE_KLVA_ASYNC) ) -// Custom: GetLevel gets `AVCodecContext.level` value. +// GetLevel gets `AVCodecContext.level` value. func (avctx *AVCodecContext) GetLevel() int32 { return (int32)(avctx.level) } -// Custom: SetLevel sets `AVCodecContext.level` value. +// SetLevel sets `AVCodecContext.level` value. func (avctx *AVCodecContext) SetLevel(v int32) { avctx.level = (C.int)(v) } -// Custom: GetLevelAddr gets `AVCodecContext.level` address. +// GetLevelAddr gets `AVCodecContext.level` address. func (avctx *AVCodecContext) GetLevelAddr() *int32 { return (*int32)(&avctx.level) } -// Custom: GetSkipLoopFilter gets `AVCodecContext.skip_loop_filter` value. +// GetSkipLoopFilter gets `AVCodecContext.skip_loop_filter` value. func (avctx *AVCodecContext) GetSkipLoopFilter() AVDiscard { return (AVDiscard)(avctx.skip_loop_filter) } -// Custom: SetSkipLoopFilter sets `AVCodecContext.skip_loop_filter` value. +// SetSkipLoopFilter sets `AVCodecContext.skip_loop_filter` value. func (avctx *AVCodecContext) SetSkipLoopFilter(v AVDiscard) { avctx.skip_loop_filter = (C.enum_AVDiscard)(v) } -// Custom: GetSkipLoopFilterAddr gets `AVCodecContext.skip_loop_filter` address. +// GetSkipLoopFilterAddr gets `AVCodecContext.skip_loop_filter` address. func (avctx *AVCodecContext) GetSkipLoopFilterAddr() *AVDiscard { return (*AVDiscard)(&avctx.skip_loop_filter) } -// Custom: GetSkipIdct gets `AVCodecContext.skip_idct` value. +// GetSkipIdct gets `AVCodecContext.skip_idct` value. func (avctx *AVCodecContext) GetSkipIdct() AVDiscard { return (AVDiscard)(avctx.skip_idct) } -// Custom: SetSkipIdct sets `AVCodecContext.skip_idct` value. +// SetSkipIdct sets `AVCodecContext.skip_idct` value. func (avctx *AVCodecContext) SetSkipIdct(v AVDiscard) { avctx.skip_idct = (C.enum_AVDiscard)(v) } -// Custom: GetSkipIdctAddr gets `AVCodecContext.skip_idct` address. +// GetSkipIdctAddr gets `AVCodecContext.skip_idct` address. func (avctx *AVCodecContext) GetSkipIdctAddr() *AVDiscard { return (*AVDiscard)(&avctx.skip_idct) } -// Custom: GetSkipFrame gets `AVCodecContext.skip_frame` value. +// GetSkipFrame gets `AVCodecContext.skip_frame` value. func (avctx *AVCodecContext) GetSkipFrame() AVDiscard { return (AVDiscard)(avctx.skip_frame) } -// Custom: SetSkipFrame sets `AVCodecContext.skip_frame` value. +// SetSkipFrame sets `AVCodecContext.skip_frame` value. func (avctx *AVCodecContext) SetSkipFrame(v AVDiscard) { avctx.skip_frame = (C.enum_AVDiscard)(v) } -// Custom: GetSkipFrameAddr gets `AVCodecContext.skip_frame` address. +// GetSkipFrameAddr gets `AVCodecContext.skip_frame` address. func (avctx *AVCodecContext) GetSkipFrameAddr() *AVDiscard { return (*AVDiscard)(&avctx.skip_frame) } -// Custom: GetSubtitleHeader gets `AVCodecContext.subtitle_header` value. +// GetSubtitleHeader gets `AVCodecContext.subtitle_header` value. func (avctx *AVCodecContext) GetSubtitleHeader() *uint8 { return (*uint8)(avctx.subtitle_header) } -// Custom: SetSubtitleHeader sets `AVCodecContext.subtitle_header` value. +// SetSubtitleHeader sets `AVCodecContext.subtitle_header` value. func (avctx *AVCodecContext) SetSubtitleHeader(v *uint8) { avctx.subtitle_header = (*C.uint8_t)(v) } -// Custom: GetSubtitleHeaderAddr gets `AVCodecContext.subtitle_header` address. +// GetSubtitleHeaderAddr gets `AVCodecContext.subtitle_header` address. func (avctx *AVCodecContext) GetSubtitleHeaderAddr() **uint8 { return (**uint8)(unsafe.Pointer(&avctx.subtitle_header)) } -// Custom: GetSubtitleHeaderSize gets `AVCodecContext.subtitle_header_size` value. +// GetSubtitleHeaderSize gets `AVCodecContext.subtitle_header_size` value. func (avctx *AVCodecContext) GetSubtitleHeaderSize() int32 { return (int32)(avctx.subtitle_header_size) } -// Custom: SetSubtitleHeaderSize sets `AVCodecContext.subtitle_header_size` value. +// SetSubtitleHeaderSize sets `AVCodecContext.subtitle_header_size` value. func (avctx *AVCodecContext) SetSubtitleHeaderSize(v int32) { avctx.subtitle_header_size = (C.int)(v) } -// Custom: GetSubtitleHeaderSizeAddr gets `AVCodecContext.subtitle_header_size` address. +// GetSubtitleHeaderSizeAddr gets `AVCodecContext.subtitle_header_size` address. func (avctx *AVCodecContext) GetSubtitleHeaderSizeAddr() *int32 { return (*int32)(&avctx.subtitle_header_size) } -// Custom: GetVbvDelay gets `AVCodecContext.vbv_delay` value. +// Deprecated: No use. +// +// GetVbvDelay gets `AVCodecContext.vbv_delay` value. func (avctx *AVCodecContext) GetVbvDelay() uint64 { return (uint64)(avctx.vbv_delay) } -// Custom: SetVbvDelay sets `AVCodecContext.vbv_delay` value. +// Deprecated: No use. +// +// SetVbvDelay sets `AVCodecContext.vbv_delay` value. func (avctx *AVCodecContext) SetVbvDelay(v uint64) { avctx.vbv_delay = (C.uint64_t)(v) } -// Custom: GetVbvDelayAddr gets `AVCodecContext.vbv_delay` address. +// Deprecated: No use. +// +// GetVbvDelayAddr gets `AVCodecContext.vbv_delay` address. func (avctx *AVCodecContext) GetVbvDelayAddr() *uint64 { return (*uint64)(&avctx.vbv_delay) } -// Custom: GetSideDataOnlyPackets gets `AVCodecContext.side_data_only_packets` value. +// Deprecated: No use. +// +// GetSideDataOnlyPackets gets `AVCodecContext.side_data_only_packets` value. func (avctx *AVCodecContext) GetSideDataOnlyPackets() int32 { return (int32)(avctx.side_data_only_packets) } -// Custom: SetSideDataOnlyPackets sets `AVCodecContext.side_data_only_packets` value. +// Deprecated: No use. +// +// SetSideDataOnlyPackets sets `AVCodecContext.side_data_only_packets` value. func (avctx *AVCodecContext) SetSideDataOnlyPackets(v int32) { avctx.side_data_only_packets = (C.int)(v) } -// Custom: GetSideDataOnlyPacketsAddr gets `AVCodecContext.side_data_only_packets` address. +// Deprecated: No use. +// +// GetSideDataOnlyPacketsAddr gets `AVCodecContext.side_data_only_packets` address. func (avctx *AVCodecContext) GetSideDataOnlyPacketsAddr() *int32 { return (*int32)(&avctx.side_data_only_packets) } -// Custom: GetInitialPadding gets `AVCodecContext.initial_padding` value. +// GetInitialPadding gets `AVCodecContext.initial_padding` value. func (avctx *AVCodecContext) GetInitialPadding() int32 { return (int32)(avctx.initial_padding) } -// Custom: SetInitialPadding sets `AVCodecContext.initial_padding` value. +// SetInitialPadding sets `AVCodecContext.initial_padding` value. func (avctx *AVCodecContext) SetInitialPadding(v int32) { avctx.initial_padding = (C.int)(v) } -// Custom: GetInitialPaddingAddr gets `AVCodecContext.initial_padding` address. +// GetInitialPaddingAddr gets `AVCodecContext.initial_padding` address. func (avctx *AVCodecContext) GetInitialPaddingAddr() *int32 { return (*int32)(&avctx.initial_padding) } -// Custom: GetFramerate gets `AVCodecContext.framerate` value. +// GetFramerate gets `AVCodecContext.framerate` value. func (avctx *AVCodecContext) GetFramerate() AVRational { return (AVRational)(avctx.framerate) } -// Custom: SetFramerate sets `AVCodecContext.framerate` value. +// SetFramerate sets `AVCodecContext.framerate` value. func (avctx *AVCodecContext) SetFramerate(v AVRational) { avctx.framerate = (C.struct_AVRational)(v) } -// Custom: GetFramerateAddr gets `AVCodecContext.framerate` address. +// GetFramerateAddr gets `AVCodecContext.framerate` address. func (avctx *AVCodecContext) GetFramerateAddr() *AVRational { return (*AVRational)(&avctx.framerate) } -// Custom: GetSwPixFmt gets `AVCodecContext.sw_pix_fmt` value. +// GetSwPixFmt gets `AVCodecContext.sw_pix_fmt` value. func (avctx *AVCodecContext) GetSwPixFmt() AVPixelFormat { return (AVPixelFormat)(avctx.sw_pix_fmt) } -// Custom: SetSwPixFmt sets `AVCodecContext.sw_pix_fmt` value. +// SetSwPixFmt sets `AVCodecContext.sw_pix_fmt` value. func (avctx *AVCodecContext) SetSwPixFmt(v AVPixelFormat) { avctx.sw_pix_fmt = (C.enum_AVPixelFormat)(v) } -// Custom: GetSwPixFmtAddr gets `AVCodecContext.sw_pix_fmt` address. +// GetSwPixFmtAddr gets `AVCodecContext.sw_pix_fmt` address. func (avctx *AVCodecContext) GetSwPixFmtAddr() *AVPixelFormat { return (*AVPixelFormat)(&avctx.sw_pix_fmt) } -// Custom: GetPktTimebase gets `AVCodecContext.pkt_timebase` value. +// GetPktTimebase gets `AVCodecContext.pkt_timebase` value. func (avctx *AVCodecContext) GetPktTimebase() AVRational { return (AVRational)(avctx.pkt_timebase) } -// Custom: SetPktTimebase sets `AVCodecContext.pkt_timebase` value. +// SetPktTimebase sets `AVCodecContext.pkt_timebase` value. func (avctx *AVCodecContext) SetPktTimebase(v AVRational) { avctx.pkt_timebase = (C.struct_AVRational)(v) } -// Custom: GetPktTimebaseAddr gets `AVCodecContext.pkt_timebase` address. +// GetPktTimebaseAddr gets `AVCodecContext.pkt_timebase` address. func (avctx *AVCodecContext) GetPktTimebaseAddr() *AVRational { return (*AVRational)(&avctx.pkt_timebase) } -// Custom: GetCodecDescriptor gets `AVCodecContext.codec_descriptor` value. +// GetCodecDescriptor gets `AVCodecContext.codec_descriptor` value. func (avctx *AVCodecContext) GetCodecDescriptor() *AVCodecDescriptor { return (*AVCodecDescriptor)(avctx.codec_descriptor) } -// Custom: SetCodecDescriptor sets `AVCodecContext.codec_descriptor` value. +// SetCodecDescriptor sets `AVCodecContext.codec_descriptor` value. func (avctx *AVCodecContext) SetCodecDescriptor(v *AVCodecDescriptor) { avctx.codec_descriptor = (*C.struct_AVCodecDescriptor)(v) } -// Custom: GetCodecDescriptorAddr gets `AVCodecContext.codec_descriptor` address. +// GetCodecDescriptorAddr gets `AVCodecContext.codec_descriptor` address. func (avctx *AVCodecContext) GetCodecDescriptorAddr() **AVCodecDescriptor { return (**AVCodecDescriptor)(unsafe.Pointer(&avctx.codec_descriptor)) } -// Custom: GetPtsCorrectionNumFaultyPts gets `AVCodecContext.pts_correction_num_faulty_pts` value. +// GetPtsCorrectionNumFaultyPts gets `AVCodecContext.pts_correction_num_faulty_pts` value. func (avctx *AVCodecContext) GetPtsCorrectionNumFaultyPts() int64 { return (int64)(avctx.pts_correction_num_faulty_pts) } -// Custom: SetPtsCorrectionNumFaultyPts sets `AVCodecContext.pts_correction_num_faulty_pts` value. +// SetPtsCorrectionNumFaultyPts sets `AVCodecContext.pts_correction_num_faulty_pts` value. func (avctx *AVCodecContext) SetPtsCorrectionNumFaultyPts(v int64) { avctx.pts_correction_num_faulty_pts = (C.int64_t)(v) } -// Custom: GetPtsCorrectionNumFaultyPtsAddr gets `AVCodecContext.pts_correction_num_faulty_pts` address. +// GetPtsCorrectionNumFaultyPtsAddr gets `AVCodecContext.pts_correction_num_faulty_pts` address. func (avctx *AVCodecContext) GetPtsCorrectionNumFaultyPtsAddr() *int64 { return (*int64)(&avctx.pts_correction_num_faulty_pts) } -// Custom: GetPtsCorrectionNumFaultyDts gets `AVCodecContext.pts_correction_num_faulty_dts` value. +// GetPtsCorrectionNumFaultyDts gets `AVCodecContext.pts_correction_num_faulty_dts` value. func (avctx *AVCodecContext) GetPtsCorrectionNumFaultyDts() int64 { return (int64)(avctx.pts_correction_num_faulty_dts) } -// Custom: SetPtsCorrectionNumFaultyDts sets `AVCodecContext.pts_correction_num_faulty_dts` value. +// SetPtsCorrectionNumFaultyDts sets `AVCodecContext.pts_correction_num_faulty_dts` value. func (avctx *AVCodecContext) SetPtsCorrectionNumFaultyDts(v int64) { avctx.pts_correction_num_faulty_dts = (C.int64_t)(v) } -// Custom: GetPtsCorrectionNumFaultyDtsAddr gets `AVCodecContext.pts_correction_num_faulty_dts` address. +// GetPtsCorrectionNumFaultyDtsAddr gets `AVCodecContext.pts_correction_num_faulty_dts` address. func (avctx *AVCodecContext) GetPtsCorrectionNumFaultyDtsAddr() *int64 { return (*int64)(&avctx.pts_correction_num_faulty_dts) } -// Custom: GetPtsCorrectionLastPts gets `AVCodecContext.pts_correction_last_pts` value. +// GetPtsCorrectionLastPts gets `AVCodecContext.pts_correction_last_pts` value. func (avctx *AVCodecContext) GetPtsCorrectionLastPts() int64 { return (int64)(avctx.pts_correction_last_pts) } -// Custom: SetPtsCorrectionLastPts sets `AVCodecContext.pts_correction_last_pts` value. +// SetPtsCorrectionLastPts sets `AVCodecContext.pts_correction_last_pts` value. func (avctx *AVCodecContext) SetPtsCorrectionLastPts(v int64) { avctx.pts_correction_last_pts = (C.int64_t)(v) } -// Custom: GetPtsCorrectionLastPtsAddr gets `AVCodecContext.pts_correction_last_pts` address. +// GetPtsCorrectionLastPtsAddr gets `AVCodecContext.pts_correction_last_pts` address. func (avctx *AVCodecContext) GetPtsCorrectionLastPtsAddr() *int64 { return (*int64)(&avctx.pts_correction_last_pts) } -// Custom: GetPtsCorrectionLastDts gets `AVCodecContext.pts_correction_last_dts` value. +// GetPtsCorrectionLastDts gets `AVCodecContext.pts_correction_last_dts` value. func (avctx *AVCodecContext) GetPtsCorrectionLastDts() int64 { return (int64)(avctx.pts_correction_last_dts) } -// Custom: SetPtsCorrectionLastDts sets `AVCodecContext.pts_correction_last_dts` value. +// SetPtsCorrectionLastDts sets `AVCodecContext.pts_correction_last_dts` value. func (avctx *AVCodecContext) SetPtsCorrectionLastDts(v int64) { avctx.pts_correction_last_dts = (C.int64_t)(v) } -// Custom: GetPtsCorrectionLastDtsAddr gets `AVCodecContext.pts_correction_last_dts` address. +// GetPtsCorrectionLastDtsAddr gets `AVCodecContext.pts_correction_last_dts` address. func (avctx *AVCodecContext) GetPtsCorrectionLastDtsAddr() *int64 { return (*int64)(&avctx.pts_correction_last_dts) } -// Custom: GetSubCharenc gets `AVCodecContext.sub_charenc` value. +// GetSubCharenc gets `AVCodecContext.sub_charenc` value. func (avctx *AVCodecContext) GetSubCharenc() string { return C.GoString(avctx.sub_charenc) } -// Custom: GetSubCharencMode gets `AVCodecContext.sub_charenc_mode` value. +// GetSubCharencMode gets `AVCodecContext.sub_charenc_mode` value. func (avctx *AVCodecContext) GetSubCharencMode() int32 { return (int32)(avctx.sub_charenc_mode) } -// Custom: SetSubCharencMode sets `AVCodecContext.sub_charenc_mode` value. +// SetSubCharencMode sets `AVCodecContext.sub_charenc_mode` value. func (avctx *AVCodecContext) SetSubCharencMode(v int32) { avctx.sub_charenc_mode = (C.int)(v) } -// Custom: GetSubCharencModeAddr gets `AVCodecContext.sub_charenc_mode` address. +// GetSubCharencModeAddr gets `AVCodecContext.sub_charenc_mode` address. func (avctx *AVCodecContext) GetSubCharencModeAddr() *int32 { return (*int32)(&avctx.sub_charenc_mode) } @@ -3026,47 +3361,53 @@ const ( FF_SUB_CHARENC_MODE_IGNORE = int32(C.FF_SUB_CHARENC_MODE_IGNORE) ) -// Custom: GetSkipAlpha gets `AVCodecContext.skip_alpha` value. +// GetSkipAlpha gets `AVCodecContext.skip_alpha` value. func (avctx *AVCodecContext) GetSkipAlpha() int32 { return (int32)(avctx.skip_alpha) } -// Custom: SetSkipAlpha sets `AVCodecContext.skip_alpha` value. +// SetSkipAlpha sets `AVCodecContext.skip_alpha` value. func (avctx *AVCodecContext) SetSkipAlpha(v int32) { avctx.skip_alpha = (C.int)(v) } -// Custom: GetSkipAlphaAddr gets `AVCodecContext.skip_alpha` address. +// GetSkipAlphaAddr gets `AVCodecContext.skip_alpha` address. func (avctx *AVCodecContext) GetSkipAlphaAddr() *int32 { return (*int32)(&avctx.skip_alpha) } -// Custom: GetSeekPreroll gets `AVCodecContext.seek_preroll` value. +// GetSeekPreroll gets `AVCodecContext.seek_preroll` value. func (avctx *AVCodecContext) GetSeekPreroll() int32 { return (int32)(avctx.seek_preroll) } -// Custom: SetSeekPreroll sets `AVCodecContext.seek_preroll` value. +// SetSeekPreroll sets `AVCodecContext.seek_preroll` value. func (avctx *AVCodecContext) SetSeekPreroll(v int32) { avctx.seek_preroll = (C.int)(v) } -// Custom: GetSeekPrerollAddr gets `AVCodecContext.seek_preroll` address. +// GetSeekPrerollAddr gets `AVCodecContext.seek_preroll` address. func (avctx *AVCodecContext) GetSeekPrerollAddr() *int32 { return (*int32)(&avctx.seek_preroll) } -// Custom: GetDebugMv gets `AVCodecContext.debug_mv` value. +// Deprecated: Unused. +// +// GetDebugMv gets `AVCodecContext.debug_mv` value. func (avctx *AVCodecContext) GetDebugMv() int32 { return (int32)(avctx.debug_mv) } -// Custom: SetDebugMv sets `AVCodecContext.debug_mv` value. +// Deprecated: Unused. +// +// SetDebugMv sets `AVCodecContext.debug_mv` value. func (avctx *AVCodecContext) SetDebugMv(v int32) { avctx.debug_mv = (C.int)(v) } -// Custom: GetDebugMvAddr gets `AVCodecContext.debug_mv` address. +// Deprecated: Unused. +// +// GetDebugMvAddr gets `AVCodecContext.debug_mv` address. func (avctx *AVCodecContext) GetDebugMvAddr() *int32 { return (*int32)(&avctx.debug_mv) } @@ -3077,112 +3418,112 @@ const ( FF_DEBUG_VIS_MV_B_BACK = int32(C.FF_DEBUG_VIS_MV_B_BACK) ) -// Custom: GetChromaIntraMatrix gets `AVCodecContext.chroma_intra_matrix` value. +// GetChromaIntraMatrix gets `AVCodecContext.chroma_intra_matrix` value. func (avctx *AVCodecContext) GetChromaIntraMatrix() *uint16 { return (*uint16)(avctx.chroma_intra_matrix) } -// Custom: SetChromaIntraMatrix sets `AVCodecContext.chroma_intra_matrix` value. +// SetChromaIntraMatrix sets `AVCodecContext.chroma_intra_matrix` value. func (avctx *AVCodecContext) SetChromaIntraMatrix(v *uint16) { avctx.chroma_intra_matrix = (*C.uint16_t)(v) } -// Custom: GetChromaIntraMatrixAddr gets `AVCodecContext.chroma_intra_matrix` address. +// GetChromaIntraMatrixAddr gets `AVCodecContext.chroma_intra_matrix` address. func (avctx *AVCodecContext) GetChromaIntraMatrixAddr() **uint16 { return (**uint16)(unsafe.Pointer(&avctx.chroma_intra_matrix)) } -// Custom: GetDumpSeparator gets `AVCodecContext.dump_separator` value. +// GetDumpSeparator gets `AVCodecContext.dump_separator` value. func (avctx *AVCodecContext) GetDumpSeparator() *uint8 { return (*uint8)(avctx.dump_separator) } -// Custom: SetDumpSeparator sets `AVCodecContext.dump_separator` value. +// SetDumpSeparator sets `AVCodecContext.dump_separator` value. func (avctx *AVCodecContext) SetDumpSeparator(v *uint8) { avctx.dump_separator = (*C.uint8_t)(v) } -// Custom: GetDumpSeparatorAddr gets `AVCodecContext.dump_separator` address. +// GetDumpSeparatorAddr gets `AVCodecContext.dump_separator` address. func (avctx *AVCodecContext) GetDumpSeparatorAddr() **uint8 { return (**uint8)(unsafe.Pointer(&avctx.dump_separator)) } -// Custom: GetCodecWhitelist gets `AVCodecContext.codec_whitelist` value. +// GetCodecWhitelist gets `AVCodecContext.codec_whitelist` value. func (avctx *AVCodecContext) GetCodecWhitelist() string { return C.GoString(avctx.codec_whitelist) } -// Custom: GetProperties gets `AVCodecContext.properties` value. +// GetProperties gets `AVCodecContext.properties` value. func (avctx *AVCodecContext) GetProperties() uint32 { return (uint32)(avctx.properties) } -// Custom: SetProperties sets `AVCodecContext.properties` value. +// SetProperties sets `AVCodecContext.properties` value. func (avctx *AVCodecContext) SetProperties(v uint32) { avctx.properties = (C.uint)(v) } -// Custom: GetPropertiesAddr gets `AVCodecContext.properties` address. +// GetPropertiesAddr gets `AVCodecContext.properties` address. func (avctx *AVCodecContext) GetPropertiesAddr() *uint32 { return (*uint32)(&avctx.properties) } -// Custom: GetCodedSideData gets `AVCodecContext.coded_side_data` value. +// GetCodedSideData gets `AVCodecContext.coded_side_data` value. func (avctx *AVCodecContext) GetCodedSideData() *AVPacketSideData { return (*AVPacketSideData)(avctx.coded_side_data) } -// Custom: SetCodedSideData sets `AVCodecContext.coded_side_data` value. +// SetCodedSideData sets `AVCodecContext.coded_side_data` value. func (avctx *AVCodecContext) SetCodedSideData(v *AVPacketSideData) { avctx.coded_side_data = (*C.AVPacketSideData)(v) } -// Custom: GetCodedSideDataAddr gets `AVCodecContext.coded_side_data` address. +// GetCodedSideDataAddr gets `AVCodecContext.coded_side_data` address. func (avctx *AVCodecContext) GetCodedSideDataAddr() **AVPacketSideData { return (**AVPacketSideData)(unsafe.Pointer(&avctx.coded_side_data)) } -// Custom: GetNbCodedSideData gets `AVCodecContext.nb_coded_side_data` value. +// GetNbCodedSideData gets `AVCodecContext.nb_coded_side_data` value. func (avctx *AVCodecContext) GetNbCodedSideData() int32 { return (int32)(avctx.nb_coded_side_data) } -// Custom: SetNbCodedSideData sets `AVCodecContext.nb_coded_side_data` value. +// SetNbCodedSideData sets `AVCodecContext.nb_coded_side_data` value. func (avctx *AVCodecContext) SetNbCodedSideData(v int32) { avctx.nb_coded_side_data = (C.int)(v) } -// Custom: GetNbCodedSideDataAddr gets `AVCodecContext.nb_coded_side_data` address. +// GetNbCodedSideDataAddr gets `AVCodecContext.nb_coded_side_data` address. func (avctx *AVCodecContext) GetNbCodedSideDataAddr() *int32 { return (*int32)(&avctx.nb_coded_side_data) } -// Custom: GetHwFramesCtx gets `AVCodecContext.hw_frames_ctx` value. +// GetHwFramesCtx gets `AVCodecContext.hw_frames_ctx` value. func (avctx *AVCodecContext) GetHwFramesCtx() *AVBufferRef { return (*AVBufferRef)(avctx.hw_frames_ctx) } -// Custom: SetHwFramesCtx sets `AVCodecContext.hw_frames_ctx` value. +// SetHwFramesCtx sets `AVCodecContext.hw_frames_ctx` value. func (avctx *AVCodecContext) SetHwFramesCtx(v *AVBufferRef) { avctx.hw_frames_ctx = (*C.AVBufferRef)(v) } -// Custom: GetHwFramesCtxAddr gets `AVCodecContext.hw_frames_ctx` address. +// GetHwFramesCtxAddr gets `AVCodecContext.hw_frames_ctx` address. func (avctx *AVCodecContext) GetHwFramesCtxAddr() **AVBufferRef { return (**AVBufferRef)(unsafe.Pointer(&avctx.hw_frames_ctx)) } -// Custom: GetSubTextFormat gets `AVCodecContext.sub_text_format` value. +// GetSubTextFormat gets `AVCodecContext.sub_text_format` value. func (avctx *AVCodecContext) GetSubTextFormat() int32 { return (int32)(avctx.sub_text_format) } -// Custom: SetSubTextFormat sets `AVCodecContext.sub_text_format` value. +// SetSubTextFormat sets `AVCodecContext.sub_text_format` value. func (avctx *AVCodecContext) SetSubTextFormat(v int32) { avctx.sub_text_format = (C.int)(v) } -// Custom: GetSubTextFormatAddr gets `AVCodecContext.sub_text_format` address. +// GetSubTextFormatAddr gets `AVCodecContext.sub_text_format` address. func (avctx *AVCodecContext) GetSubTextFormatAddr() *int32 { return (*int32)(&avctx.sub_text_format) } @@ -3192,137 +3533,137 @@ const ( FF_SUB_TEXT_FMT_ASS_WITH_TIMINGS = int32(C.FF_SUB_TEXT_FMT_ASS_WITH_TIMINGS) ) -// Custom: GetTrailingPadding gets `AVCodecContext.trailing_padding` value. +// GetTrailingPadding gets `AVCodecContext.trailing_padding` value. func (avctx *AVCodecContext) GetTrailingPadding() int32 { return (int32)(avctx.trailing_padding) } -// Custom: SetTrailingPadding sets `AVCodecContext.trailing_padding` value. +// SetTrailingPadding sets `AVCodecContext.trailing_padding` value. func (avctx *AVCodecContext) SetTrailingPadding(v int32) { avctx.trailing_padding = (C.int)(v) } -// Custom: GetTrailingPaddingAddr gets `AVCodecContext.trailing_padding` address. +// GetTrailingPaddingAddr gets `AVCodecContext.trailing_padding` address. func (avctx *AVCodecContext) GetTrailingPaddingAddr() *int32 { return (*int32)(&avctx.trailing_padding) } -// Custom: GetMaxPixels gets `AVCodecContext.max_pixels` value. +// GetMaxPixels gets `AVCodecContext.max_pixels` value. func (avctx *AVCodecContext) GetMaxPixels() int64 { return (int64)(avctx.max_pixels) } -// Custom: SetMaxPixels sets `AVCodecContext.max_pixels` value. +// SetMaxPixels sets `AVCodecContext.max_pixels` value. func (avctx *AVCodecContext) SetMaxPixels(v int64) { avctx.max_pixels = (C.int64_t)(v) } -// Custom: GetMaxPixelsAddr gets `AVCodecContext.max_pixels` address. +// GetMaxPixelsAddr gets `AVCodecContext.max_pixels` address. func (avctx *AVCodecContext) GetMaxPixelsAddr() *int64 { return (*int64)(&avctx.max_pixels) } -// Custom: GetHwDeviceCtx gets `AVCodecContext.hw_device_ctx` value. +// GetHwDeviceCtx gets `AVCodecContext.hw_device_ctx` value. func (avctx *AVCodecContext) GetHwDeviceCtx() *AVBufferRef { return (*AVBufferRef)(avctx.hw_device_ctx) } -// Custom: SetHwDeviceCtx sets `AVCodecContext.hw_device_ctx` value. +// SetHwDeviceCtx sets `AVCodecContext.hw_device_ctx` value. func (avctx *AVCodecContext) SetHwDeviceCtx(v *AVBufferRef) { avctx.hw_device_ctx = (*C.AVBufferRef)(v) } -// Custom: GetHwDeviceCtxAddr gets `AVCodecContext.hw_device_ctx` address. +// GetHwDeviceCtxAddr gets `AVCodecContext.hw_device_ctx` address. func (avctx *AVCodecContext) GetHwDeviceCtxAddr() **AVBufferRef { return (**AVBufferRef)(unsafe.Pointer(&avctx.hw_device_ctx)) } -// Custom: GetHwaccelFlags gets `AVCodecContext.hwaccel_flags` value. +// GetHwaccelFlags gets `AVCodecContext.hwaccel_flags` value. func (avctx *AVCodecContext) GetHwaccelFlags() int32 { return (int32)(avctx.hwaccel_flags) } -// Custom: SetHwaccelFlags sets `AVCodecContext.hwaccel_flags` value. +// SetHwaccelFlags sets `AVCodecContext.hwaccel_flags` value. func (avctx *AVCodecContext) SetHwaccelFlags(v int32) { avctx.hwaccel_flags = (C.int)(v) } -// Custom: GetHwaccelFlagsAddr gets `AVCodecContext.hwaccel_flags` address. +// GetHwaccelFlagsAddr gets `AVCodecContext.hwaccel_flags` address. func (avctx *AVCodecContext) GetHwaccelFlagsAddr() *int32 { return (*int32)(&avctx.hwaccel_flags) } -// Custom: GetApplyCropping gets `AVCodecContext.apply_cropping` value. +// GetApplyCropping gets `AVCodecContext.apply_cropping` value. func (avctx *AVCodecContext) GetApplyCropping() int32 { return (int32)(avctx.apply_cropping) } -// Custom: SetApplyCropping sets `AVCodecContext.apply_cropping` value. +// SetApplyCropping sets `AVCodecContext.apply_cropping` value. func (avctx *AVCodecContext) SetApplyCropping(v int32) { avctx.apply_cropping = (C.int)(v) } -// Custom: GetApplyCroppingAddr gets `AVCodecContext.apply_cropping` address. +// GetApplyCroppingAddr gets `AVCodecContext.apply_cropping` address. func (avctx *AVCodecContext) GetApplyCroppingAddr() *int32 { return (*int32)(&avctx.apply_cropping) } -// Custom: GetExtraHwFrames gets `AVCodecContext.extra_hw_frames` value. +// GetExtraHwFrames gets `AVCodecContext.extra_hw_frames` value. func (avctx *AVCodecContext) GetExtraHwFrames() int32 { return (int32)(avctx.extra_hw_frames) } -// Custom: SetExtraHwFrames sets `AVCodecContext.extra_hw_frames` value. +// SetExtraHwFrames sets `AVCodecContext.extra_hw_frames` value. func (avctx *AVCodecContext) SetExtraHwFrames(v int32) { avctx.extra_hw_frames = (C.int)(v) } -// Custom: GetExtraHwFramesAddr gets `AVCodecContext.extra_hw_frames` address. +// GetExtraHwFramesAddr gets `AVCodecContext.extra_hw_frames` address. func (avctx *AVCodecContext) GetExtraHwFramesAddr() *int32 { return (*int32)(&avctx.extra_hw_frames) } -// Custom: GetDiscardDamagedPercentage gets `AVCodecContext.discard_damaged_percentage` value. +// GetDiscardDamagedPercentage gets `AVCodecContext.discard_damaged_percentage` value. func (avctx *AVCodecContext) GetDiscardDamagedPercentage() int32 { return (int32)(avctx.discard_damaged_percentage) } -// Custom: SetDiscardDamagedPercentage sets `AVCodecContext.discard_damaged_percentage` value. +// SetDiscardDamagedPercentage sets `AVCodecContext.discard_damaged_percentage` value. func (avctx *AVCodecContext) SetDiscardDamagedPercentage(v int32) { avctx.discard_damaged_percentage = (C.int)(v) } -// Custom: GetDiscardDamagedPercentageAddr gets `AVCodecContext.discard_damaged_percentage` address. +// GetDiscardDamagedPercentageAddr gets `AVCodecContext.discard_damaged_percentage` address. func (avctx *AVCodecContext) GetDiscardDamagedPercentageAddr() *int32 { return (*int32)(&avctx.discard_damaged_percentage) } -// Custom: GetMaxSamples gets `AVCodecContext.max_samples` value. +// GetMaxSamples gets `AVCodecContext.max_samples` value. func (avctx *AVCodecContext) GetMaxSamples() int64 { return (int64)(avctx.max_samples) } -// Custom: SetMaxSamples sets `AVCodecContext.max_samples` value. +// SetMaxSamples sets `AVCodecContext.max_samples` value. func (avctx *AVCodecContext) SetMaxSamples(v int64) { avctx.max_samples = (C.int64_t)(v) } -// Custom: GetMaxSamplesAddr gets `AVCodecContext.max_samples` address. +// GetMaxSamplesAddr gets `AVCodecContext.max_samples` address. func (avctx *AVCodecContext) GetMaxSamplesAddr() *int64 { return (*int64)(&avctx.max_samples) } -// Custom: GetExportSideData gets `AVCodecContext.export_side_data` value. +// GetExportSideData gets `AVCodecContext.export_side_data` value. func (avctx *AVCodecContext) GetExportSideData() int32 { return (int32)(avctx.export_side_data) } -// Custom: SetExportSideData sets `AVCodecContext.export_side_data` value. +// SetExportSideData sets `AVCodecContext.export_side_data` value. func (avctx *AVCodecContext) SetExportSideData(v int32) { avctx.export_side_data = (C.int)(v) } -// Custom: GetExportSideDataAddr gets `AVCodecContext.export_side_data` address. +// GetExportSideDataAddr gets `AVCodecContext.export_side_data` address. func (avctx *AVCodecContext) GetExportSideDataAddr() *int32 { return (*int32)(&avctx.export_side_data) } @@ -3331,62 +3672,94 @@ func (avctx *AVCodecContext) GetExportSideDataAddr() *int32 { // AvPacket *pkt, int flags); type AVCodecContextGetEncodeBufferFunc = C.avcodec_context_get_encode_buffer_func -// Custom: SetGetEncodeBuffer sets `AVCodecContext.get_encode_buffer` value. +// GetGetEncodeBuffer gets `AVCodecContext.get_encode_buffer` value. +func (avctx *AVCodecContext) GetGetEncodeBuffer() AVCodecContextGetEncodeBufferFunc { + return (AVCodecContextGetEncodeBufferFunc)(avctx.get_encode_buffer) +} + +// SetGetEncodeBuffer sets `AVCodecContext.get_encode_buffer` value. func (avctx *AVCodecContext) SetGetEncodeBuffer(v AVCodecContextGetEncodeBufferFunc) { avctx.get_encode_buffer = (C.avcodec_context_get_encode_buffer_func)(v) } -// Deprecated: No use +// GetGetEncodeBufferAddr gets `AVCodecContext.get_encode_buffer` address. +func (avctx *AVCodecContext) GetGetEncodeBufferAddr() *AVCodecContextGetEncodeBufferFunc { + return (*AVCodecContextGetEncodeBufferFunc)(&avctx.get_encode_buffer) +} + +// Deprecated: No use. +// +// AvCodecGetPktTimebase func AvCodecGetPktTimebase(avctx *AVCodecContext) AVRational { return AVRational(C.av_codec_get_pkt_timebase((*C.struct_AVCodecContext)(avctx))) } -// Deprecated: No use +// Deprecated: No use. +// +// AvCodecSetPktTimebase func AvCodecSetPktTimebase(avctx *AVCodecContext, r AVRational) { C.av_codec_set_pkt_timebase((*C.struct_AVCodecContext)(avctx), (C.struct_AVRational)(r)) } -// Deprecated: No use +// Deprecated: No use. +// +// AvCodecGetCodecDescriptor func AvCodecGetCodecDescriptor(avctx *AVCodecContext) *AVCodecDescriptor { return (*AVCodecDescriptor)(C.av_codec_get_codec_descriptor((*C.struct_AVCodecContext)(avctx))) } -// Deprecated: No use +// Deprecated: No use. +// +// AvCodecSetCodecDescriptor func AvCodecSetCodecDescriptor(avctx *AVCodecContext, d *AVCodecDescriptor) { C.av_codec_set_codec_descriptor((*C.struct_AVCodecContext)(avctx), (*C.struct_AVCodecDescriptor)(d)) } -// Deprecated: No use +// Deprecated: No use. +// +// AvCodecGetLowres func AvCodecGetLowres(avctx *AVCodecContext) int32 { return (int32)(C.av_codec_get_lowres((*C.struct_AVCodecContext)(avctx))) } -// Deprecated: No use +// Deprecated: No use. +// +// AvCodecSetLowres func AvCodecSetLowres(avctx *AVCodecContext, i int32) { C.av_codec_set_lowres((*C.struct_AVCodecContext)(avctx), C.int(i)) } -// Deprecated: No use +// Deprecated: No use. +// +// AvCodecGetSeekPreroll func AvCodecGetSeekPreroll(avctx *AVCodecContext) int32 { return (int32)(C.av_codec_get_seek_preroll((*C.struct_AVCodecContext)(avctx))) } -// Deprecated: No use +// Deprecated: No use. +// +// AvCodecSetSeekPreroll func AvCodecSetSeekPreroll(avctx *AVCodecContext, i int32) { C.av_codec_set_seek_preroll((*C.struct_AVCodecContext)(avctx), C.int(i)) } -// Deprecated: No use +// Deprecated: No use. +// +// AvCodecGetChromaIntraMatrix func AvCodecGetChromaIntraMatrix(avctx *AVCodecContext) *uint16 { return (*uint16)(C.av_codec_get_chroma_intra_matrix((*C.struct_AVCodecContext)(avctx))) } -// Deprecated: No use +// Deprecated: No use. +// +// AvCodecSetChromaIntraMatrix func AvCodecSetChromaIntraMatrix(avctx *AVCodecContext, t *uint16) { C.av_codec_set_chroma_intra_matrix((*C.struct_AVCodecContext)(avctx), (*C.uint16_t)(t)) } -// Deprecated: No use +// Deprecated: No use. +// +// AvCodecGetMaxLowres func AvCodecGetMaxLowres(c *AVCodec) int32 { return (int32)(C.av_codec_get_max_lowres((*C.struct_AVCodec)(c))) } @@ -3397,67 +3770,67 @@ type MpegEncContext C.struct_MpegEncContext // AVHWAccel type AVHWAccel C.struct_AVHWAccel -// Custom: GetName gets `AVHWAccel.name` value. +// GetName gets `AVHWAccel.name` value. func (hwa *AVHWAccel) GetName() string { return C.GoString(hwa.name) } -// Custom: GetType gets `AVHWAccel.type` value. +// GetType gets `AVHWAccel.type` value. func (hwa *AVHWAccel) GetType() AVMediaType { return (AVMediaType)(hwa._type) } -// Custom: SetType sets `AVHWAccel.type` value. +// SetType sets `AVHWAccel.type` value. func (hwa *AVHWAccel) SetType(v AVMediaType) { hwa._type = (C.enum_AVMediaType)(v) } -// Custom: GetTypeAddr gets `AVHWAccel.type` address. +// GetTypeAddr gets `AVHWAccel.type` address. func (hwa *AVHWAccel) GetTypeAddr() *AVMediaType { return (*AVMediaType)(&hwa._type) } -// Custom: GetId gets `AVHWAccel.id` value. +// GetId gets `AVHWAccel.id` value. func (hwa *AVHWAccel) GetId() AVCodecID { return (AVCodecID)(hwa.id) } -// Custom: SetId sets `AVHWAccel.id` value. +// SetId sets `AVHWAccel.id` value. func (hwa *AVHWAccel) SetId(v AVCodecID) { hwa.id = (C.enum_AVCodecID)(v) } -// Custom: GetIdAddr gets `AVHWAccel.id` address. +// GetIdAddr gets `AVHWAccel.id` address. func (hwa *AVHWAccel) GetIdAddr() *AVCodecID { return (*AVCodecID)(&hwa.id) } -// Custom: GetPixFmt gets `AVHWAccel.pix_fmt` value. +// GetPixFmt gets `AVHWAccel.pix_fmt` value. func (hwa *AVHWAccel) GetPixFmt() AVPixelFormat { return (AVPixelFormat)(hwa.pix_fmt) } -// Custom: SetPixFmt sets `AVHWAccel.pix_fmt` value. +// SetPixFmt sets `AVHWAccel.pix_fmt` value. func (hwa *AVHWAccel) SetPixFmt(v AVPixelFormat) { hwa.pix_fmt = (C.enum_AVPixelFormat)(v) } -// Custom: GetPixFmtAddr gets `AVHWAccel.pix_fmt` address. +// GetPixFmtAddr gets `AVHWAccel.pix_fmt` address. func (hwa *AVHWAccel) GetPixFmtAddr() *AVPixelFormat { return (*AVPixelFormat)(&hwa.pix_fmt) } -// Custom: GetCapabilities gets `AVHWAccel.capabilities` value. +// GetCapabilities gets `AVHWAccel.capabilities` value. func (hwa *AVHWAccel) GetCapabilities() int32 { return (int32)(hwa.capabilities) } -// Custom: SetCapabilities sets `AVHWAccel.capabilities` value. +// SetCapabilities sets `AVHWAccel.capabilities` value. func (hwa *AVHWAccel) SetCapabilities(v int32) { hwa.capabilities = (C.int)(v) } -// Custom: GetCapabilitiesAddr gets `AVHWAccel.capabilities` address. +// GetCapabilitiesAddr gets `AVHWAccel.capabilities` address. func (hwa *AVHWAccel) GetCapabilitiesAddr() *int32 { return (*int32)(&hwa.capabilities) } @@ -3472,36 +3845,48 @@ const ( // AVPicture type AVPicture C.struct_AVPicture -// Custom: GetData gets `AVPicture.data` value. +// Deprecated: No use. +// +// GetData gets `AVPicture.data` value. func (pct *AVPicture) GetData() []*uint8 { return unsafe.Slice((**uint8)(unsafe.Pointer(&pct.data[0])), AV_NUM_DATA_POINTERS) } -// Custom: SetData sets `AVPicture.data` value. +// Deprecated: No use. +// +// SetData sets `AVPicture.data` value. func (pct *AVPicture) SetData(v []*uint8) { for i := 0; i < FFMIN(len(v), AV_NUM_DATA_POINTERS); i++ { pct.data[i] = (*C.uint8_t)(v[i]) } } -// Custom: GetDataAddr gets `AVPicture.data` address. +// Deprecated: No use. +// +// GetDataAddr gets `AVPicture.data` address. func (pct *AVPicture) GetDataAddr() ***uint8 { return (***uint8)(unsafe.Pointer(&pct.data)) } -// Custom: GetLinesize gets `AVPicture.linesize` value. +// Deprecated: No use. +// +// GetLinesize gets `AVPicture.linesize` value. func (pct *AVPicture) GetLinesize() []int32 { return unsafe.Slice((*int32)(&pct.linesize[0]), AV_NUM_DATA_POINTERS) } -// Custom: SetLinesize sets `AVPicture.linesize` value. +// Deprecated: No use. +// +// SetLinesize sets `AVPicture.linesize` value. func (pct *AVPicture) SetLinesize(v []int32) { for i := 0; i < FFMIN(len(v), AV_NUM_DATA_POINTERS); i++ { pct.linesize[i] = (C.int)(v[i]) } } -// Custom: GetLinesizeAddr gets `AVPicture.linesize` address. +// Deprecated: No use. +// +// GetLinesizeAddr gets `AVPicture.linesize` address. func (pct *AVPicture) GetLinesizeAddr() **int32 { return (**int32)(unsafe.Pointer(&pct.linesize)) } @@ -3521,166 +3906,172 @@ const AV_SUBTITLE_FLAG_FORCED = C.AV_SUBTITLE_FLAG_FORCED // AVSubtitleRect type AVSubtitleRect C.struct_AVSubtitleRect -// Custom: GetX gets `AVSubtitleRect.x` value. +// GetX gets `AVSubtitleRect.x` value. func (sbtr *AVSubtitleRect) GetX() int32 { return (int32)(sbtr.x) } -// Custom: SetX sets `AVSubtitleRect.x` value. +// SetX sets `AVSubtitleRect.x` value. func (sbtr *AVSubtitleRect) SetX(v int32) { sbtr.x = (C.int)(v) } -// Custom: GetXAddr gets `AVSubtitleRect.x` address. +// GetXAddr gets `AVSubtitleRect.x` address. func (sbtr *AVSubtitleRect) GetXAddr() *int32 { return (*int32)(&sbtr.x) } -// Custom: GetY gets `AVSubtitleRect.y` value. +// GetY gets `AVSubtitleRect.y` value. func (sbtr *AVSubtitleRect) GetY() int32 { return (int32)(sbtr.y) } -// Custom: SetY sets `AVSubtitleRect.y` value. +// SetY sets `AVSubtitleRect.y` value. func (sbtr *AVSubtitleRect) SetY(v int32) { sbtr.y = (C.int)(v) } -// Custom: GetYAddr gets `AVSubtitleRect.y` address. +// GetYAddr gets `AVSubtitleRect.y` address. func (sbtr *AVSubtitleRect) GetYAddr() *int32 { return (*int32)(&sbtr.y) } -// Custom: GetW gets `AVSubtitleRect.w` value. +// GetW gets `AVSubtitleRect.w` value. func (sbtr *AVSubtitleRect) GetW() int32 { return (int32)(sbtr.w) } -// Custom: SetW sets `AVSubtitleRect.w` value. +// SetW sets `AVSubtitleRect.w` value. func (sbtr *AVSubtitleRect) SetW(v int32) { sbtr.w = (C.int)(v) } -// Custom: GetWAddr gets `AVSubtitleRect.w` address. +// GetWAddr gets `AVSubtitleRect.w` address. func (sbtr *AVSubtitleRect) GetWAddr() *int32 { return (*int32)(&sbtr.w) } -// Custom: GetH gets `AVSubtitleRect.h` value. +// GetH gets `AVSubtitleRect.h` value. func (sbtr *AVSubtitleRect) GetH() int32 { return (int32)(sbtr.h) } -// Custom: SetH sets `AVSubtitleRect.h` value. +// SetH sets `AVSubtitleRect.h` value. func (sbtr *AVSubtitleRect) SetH(v int32) { sbtr.h = (C.int)(v) } -// Custom: GetHAddr gets `AVSubtitleRect.h` address. +// GetHAddr gets `AVSubtitleRect.h` address. func (sbtr *AVSubtitleRect) GetHAddr() *int32 { return (*int32)(&sbtr.h) } -// Custom: GetNbColors gets `AVSubtitleRect.nb_colors` value. +// GetNbColors gets `AVSubtitleRect.nb_colors` value. func (sbtr *AVSubtitleRect) GetNbColors() int32 { return (int32)(sbtr.nb_colors) } -// Custom: SetNbColors sets `AVSubtitleRect.nb_colors` value. +// SetNbColors sets `AVSubtitleRect.nb_colors` value. func (sbtr *AVSubtitleRect) SetNbColors(v int32) { sbtr.nb_colors = (C.int)(v) } -// Custom: GetNbColorsAddr gets `AVSubtitleRect.nb_colors` address. +// GetNbColorsAddr gets `AVSubtitleRect.nb_colors` address. func (sbtr *AVSubtitleRect) GetNbColorsAddr() *int32 { return (*int32)(&sbtr.nb_colors) } -// Custom: GetPict gets `AVSubtitleRect.pict` value. +// Deprecated: Unused. +// +// GetPict gets `AVSubtitleRect.pict` value. func (sbtr *AVSubtitleRect) GetPict() AVPicture { return (AVPicture)(sbtr.pict) } -// Custom: SetPict sets `AVSubtitleRect.pict` value. +// Deprecated: Unused. +// +// SetPict sets `AVSubtitleRect.pict` value. func (sbtr *AVSubtitleRect) SetPict(v AVPicture) { sbtr.pict = (C.struct_AVPicture)(v) } -// Custom: GetPictAddr gets `AVSubtitleRect.pict` address. +// Deprecated: Unused. +// +// GetPictAddr gets `AVSubtitleRect.pict` address. func (sbtr *AVSubtitleRect) GetPictAddr() *AVPicture { return (*AVPicture)(&sbtr.pict) } -// Custom: GetData gets `AVSubtitleRect.data` value. +// GetData gets `AVSubtitleRect.data` value. func (sbtr *AVSubtitleRect) GetData() []*uint8 { return unsafe.Slice((**uint8)(unsafe.Pointer(&sbtr.data[0])), 4) } -// Custom: SetData sets `AVSubtitleRect.data` value. +// SetData sets `AVSubtitleRect.data` value. func (sbtr *AVSubtitleRect) SetData(v []*uint8) { for i := 0; i < FFMIN(len(v), 4); i++ { sbtr.data[i] = (*C.uint8_t)(v[i]) } } -// Custom: GetDataAddr gets `AVSubtitleRect.data` address. +// GetDataAddr gets `AVSubtitleRect.data` address. func (sbtr *AVSubtitleRect) GetDataAddr() ***uint8 { return (***uint8)(unsafe.Pointer(&sbtr.data)) } -// Custom: GetLinesize gets `AVSubtitleRect.linesize` value. +// GetLinesize gets `AVSubtitleRect.linesize` value. func (sbtr *AVSubtitleRect) GetLinesize() []int32 { return unsafe.Slice((*int32)(&sbtr.linesize[0]), 4) } -// Custom: SetLinesize sets `AVSubtitleRect.linesize` value. +// SetLinesize sets `AVSubtitleRect.linesize` value. func (sbtr *AVSubtitleRect) SetLinesize(v []int32) { for i := 0; i < FFMIN(len(v), 4); i++ { sbtr.linesize[i] = (C.int)(v[i]) } } -// Custom: GetLinesize gets `AVSubtitleRect.linesize` address. +// GetLinesize gets `AVSubtitleRect.linesize` address. func (sbtr *AVSubtitleRect) GetLinesizeAddr() **int32 { return (**int32)(unsafe.Pointer(&sbtr.linesize)) } -// Custom: GetType gets `AVSubtitleRect.type` value. +// GetType gets `AVSubtitleRect.type` value. func (sbtr *AVSubtitleRect) GetType() AVSubtitleType { return (AVSubtitleType)(sbtr._type) } -// Custom: SetType sets `AVSubtitleRect.type` value. +// SetType sets `AVSubtitleRect.type` value. func (sbtr *AVSubtitleRect) SetType(v AVSubtitleType) { sbtr._type = (C.enum_AVSubtitleType)(v) } -// Custom: GetTypeAddr gets `AVSubtitleRect.type` address. +// GetTypeAddr gets `AVSubtitleRect.type` address. func (sbtr *AVSubtitleRect) GetTypeAddr() *AVSubtitleType { return (*AVSubtitleType)(&sbtr._type) } -// Custom: GetText gets `AVSubtitleRect.text` value. +// GetText gets `AVSubtitleRect.text` value. func (sbtr *AVSubtitleRect) GetText() string { return C.GoString(sbtr.text) } -// Custom: GetAss gets `AVSubtitleRect.ass` value. +// GetAss gets `AVSubtitleRect.ass` value. func (sbtr *AVSubtitleRect) GetAss() string { return C.GoString(sbtr.ass) } -// Custom: GetFlags gets `AVSubtitleRect.flags` value. +// GetFlags gets `AVSubtitleRect.flags` value. func (sbtr *AVSubtitleRect) GetFlags() int32 { return (int32)(sbtr.flags) } -// Custom: SetFlags sets `AVSubtitleRect.flags` value. +// SetFlags sets `AVSubtitleRect.flags` value. func (sbtr *AVSubtitleRect) SetFlags(v int32) { sbtr.flags = (C.int)(v) } -// Custom: GetFlagsAddr gets `AVSubtitleRect.flags` address. +// GetFlagsAddr gets `AVSubtitleRect.flags` address. func (sbtr *AVSubtitleRect) GetFlagsAddr() *int32 { return (*int32)(&sbtr.flags) } @@ -3688,67 +4079,67 @@ func (sbtr *AVSubtitleRect) GetFlagsAddr() *int32 { // AVSubtitle type AVSubtitle C.struct_AVSubtitle -// Custom: GetFormat gets `AVSubtitle.format` value. +// GetFormat gets `AVSubtitle.format` value. func (sbt *AVSubtitle) GetFormat() uint16 { return (uint16)(sbt.format) } -// Custom: SetFormat sets `AVSubtitle.format` value. +// SetFormat sets `AVSubtitle.format` value. func (sbt *AVSubtitle) SetFormat(v uint16) { sbt.format = (C.uint16_t)(v) } -// Custom: GetFormatAddr gets `AVSubtitle.format` address. +// GetFormatAddr gets `AVSubtitle.format` address. func (sbt *AVSubtitle) GetFormatAddr() *uint16 { return (*uint16)(&sbt.format) } -// Custom: GetStartDisplayTime gets `AVSubtitle.start_display_time` value. +// GetStartDisplayTime gets `AVSubtitle.start_display_time` value. func (sbt *AVSubtitle) GetStartDisplayTime() uint32 { return (uint32)(sbt.start_display_time) } -// Custom: SetStartDisplayTime sets `AVSubtitle.start_display_time` value. +// SetStartDisplayTime sets `AVSubtitle.start_display_time` value. func (sbt *AVSubtitle) SetStartDisplayTime(v uint32) { sbt.start_display_time = (C.uint32_t)(v) } -// Custom: GetStartDisplayTimeAddr gets `AVSubtitle.start_display_time` address. +// GetStartDisplayTimeAddr gets `AVSubtitle.start_display_time` address. func (sbt *AVSubtitle) GetStartDisplayTimeAddr() *uint32 { return (*uint32)(&sbt.start_display_time) } -// Custom: GetEndDisplayTime gets `AVSubtitle.end_display_time` value. +// GetEndDisplayTime gets `AVSubtitle.end_display_time` value. func (sbt *AVSubtitle) GetEndDisplayTime() uint32 { return (uint32)(sbt.end_display_time) } -// Custom: SetEndDisplayTime sets `AVSubtitle.end_display_time` value. +// SetEndDisplayTime sets `AVSubtitle.end_display_time` value. func (sbt *AVSubtitle) SetEndDisplayTime(v uint32) { sbt.end_display_time = (C.uint32_t)(v) } -// Custom: GetEndDisplayTimeAddr gets `AVSubtitle.end_display_time` address. +// GetEndDisplayTimeAddr gets `AVSubtitle.end_display_time` address. func (sbt *AVSubtitle) GetEndDisplayTimeAddr() *uint32 { return (*uint32)(&sbt.end_display_time) } -// Custom: GetNumRects gets `AVSubtitle.num_rects` value. +// GetNumRects gets `AVSubtitle.num_rects` value. func (sbt *AVSubtitle) GetNumRects() uint32 { return (uint32)(sbt.num_rects) } -// Custom: SetNumRects sets `AVSubtitle.num_rects` value. +// SetNumRects sets `AVSubtitle.num_rects` value. func (sbt *AVSubtitle) SetNumRects(v uint32) { sbt.num_rects = (C.uint)(v) } -// Custom: GetNumRectsAddr gets `AVSubtitle.num_rects` address. +// GetNumRectsAddr gets `AVSubtitle.num_rects` address. func (sbt *AVSubtitle) GetNumRectsAddr() *uint32 { return (*uint32)(&sbt.num_rects) } -// Custom: GetRects gets `AVSubtitle.rects` value. +// GetRects gets `AVSubtitle.rects` value. func (sbt *AVSubtitle) GetRects() []*AVSubtitleRect { if sbt.rects == nil { return nil @@ -3756,33 +4147,35 @@ func (sbt *AVSubtitle) GetRects() []*AVSubtitleRect { return unsafe.Slice((**AVSubtitleRect)(unsafe.Pointer(sbt.rects)), sbt.num_rects) } -// Custom: SetRects sets `AVSubtitle.rects` value. +// SetRects sets `AVSubtitle.rects` value. func (sbt *AVSubtitle) SetRects(v **AVSubtitleRect) { sbt.rects = (**C.struct_AVSubtitleRect)(unsafe.Pointer(v)) } -// Custom: GetRectsAddr gets `AVSubtitle.rects` address. +// GetRectsAddr gets `AVSubtitle.rects` address. func (sbt *AVSubtitle) GetRectsAddr() ***AVSubtitleRect { return (***AVSubtitleRect)(unsafe.Pointer(&sbt.rects)) } -// Custom: GetPts gets `AVSubtitle.pts` value. +// GetPts gets `AVSubtitle.pts` value. func (sbt *AVSubtitle) GetPts() int64 { return (int64)(sbt.pts) } -// Custom: SetPts sets `AVSubtitle.pts` value. +// SetPts sets `AVSubtitle.pts` value. func (sbt *AVSubtitle) SetPts(v int64) { sbt.pts = (C.int64_t)(v) } -// Custom: GetPtsAddr gets `AVSubtitle.pts` address. +// GetPtsAddr gets `AVSubtitle.pts` address. func (sbt *AVSubtitle) GetPtsAddr() *int64 { return (*int64)(&sbt.pts) } -// If c is NULL, returns the first registered codec, -// if c is non-NULL, returns the next registered codec after c, +// Deprecated: No use. +// +// AvCodecNext returns the first registered codec if c is NULL, +// returns the next registered codec after c if c is non-NULL, // or NULL if c is the last one. func AvCodecNext(c *AVCodec) *AVCodec { return (*AVCodec)(C.av_codec_next((*C.struct_AVCodec)(c))) @@ -3799,11 +4192,15 @@ func AvCodecConfiguration() string { } // Deprecated: Calling this function is unnecessary. +// +// AvCodecRegister func AvCodecRegister(c *AVCodec) { C.avcodec_register((*C.struct_AVCodec)(c)) } // Deprecated: Calling this function is unnecessary. +// +// AvCodecRegisterAll func AvCodecRegisterAll() { C.avcodec_register_all() } @@ -3820,7 +4217,7 @@ func AvCodecFreeContext(avctx **AVCodecContext) { C.avcodec_free_context((**C.struct_AVCodecContext)(unsafe.Pointer(avctx))) } -// Deprecated: No use +// Deprecated: No use. func AvCodecGetContextDefaults3(avctx *AVCodecContext, c *AVCodec) int32 { return (int32)(C.avcodec_get_context_defaults3((*C.struct_AVCodecContext)(avctx), (*C.struct_AVCodec)(c))) @@ -3831,7 +4228,9 @@ func AvCodecGetClass() *AVClass { return (*AVClass)(C.avcodec_get_class()) } -// Deprecated: No use +// Deprecated: This function should not be used. +// +// AvCodecGetFrameClass func AvCodecGetFrameClass() *AVClass { return (*AVClass)(C.avcodec_get_frame_class()) } @@ -3843,6 +4242,9 @@ func AvCodecGetSubtitleRectClass() *AVClass { // Deprecated: Use an intermediate AVCodecParameters instance and the // AvCodecParametersFromContext() / AVCodecParametersToContext() functions. +// +// AvCodecCopyContext copies the settings of the source AVCodecContext into the destination +// AVCodecContext. func AvCodecCopyContext(dest, src *AVCodecContext) int32 { return (int32)(C.avcodec_copy_context((*C.struct_AVCodecContext)(dest), (*C.struct_AVCodecContext)(src))) @@ -3919,12 +4321,16 @@ func AvCodecChromaPosToEnum(xpos, ypos int32) AVChromaLocation { } // Deprecated: Use AVCodecSendPacket() and AVCodecReceiveFrame(). +// +// AvCodecDecodeAudio4 decodes the audio frame of size avpkt->size from avpkt->data into frame. func AvCodecDecodeAudio4(avctx *AVCodecContext, frame *AVFrame, gotFramePtr *int32, avpkt *AVPacket) int32 { return (int32)(C.avcodec_decode_audio4((*C.struct_AVCodecContext)(avctx), (*C.struct_AVFrame)(frame), (*C.int)(gotFramePtr), (*C.struct_AVPacket)(avpkt))) } // Deprecated: Use AVCodecSendPacket() and AVCodecReceiveFrame(). +// +// AvCodecDecodeVideo2 decodes the video frame of size avpkt->size from avpkt->data into picture. func AvCodecDecodeVideo2(avctx *AVCodecContext, picture *AVFrame, gotPicturePtr *int32, avpkt *AVPacket) int32 { return (int32)(C.avcodec_decode_video2((*C.struct_AVCodecContext)(avctx), (*C.struct_AVFrame)(picture), (*C.int)(gotPicturePtr), (*C.struct_AVPacket)(avpkt))) @@ -3985,167 +4391,167 @@ const ( // AVCodecParserContext type AVCodecParserContext C.struct_AVCodecParserContext -// Custom: GetPrivData gets `AVCodecParserContext.priv_data` value. +// GetPrivData gets `AVCodecParserContext.priv_data` value. func (cpc *AVCodecParserContext) GetPrivData() unsafe.Pointer { return cpc.priv_data } -// Custom: SetPrivData sets `AVCodecParserContext.priv_data` value. +// SetPrivData sets `AVCodecParserContext.priv_data` value. func (cpc *AVCodecParserContext) SetPrivData(v CVoidPointer) { cpc.priv_data = VoidPointer(v) } -// Custom: GetPrivDataAddr gets `AVCodecParserContext.priv_data` address. +// GetPrivDataAddr gets `AVCodecParserContext.priv_data` address. func (cpc *AVCodecParserContext) GetPrivDataAddr() *unsafe.Pointer { return (*unsafe.Pointer)(&cpc.priv_data) } -// Custom: GetParser gets `AVCodecParserContext.parser` value. +// GetParser gets `AVCodecParserContext.parser` value. func (cpc *AVCodecParserContext) GetParser() *AVCodecParser { return (*AVCodecParser)(cpc.parser) } -// Custom: SetParser sets `AVCodecParserContext.parser` value. +// SetParser sets `AVCodecParserContext.parser` value. func (cpc *AVCodecParserContext) SetParser(v *AVCodecParser) { cpc.parser = (*C.struct_AVCodecParser)(v) } -// Custom: GetParserAddr gets `AVCodecParserContext.parser` address. +// GetParserAddr gets `AVCodecParserContext.parser` address. func (cpc *AVCodecParserContext) GetParserAddr() **AVCodecParser { return (**AVCodecParser)(unsafe.Pointer(&cpc.parser)) } -// Custom: GetFrameOffset gets `AVCodecParserContext.frame_offset` value. +// GetFrameOffset gets `AVCodecParserContext.frame_offset` value. func (cpc *AVCodecParserContext) GetFrameOffset() int64 { return (int64)(cpc.frame_offset) } -// Custom: SetFrameOffset sets `AVCodecParserContext.frame_offset` value. +// SetFrameOffset sets `AVCodecParserContext.frame_offset` value. func (cpc *AVCodecParserContext) SetFrameOffset(v int64) { cpc.frame_offset = (C.int64_t)(v) } -// Custom: GetFrameOffsetAddr gets `AVCodecParserContext.frame_offset` address. +// GetFrameOffsetAddr gets `AVCodecParserContext.frame_offset` address. func (cpc *AVCodecParserContext) GetFrameOffsetAddr() *int64 { return (*int64)(&cpc.frame_offset) } -// Custom: GetCurOffset gets `AVCodecParserContext.cur_offset` value. +// GetCurOffset gets `AVCodecParserContext.cur_offset` value. func (cpc *AVCodecParserContext) GetCurOffset() int64 { return (int64)(cpc.cur_offset) } -// Custom: SetCurOffset sets `AVCodecParserContext.cur_offset` value. +// SetCurOffset sets `AVCodecParserContext.cur_offset` value. func (cpc *AVCodecParserContext) SetCurOffset(v int64) { cpc.cur_offset = (C.int64_t)(v) } -// Custom: GetCurOffsetAddr gets `AVCodecParserContext.cur_offset` address. +// GetCurOffsetAddr gets `AVCodecParserContext.cur_offset` address. func (cpc *AVCodecParserContext) GetCurOffsetAddr() *int64 { return (*int64)(&cpc.cur_offset) } -// Custom: GetNextFrameOffset gets `AVCodecParserContext.next_frame_offset` value. +// GetNextFrameOffset gets `AVCodecParserContext.next_frame_offset` value. func (cpc *AVCodecParserContext) GetNextFrameOffset() int64 { return (int64)(cpc.next_frame_offset) } -// Custom: SetNextFrameOffset sets `AVCodecParserContext.next_frame_offset` value. +// SetNextFrameOffset sets `AVCodecParserContext.next_frame_offset` value. func (cpc *AVCodecParserContext) SetNextFrameOffset(v int64) { cpc.next_frame_offset = (C.int64_t)(v) } -// Custom: GetNextFrameOffsetAddr gets `AVCodecParserContext.next_frame_offset` address. +// GetNextFrameOffsetAddr gets `AVCodecParserContext.next_frame_offset` address. func (cpc *AVCodecParserContext) GetNextFrameOffsetAddr() *int64 { return (*int64)(&cpc.next_frame_offset) } -// Custom: GetPictType gets `AVCodecParserContext.picttype` value. +// GetPictType gets `AVCodecParserContext.picttype` value. func (cpc *AVCodecParserContext) GetPictType() int32 { return (int32)(cpc.pict_type) } -// Custom: SetPictType sets `AVCodecParserContext.picttype` value. +// SetPictType sets `AVCodecParserContext.picttype` value. func (cpc *AVCodecParserContext) SetPictType(v int32) { cpc.pict_type = (C.int)(v) } -// Custom: GetPictTypeAddr gets `AVCodecParserContext.picttype` address. +// GetPictTypeAddr gets `AVCodecParserContext.picttype` address. func (cpc *AVCodecParserContext) GetPictTypeAddr() *int32 { return (*int32)(&cpc.pict_type) } -// Custom: GetPts gets `AVCodecParserContext.pts` value. +// GetPts gets `AVCodecParserContext.pts` value. func (cpc *AVCodecParserContext) GetPts() int64 { return (int64)(cpc.pts) } -// Custom: SetPts sets `AVCodecParserContext.pts` value. +// SetPts sets `AVCodecParserContext.pts` value. func (cpc *AVCodecParserContext) SetPts(v int64) { cpc.pts = (C.int64_t)(v) } -// Custom: GetPtsAddr gets `AVCodecParserContext.pts` address. +// GetPtsAddr gets `AVCodecParserContext.pts` address. func (cpc *AVCodecParserContext) GetPtsAddr() *int64 { return (*int64)(&cpc.pts) } -// Custom: GetDts gets `AVCodecParserContext.dts` value. +// GetDts gets `AVCodecParserContext.dts` value. func (cpc *AVCodecParserContext) GetDts() int64 { return (int64)(cpc.dts) } -// Custom: SetDts sets `AVCodecParserContext.dts` value. +// SetDts sets `AVCodecParserContext.dts` value. func (cpc *AVCodecParserContext) SetDts(v int64) { cpc.dts = (C.int64_t)(v) } -// Custom: GetDtsAddr gets `AVCodecParserContext.dts` address. +// GetDtsAddr gets `AVCodecParserContext.dts` address. func (cpc *AVCodecParserContext) GetDtsAddr() *int64 { return (*int64)(&cpc.dts) } -// Custom: GetLastPts gets `AVCodecParserContext.last_pts` value. +// GetLastPts gets `AVCodecParserContext.last_pts` value. func (cpc *AVCodecParserContext) GetLastPts() int64 { return (int64)(cpc.last_pts) } -// Custom: SetLastPts sets `AVCodecParserContext.last_pts` value. +// SetLastPts sets `AVCodecParserContext.last_pts` value. func (cpc *AVCodecParserContext) SetLastPts(v int64) { cpc.last_pts = (C.int64_t)(v) } -// Custom: GetLastPtsAddr gets `AVCodecParserContext.last_pts` address. +// GetLastPtsAddr gets `AVCodecParserContext.last_pts` address. func (cpc *AVCodecParserContext) GetLastPtsAddr() *int64 { return (*int64)(&cpc.last_pts) } -// Custom: GetLastDts gets `AVCodecParserContext.last_dts` value. +// GetLastDts gets `AVCodecParserContext.last_dts` value. func (cpc *AVCodecParserContext) GetLastDts() int64 { return (int64)(cpc.last_dts) } -// Custom: SetLastDts sets `AVCodecParserContext.last_dts` value. +// SetLastDts sets `AVCodecParserContext.last_dts` value. func (cpc *AVCodecParserContext) SetLastDts(v int64) { cpc.last_dts = (C.int64_t)(v) } -// Custom: GetLastDtsAddr gets `AVCodecParserContext.last_dts` address. +// GetLastDtsAddr gets `AVCodecParserContext.last_dts` address. func (cpc *AVCodecParserContext) GetLastDtsAddr() *int64 { return (*int64)(&cpc.last_dts) } -// Custom: GetFetchTimestamp gets `AVCodecParserContext.fetch_timestamp` value. +// GetFetchTimestamp gets `AVCodecParserContext.fetch_timestamp` value. func (cpc *AVCodecParserContext) GetFetchTimestamp() int32 { return (int32)(cpc.fetch_timestamp) } -// Custom: SetFetchTimestamp sets `AVCodecParserContext.fetch_timestamp` value. +// SetFetchTimestamp sets `AVCodecParserContext.fetch_timestamp` value. func (cpc *AVCodecParserContext) SetFetchTimestamp(v int32) { cpc.fetch_timestamp = (C.int)(v) } -// Custom: GetFetchTimestampAddr gets `AVCodecParserContext.fetch_timestamp` address. +// GetFetchTimestampAddr gets `AVCodecParserContext.fetch_timestamp` address. func (cpc *AVCodecParserContext) GetFetchTimestampAddr() *int32 { return (*int32)(&cpc.fetch_timestamp) } @@ -4154,357 +4560,363 @@ const ( AV_PARSER_PTS_NB = C.AV_PARSER_PTS_NB ) -// Custom: GetCurFrameStartIndex gets `AVCodecParserContext.cur_frame_start_index` value. +// GetCurFrameStartIndex gets `AVCodecParserContext.cur_frame_start_index` value. func (cpc *AVCodecParserContext) GetCurFrameStartIndex() int32 { return (int32)(cpc.cur_frame_start_index) } -// Custom: SetCurFrameStartIndex sets `AVCodecParserContext.cur_frame_start_index` value. +// SetCurFrameStartIndex sets `AVCodecParserContext.cur_frame_start_index` value. func (cpc *AVCodecParserContext) SetCurFrameStartIndex(v int32) { cpc.cur_frame_start_index = (C.int)(v) } -// Custom: GetCurFrameStartIndexAddr gets `AVCodecParserContext.cur_frame_start_index` address. +// GetCurFrameStartIndexAddr gets `AVCodecParserContext.cur_frame_start_index` address. func (cpc *AVCodecParserContext) GetCurFrameStartIndexAddr() *int32 { return (*int32)(&cpc.cur_frame_start_index) } -// Custom: GetCurFrameOffset gets `AVCodecParserContext.cur_frame_offset` value. +// GetCurFrameOffset gets `AVCodecParserContext.cur_frame_offset` value. func (cpc *AVCodecParserContext) GetCurFrameOffset() []int64 { return unsafe.Slice((*int64)(&cpc.cur_frame_offset[0]), AV_PARSER_PTS_NB) } -// Custom: SetCurFrameOffset sets `AVCodecParserContext.cur_frame_offset` value. +// SetCurFrameOffset sets `AVCodecParserContext.cur_frame_offset` value. func (cpc *AVCodecParserContext) SetCurFrameOffset(v []int64) { for i := 0; i < FFMIN(len(v), AV_PARSER_PTS_NB); i++ { cpc.cur_frame_offset[i] = (C.int64_t)(v[i]) } } -// Custom: GetCurFrameOffsetAddr gets `AVCodecParserContext.cur_frame_offset` address. +// GetCurFrameOffsetAddr gets `AVCodecParserContext.cur_frame_offset` address. func (cpc *AVCodecParserContext) GetCurFrameOffsetAddr() **int64 { return (**int64)(unsafe.Pointer(&cpc.cur_frame_offset)) } -// Custom: GetCurFramePts gets `AVCodecParserContext.cur_frame_pts` value. +// GetCurFramePts gets `AVCodecParserContext.cur_frame_pts` value. func (cpc *AVCodecParserContext) GetCurFramePts() []int64 { return unsafe.Slice((*int64)(&cpc.cur_frame_pts[0]), AV_PARSER_PTS_NB) } -// Custom: SetCurFramePts sets `AVCodecParserContext.cur_frame_pts` value. +// SetCurFramePts sets `AVCodecParserContext.cur_frame_pts` value. func (cpc *AVCodecParserContext) SetCurFramePts(v []int64) { for i := 0; i < FFMIN(len(v), AV_PARSER_PTS_NB); i++ { cpc.cur_frame_pts[i] = (C.int64_t)(v[i]) } } -// Custom: GetCurFramePtsAddr gets `AVCodecParserContext.cur_frame_pts` address. +// GetCurFramePtsAddr gets `AVCodecParserContext.cur_frame_pts` address. func (cpc *AVCodecParserContext) GetCurFramePtsAddr() **int64 { return (**int64)(unsafe.Pointer(&cpc.cur_frame_pts)) } -// Custom: GetCurFrameDts gets `AVCodecParserContext.cur_frame_dts` value. +// GetCurFrameDts gets `AVCodecParserContext.cur_frame_dts` value. func (cpc *AVCodecParserContext) GetCurFrameDts() []int64 { return unsafe.Slice((*int64)(&cpc.cur_frame_dts[0]), AV_PARSER_PTS_NB) } -// Custom: SetCurFrameDts sets `AVCodecParserContext.cur_frame_dts` value. +// SetCurFrameDts sets `AVCodecParserContext.cur_frame_dts` value. func (cpc *AVCodecParserContext) SetCurFrameDts(v []int64) { for i := 0; i < FFMIN(len(v), AV_PARSER_PTS_NB); i++ { cpc.cur_frame_dts[i] = (C.int64_t)(v[i]) } } -// Custom: GetCurFrameDtsAddr gets `AVCodecParserContext.cur_frame_dts` address. +// GetCurFrameDtsAddr gets `AVCodecParserContext.cur_frame_dts` address. func (cpc *AVCodecParserContext) GetCurFrameDtsAddr() **int64 { return (**int64)(unsafe.Pointer(&cpc.cur_frame_dts)) } -// Custom: GetOffset gets `AVCodecParserContext.offset` value. +// GetOffset gets `AVCodecParserContext.offset` value. func (cpc *AVCodecParserContext) GetOffset() int64 { return (int64)(cpc.offset) } -// Custom: SetOffset sets `AVCodecParserContext.offset` value. +// SetOffset sets `AVCodecParserContext.offset` value. func (cpc *AVCodecParserContext) SetOffset(v int64) { cpc.offset = (C.int64_t)(v) } -// Custom: GetOffsetAddr gets `AVCodecParserContext.offset` address. +// GetOffsetAddr gets `AVCodecParserContext.offset` address. func (cpc *AVCodecParserContext) GetOffsetAddr() *int64 { return (*int64)(&cpc.offset) } -// Custom: GetCurFrameEnd gets `AVCodecParserContext.cur_frame_end` value. +// GetCurFrameEnd gets `AVCodecParserContext.cur_frame_end` value. func (cpc *AVCodecParserContext) GetCurFrameEnd() []int64 { return unsafe.Slice((*int64)(&cpc.cur_frame_end[0]), AV_PARSER_PTS_NB) } -// Custom: SetCurFrameEnd sets `AVCodecParserContext.cur_frame_end` value. +// SetCurFrameEnd sets `AVCodecParserContext.cur_frame_end` value. func (cpc *AVCodecParserContext) SetCurFrameEnd(v []int64) { for i := 0; i < FFMIN(len(v), AV_PARSER_PTS_NB); i++ { cpc.cur_frame_end[i] = (C.int64_t)(v[i]) } } -// Custom: GetCurFrameEndAddr gets `AVCodecParserContext.cur_frame_end` address. +// GetCurFrameEndAddr gets `AVCodecParserContext.cur_frame_end` address. func (cpc *AVCodecParserContext) GetCurFrameEndAddr() **int64 { return (**int64)(unsafe.Pointer(&cpc.cur_frame_end)) } -// Custom: GetKeyFrame gets `AVCodecParserContext.key_frame` value. +// GetKeyFrame gets `AVCodecParserContext.key_frame` value. func (cpc *AVCodecParserContext) GetKeyFrame() int32 { return (int32)(cpc.key_frame) } -// Custom: SetKeyFrame sets `AVCodecParserContext.key_frame` value. +// SetKeyFrame sets `AVCodecParserContext.key_frame` value. func (cpc *AVCodecParserContext) SetKeyFrame(v int32) { cpc.key_frame = (C.int)(v) } -// Custom: GetKeyFrameAddr gets `AVCodecParserContext.key_frame` address. +// GetKeyFrameAddr gets `AVCodecParserContext.key_frame` address. func (cpc *AVCodecParserContext) GetKeyFrameAddr() *int32 { return (*int32)(&cpc.key_frame) } -// Custom: GetConvergenceDuration gets `AVCodecParserContext.convergence_duration` value. +// Deprecated: Unused. +// +// GetConvergenceDuration gets `AVCodecParserContext.convergence_duration` value. func (cpc *AVCodecParserContext) GetConvergenceDuration() int64 { return (int64)(cpc.convergence_duration) } -// Custom: SetConvergenceDuration sets `AVCodecParserContext.convergence_duration` value. +// Deprecated: Unused. +// +// SetConvergenceDuration sets `AVCodecParserContext.convergence_duration` value. func (cpc *AVCodecParserContext) SetConvergenceDuration(v int64) { cpc.convergence_duration = (C.int64_t)(v) } -// Custom: GetConvergenceDurationAddr gets `AVCodecParserContext.convergence_duration` address. +// Deprecated: Unused. +// +// GetConvergenceDurationAddr gets `AVCodecParserContext.convergence_duration` address. func (cpc *AVCodecParserContext) GetConvergenceDurationAddr() *int64 { return (*int64)(&cpc.convergence_duration) } -// Custom: GetDtsSyncPoint gets `AVCodecParserContext.dts_sync_point` value. +// GetDtsSyncPoint gets `AVCodecParserContext.dts_sync_point` value. func (cpc *AVCodecParserContext) GetDtsSyncPoint() int32 { return (int32)(cpc.dts_sync_point) } -// Custom: SetDtsSyncPoint sets `AVCodecParserContext.dts_sync_point` value. +// SetDtsSyncPoint sets `AVCodecParserContext.dts_sync_point` value. func (cpc *AVCodecParserContext) SetDtsSyncPoint(v int32) { cpc.dts_sync_point = (C.int)(v) } -// Custom: GetDtsSyncPointAddr gets `AVCodecParserContext.dts_sync_point` address. +// GetDtsSyncPointAddr gets `AVCodecParserContext.dts_sync_point` address. func (cpc *AVCodecParserContext) GetDtsSyncPointAddr() *int32 { return (*int32)(&cpc.dts_sync_point) } -// Custom: GetDtsRefDtsDelta gets `AVCodecParserContext.dts_ref_dts_delta` value. +// GetDtsRefDtsDelta gets `AVCodecParserContext.dts_ref_dts_delta` value. func (cpc *AVCodecParserContext) GetDtsRefDtsDelta() int32 { return (int32)(cpc.dts_ref_dts_delta) } -// Custom: SetDtsRefDtsDelta sets `AVCodecParserContext.dts_ref_dts_delta` value. +// SetDtsRefDtsDelta sets `AVCodecParserContext.dts_ref_dts_delta` value. func (cpc *AVCodecParserContext) SetDtsRefDtsDelta(v int32) { cpc.dts_ref_dts_delta = (C.int)(v) } -// Custom: GetDtsRefDtsDeltaAddr gets `AVCodecParserContext.dts_ref_dts_delta` address. +// GetDtsRefDtsDeltaAddr gets `AVCodecParserContext.dts_ref_dts_delta` address. func (cpc *AVCodecParserContext) GetDtsRefDtsDeltaAddr() *int32 { return (*int32)(&cpc.dts_ref_dts_delta) } -// Custom: GetPtsDtsDelta gets `AVCodecParserContext.pts_dts_delta` value. +// GetPtsDtsDelta gets `AVCodecParserContext.pts_dts_delta` value. func (cpc *AVCodecParserContext) GetPtsDtsDelta() int32 { return (int32)(cpc.pts_dts_delta) } -// Custom: SetPtsDtsDelta sets `AVCodecParserContext.pts_dts_delta` value. +// SetPtsDtsDelta sets `AVCodecParserContext.pts_dts_delta` value. func (cpc *AVCodecParserContext) SetPtsDtsDelta(v int32) { cpc.pts_dts_delta = (C.int)(v) } -// Custom: GetPtsDtsDeltaAddr gets `AVCodecParserContext.pts_dts_delta` address. +// GetPtsDtsDeltaAddr gets `AVCodecParserContext.pts_dts_delta` address. func (cpc *AVCodecParserContext) GetPtsDtsDeltaAddr() *int32 { return (*int32)(&cpc.pts_dts_delta) } -// Custom: GetCurFramePos gets `AVCodecParserContext.cur_frame_pos` value. +// GetCurFramePos gets `AVCodecParserContext.cur_frame_pos` value. func (cpc *AVCodecParserContext) GetCurFramePos() []int64 { return unsafe.Slice((*int64)(&cpc.cur_frame_pos[0]), AV_PARSER_PTS_NB) } -// Custom: SetCurFramePos sets `AVCodecParserContext.cur_frame_pos` value. +// SetCurFramePos sets `AVCodecParserContext.cur_frame_pos` value. func (cpc *AVCodecParserContext) SetCurFramePos(v []int64) { for i := 0; i < FFMIN(len(v), AV_PARSER_PTS_NB); i++ { cpc.cur_frame_pos[i] = (C.int64_t)(v[i]) } } -// Custom: GetCurFramePosAddr gets `AVCodecParserContext.cur_frame_pos` address. +// GetCurFramePosAddr gets `AVCodecParserContext.cur_frame_pos` address. func (cpc *AVCodecParserContext) GetCurFramePosAddr() **int64 { return (**int64)(unsafe.Pointer(&cpc.cur_frame_pos)) } -// Custom: GetPos gets `AVCodecParserContext.pos` value. +// GetPos gets `AVCodecParserContext.pos` value. func (cpc *AVCodecParserContext) GetPos() int64 { return (int64)(cpc.pos) } -// Custom: SetPos sets `AVCodecParserContext.pos` value. +// SetPos sets `AVCodecParserContext.pos` value. func (cpc *AVCodecParserContext) SetPos(v int64) { cpc.pos = (C.int64_t)(v) } -// Custom: GetPosAddr gets `AVCodecParserContext.pos` address. +// GetPosAddr gets `AVCodecParserContext.pos` address. func (cpc *AVCodecParserContext) GetPosAddr() *int64 { return (*int64)(&cpc.pos) } -// Custom: GetLastPos gets `AVCodecParserContext.last_pos` value. +// GetLastPos gets `AVCodecParserContext.last_pos` value. func (cpc *AVCodecParserContext) GetLastPos() int64 { return (int64)(cpc.last_pos) } -// Custom: SetLastPos sets `AVCodecParserContext.last_pos` value. +// SetLastPos sets `AVCodecParserContext.last_pos` value. func (cpc *AVCodecParserContext) SetLastPos(v int64) { cpc.last_pos = (C.int64_t)(v) } -// Custom: GetLastPosAddr gets `AVCodecParserContext.last_pos` address. +// GetLastPosAddr gets `AVCodecParserContext.last_pos` address. func (cpc *AVCodecParserContext) GetLastPosAddr() *int64 { return (*int64)(&cpc.last_pos) } -// Custom: GetDuration gets `AVCodecParserContext.duration` value. +// GetDuration gets `AVCodecParserContext.duration` value. func (cpc *AVCodecParserContext) GetDuration() int32 { return (int32)(cpc.duration) } -// Custom: SetDuration sets `AVCodecParserContext.duration` value. +// SetDuration sets `AVCodecParserContext.duration` value. func (cpc *AVCodecParserContext) SetDuration(v int32) { cpc.duration = (C.int)(v) } -// Custom: GetDurationAddr gets `AVCodecParserContext.duration` address. +// GetDurationAddr gets `AVCodecParserContext.duration` address. func (cpc *AVCodecParserContext) GetDurationAddr() *int32 { return (*int32)(&cpc.duration) } -// Custom: GetFieldOrder gets `AVCodecParserContext.field_order` value. +// GetFieldOrder gets `AVCodecParserContext.field_order` value. func (cpc *AVCodecParserContext) GetFieldOrder() AVFieldOrder { return (AVFieldOrder)(cpc.field_order) } -// Custom: SetFieldOrder sets `AVCodecParserContext.field_order` value. +// SetFieldOrder sets `AVCodecParserContext.field_order` value. func (cpc *AVCodecParserContext) SetFieldOrder(v AVFieldOrder) { cpc.field_order = (C.enum_AVFieldOrder)(v) } -// Custom: GetFieldOrderAddr gets `AVCodecParserContext.field_order` address. +// GetFieldOrderAddr gets `AVCodecParserContext.field_order` address. func (cpc *AVCodecParserContext) GetFieldOrderAddr() *AVFieldOrder { return (*AVFieldOrder)(&cpc.field_order) } -// Custom: GetPictureStructure gets `AVCodecParserContext.picture_structure` value. +// GetPictureStructure gets `AVCodecParserContext.picture_structure` value. func (cpc *AVCodecParserContext) GetPictureStructure() AVPictureStructure { return (AVPictureStructure)(cpc.picture_structure) } -// Custom: SetPictureStructure sets `AVCodecParserContext.picture_structure` value. +// SetPictureStructure sets `AVCodecParserContext.picture_structure` value. func (cpc *AVCodecParserContext) SetPictureStructure(v AVPictureStructure) { cpc.picture_structure = (C.enum_AVPictureStructure)(v) } -// Custom: GetPictureStructureAddr gets `AVCodecParserContext.picture_structure` address. +// GetPictureStructureAddr gets `AVCodecParserContext.picture_structure` address. func (cpc *AVCodecParserContext) GetPictureStructureAddr() *AVPictureStructure { return (*AVPictureStructure)(&cpc.picture_structure) } -// Custom: GetOutputPictureNumber gets `AVCodecParserContext.output_picture_number` value. +// GetOutputPictureNumber gets `AVCodecParserContext.output_picture_number` value. func (cpc *AVCodecParserContext) GetOutputPictureNumber() int32 { return (int32)(cpc.output_picture_number) } -// Custom: SetOutputPictureNumber sets `AVCodecParserContext.output_picture_number` value. +// SetOutputPictureNumber sets `AVCodecParserContext.output_picture_number` value. func (cpc *AVCodecParserContext) SetOutputPictureNumber(v int32) { cpc.output_picture_number = (C.int)(v) } -// Custom: GetOutputPictureNumberAddr gets `AVCodecParserContext.output_picture_number` address. +// GetOutputPictureNumberAddr gets `AVCodecParserContext.output_picture_number` address. func (cpc *AVCodecParserContext) GetOutputPictureNumberAddr() *int32 { return (*int32)(&cpc.output_picture_number) } -// Custom: GetWidth gets `AVCodecParserContext.width` value. +// GetWidth gets `AVCodecParserContext.width` value. func (cpc *AVCodecParserContext) GetWidth() int32 { return (int32)(cpc.width) } -// Custom: SetWidth sets `AVCodecParserContext.width` value. +// SetWidth sets `AVCodecParserContext.width` value. func (cpc *AVCodecParserContext) SetWidth(v int32) { cpc.width = (C.int)(v) } -// Custom: GetWidthAddr gets `AVCodecParserContext.width` address. +// GetWidthAddr gets `AVCodecParserContext.width` address. func (cpc *AVCodecParserContext) GetWidthAddr() *int32 { return (*int32)(&cpc.width) } -// Custom: GetHeight gets `AVCodecParserContext.height` value. +// GetHeight gets `AVCodecParserContext.height` value. func (cpc *AVCodecParserContext) GetHeight() int32 { return (int32)(cpc.height) } -// Custom: SetHeight sets `AVCodecParserContext.height` value. +// SetHeight sets `AVCodecParserContext.height` value. func (cpc *AVCodecParserContext) SetHeight(v int32) { cpc.height = (C.int)(v) } -// Custom: GetHeightAddr gets `AVCodecParserContext.height` address. +// GetHeightAddr gets `AVCodecParserContext.height` address. func (cpc *AVCodecParserContext) GetHeightAddr() *int32 { return (*int32)(&cpc.height) } -// Custom: GetCodedWidth gets `AVCodecParserContext.coded_width` value. +// GetCodedWidth gets `AVCodecParserContext.coded_width` value. func (cpc *AVCodecParserContext) GetCodedWidth() int32 { return (int32)(cpc.coded_width) } -// Custom: SetCodedWidth sets `AVCodecParserContext.coded_width` value. +// SetCodedWidth sets `AVCodecParserContext.coded_width` value. func (cpc *AVCodecParserContext) SetCodedWidth(v int32) { cpc.coded_width = (C.int)(v) } -// Custom: GetCodedWidthAddr gets `AVCodecParserContext.coded_width` address. +// GetCodedWidthAddr gets `AVCodecParserContext.coded_width` address. func (cpc *AVCodecParserContext) GetCodedWidthAddr() *int32 { return (*int32)(&cpc.coded_width) } -// Custom: GetCodedHeight gets `AVCodecParserContext.coded_height` value. +// GetCodedHeight gets `AVCodecParserContext.coded_height` value. func (cpc *AVCodecParserContext) GetCodedHeight() int32 { return (int32)(cpc.coded_height) } -// Custom: SetCodedHeight sets `AVCodecParserContext.coded_height` value. +// SetCodedHeight sets `AVCodecParserContext.coded_height` value. func (cpc *AVCodecParserContext) SetCodedHeight(v int32) { cpc.coded_height = (C.int)(v) } -// Custom: GetCodedHeightAddr gets `AVCodecParserContext.coded_height` address. +// GetCodedHeightAddr gets `AVCodecParserContext.coded_height` address. func (cpc *AVCodecParserContext) GetCodedHeightAddr() *int32 { return (*int32)(&cpc.coded_height) } -// Custom: GetFormat gets `AVCodecParserContext.format` value. +// GetFormat gets `AVCodecParserContext.format` value. func (cpc *AVCodecParserContext) GetFormat() int32 { return (int32)(cpc.format) } -// Custom: SetFormat sets `AVCodecParserContext.format` value. +// SetFormat sets `AVCodecParserContext.format` value. func (cpc *AVCodecParserContext) SetFormat(v int32) { cpc.format = (C.int)(v) } -// Custom: GetFormatAddr gets `AVCodecParserContext.format` address. +// GetFormatAddr gets `AVCodecParserContext.format` address. func (cpc *AVCodecParserContext) GetFormatAddr() *int32 { return (*int32)(&cpc.format) } @@ -4512,49 +4924,149 @@ func (cpc *AVCodecParserContext) GetFormatAddr() *int32 { // AVCodecParser type AVCodecParser C.struct_AVCodecParser -// Custom: GetCodecIds gets `AVCodecParser.codec_ids` value. +// GetCodecIds gets `AVCodecParser.codec_ids` value. func (cp *AVCodecParser) GetCodecIds() []int32 { return unsafe.Slice((*int32)(&cp.codec_ids[0]), 5) } -// Custom: SetCodecIds sets `AVCodecParser.codec_ids` value. +// SetCodecIds sets `AVCodecParser.codec_ids` value. func (cp *AVCodecParser) SetCodecIds(v []int32) { for i := 0; i < FFMIN(len(v), 5); i++ { cp.codec_ids[i] = (C.int)(v[i]) } } -// Custom: GetCodecIdsAddr gets `AVCodecParser.codec_ids` address. +// GetCodecIdsAddr gets `AVCodecParser.codec_ids` address. func (cp *AVCodecParser) GetCodecIdsAddr() *int32 { return (*int32)(unsafe.Pointer(&cp.codec_ids)) } -// Custom: GetPrivDataSize gets `AVCodecParser.priv_data_size` value. +// GetPrivDataSize gets `AVCodecParser.priv_data_size` value. func (cp *AVCodecParser) GetPrivDataSize() int32 { return (int32)(cp.priv_data_size) } -// Custom: SetPrivDataSize sets `AVCodecParser.priv_data_size` value. +// SetPrivDataSize sets `AVCodecParser.priv_data_size` value. func (cp *AVCodecParser) SetPrivDataSize(v int32) { cp.priv_data_size = (C.int)(v) } -// Custom: GetPrivDataSizeAddr gets `AVCodecParser.priv_data_size` address. +// GetPrivDataSizeAddr gets `AVCodecParser.priv_data_size` address. func (cp *AVCodecParser) GetPrivDataSizeAddr() *int32 { return (*int32)(&cp.priv_data_size) } +// typedef int (*avcodec_parser_init_func)(AVCodecParserContext *s); +type AvcodecParserInitFunc = C.avcodec_parser_init_func + +// typedef int (*avcodec_parser_parse_func)(AVCodecParserContext *s, +// AVCodecContext *avctx, +// const uint8_t **poutbuf, int *poutbuf_size, +// const uint8_t *buf, int buf_size); +type AvcodecParserParseFunc = C.avcodec_parser_parse_func + +// typedef void (*avcodec_parser_close_func)(AVCodecParserContext *s); +type AvcodecParserCloseFunc = C.avcodec_parser_close_func + +// typedef int (*avcodec_parser_split_func)(AVCodecContext *avctx, const uint8_t *buf, int buf_size); +type AvcodecParserSplitFunc = C.avcodec_parser_split_func + +// GetParserInit gets `AVCodecParser.parser_init` value. +func (cp *AVCodecParser) GetParserInit() AvcodecParserInitFunc { + return (AvcodecParserInitFunc)(cp.parser_init) +} + +// SetParserInit sets `AVCodecParser.parser_init` value. +func (cp *AVCodecParser) SetParserInit(v AvcodecParserInitFunc) { + cp.parser_init = (C.avcodec_parser_init_func)(v) +} + +// GetParserInitAddr gets `AVCodecParser.parser_init` address. +func (cp *AVCodecParser) GetParserInitAddr() *AvcodecParserInitFunc { + return (*AvcodecParserInitFunc)(&cp.parser_init) +} + +// GetParserParse gets `AVCodecParser.parser_parse` value. +func (cp *AVCodecParser) GetParserParse() AvcodecParserParseFunc { + return (AvcodecParserParseFunc)(cp.parser_parse) +} + +// SetParserParse sets `AVCodecParser.parser_parse` value. +func (cp *AVCodecParser) SetParserParse(v AvcodecParserParseFunc) { + cp.parser_parse = (C.avcodec_parser_parse_func)(v) +} + +// GetParserParseAddr gets `AVCodecParser.parser_parse` address. +func (cp *AVCodecParser) GetParserParseAddr() *AvcodecParserParseFunc { + return (*AvcodecParserParseFunc)(&cp.parser_parse) +} + +// GetParserClose gets `AVCodecParser.parser_close` value. +func (cp *AVCodecParser) GetParserClose() AvcodecParserCloseFunc { + return (AvcodecParserCloseFunc)(cp.parser_close) +} + +// SetParserClose sets `AVCodecParser.parser_close` value. +func (cp *AVCodecParser) SetParserClose(v AvcodecParserCloseFunc) { + cp.parser_close = (C.avcodec_parser_close_func)(v) +} + +// GetParserCloseAddr gets `AVCodecParser.parser_close` address. +func (cp *AVCodecParser) GetParserCloseAddr() *AvcodecParserCloseFunc { + return (*AvcodecParserCloseFunc)(&cp.parser_close) +} + +// GetSplit gets `AVCodecParser.split` value. +func (cp *AVCodecParser) GetSplit() AvcodecParserSplitFunc { + return (AvcodecParserSplitFunc)(cp.split) +} + +// SetSplit sets `AVCodecParser.split` value. +func (cp *AVCodecParser) SetSplit(v AvcodecParserSplitFunc) { + cp.split = (C.avcodec_parser_split_func)(v) +} + +// GetSplitAddr gets `AVCodecParser.split` address. +func (cp *AVCodecParser) GetSplitAddr() *AvcodecParserSplitFunc { + return (*AvcodecParserSplitFunc)(&cp.split) +} + +// Deprecated: No use. +// +// GetNext gets `AVCodecParser.next` value. +func (cp *AVCodecParser) GetNext() *AVCodecParser { + return (*AVCodecParser)(cp.next) +} + +// Deprecated: No use. +// +// SetNext sets `AVCodecParser.next` value. +func (cp *AVCodecParser) SetNext(v *AVCodecParser) { + cp.next = (*C.struct_AVCodecParser)(v) +} + +// Deprecated: No use. +// +// GetNextAddr gets `AVCodecParser.next` address. +func (cp *AVCodecParser) GetNextAddr() **AVCodecParser { + return (**AVCodecParser)(unsafe.Pointer(&cp.next)) +} + // AvParserIterate iterates over all registered codec parsers. func AvParserIterate(p CVoidPointerPointer) *AVCodecParser { return (*AVCodecParser)(C.av_parser_iterate(VoidPointerPointer(p))) } -// Deprecated: No use +// Deprecated: No use. +// +// AvParserNext func AvParserNext(c *AVCodecParser) *AVCodecParser { return (*AVCodecParser)(C.av_parser_next((*C.struct_AVCodecParser)(c))) } -// Deprecated: No use +// Deprecated: No use. +// +// AvRegisterCodecParser func AvRegisterCodecParser(parser *AVCodecParser) { C.av_register_codec_parser((*C.struct_AVCodecParser)(parser)) } @@ -4577,6 +5089,8 @@ func AvParserParse2(s *AVCodecParserContext, avctx *AVCodecContext, } // Deprecated: Use DumpExtradata, RemoveExtra or ExtractExtradata bitstream filters instead. +// +// AvParserChange func AvParserChange(s *AVCodecParserContext, avctx *AVCodecContext, outbuf **uint8, poutbufSize *int32, buf *uint8, bufSize int32, keyframe int32) int32 { @@ -4592,6 +5106,8 @@ func AvParserClose(s *AVCodecParserContext) { } // Deprecated: Use AVCodecSendFrame()/AVCodecReceivePacket() instead. +// +// AvCodecEncodeAudio2 encodes a frame of audio. func AvCodecEncodeAudio2(avctx *AVCodecContext, avpkt *AVPacket, frame *AVFrame, gotPacketPtr *int32) int32 { return (int32)(C.avcodec_encode_audio2((*C.struct_AVCodecContext)(avctx), @@ -4599,6 +5115,8 @@ func AvCodecEncodeAudio2(avctx *AVCodecContext, } // Deprecated: Use AVCodecSendFrame()/AVCodecReceivePacket() instead. +// +// AvCodecEncodeVideo2 encodes a frame of video. func AvCodecEncodeVideo2(avctx *AVCodecContext, avpkt *AVPacket, frame *AVFrame, gotPacketPtr *int32) int32 { return (int32)(C.avcodec_encode_video2((*C.struct_AVCodecContext)(avctx), @@ -4612,24 +5130,32 @@ func AvCodecEncodeSubtitle(avctx *AVCodecContext, (*C.uint8_t)(buf), (C.int)(bufSize), (*C.struct_AVSubtitle)(sub))) } -// Deprecated: No use +// Deprecated: Unused. +// +// AvPictureAlloc func AvPictureAlloc(picture *AVPicture, pixFmt AVPixelFormat, width, height int32) int32 { return (int32)(C.avpicture_alloc((*C.struct_AVPicture)(picture), (C.enum_AVPixelFormat)(pixFmt), (C.int)(width), (C.int)(height))) } -// Deprecated: No use +// Deprecated: Unused. +// +// AvPictureFree func AvPictureFree(picture *AVPicture) { C.avpicture_free((*C.struct_AVPicture)(picture)) } // Deprecated: Use AvImageFillArrays() instead. +// +// AvPictureFill func AvPictureFill(picture *AVPicture, ptr *uint8, pixFmt AVPixelFormat, width, height int32) int32 { return (int32)(C.avpicture_fill((*C.struct_AVPicture)(picture), (*C.uint8_t)(ptr), (C.enum_AVPixelFormat)(pixFmt), (C.int)(width), (C.int)(height))) } // Deprecated: Use AvImageCopyToBuffer() instead. +// +// AvPictureLayout func AvPictureLayout(src *AVPicture, pixFmt AVPixelFormat, width, height int32, dest *uint8, destSize int32) int32 { return (int32)(C.avpicture_layout((*C.struct_AVPicture)(src), (C.enum_AVPixelFormat)(pixFmt), (C.int)(width), (C.int)(height), @@ -4637,23 +5163,31 @@ func AvPictureLayout(src *AVPicture, pixFmt AVPixelFormat, width, height int32, } // Deprecated: Use AvImageGetBufferSize() instead. +// +// AvPictureGetSize func AvPictureGetSize(pixFmt AVPixelFormat, width, height int32) int32 { return (int32)(C.avpicture_get_size((C.enum_AVPixelFormat)(pixFmt), (C.int)(width), (C.int)(height))) } // Deprecated: Use AvImageCopy() instead. +// +// AvPictureCopy func AvPictureCopy(dst, src *AVPicture, pixFmt AVPixelFormat, width, height int32) { C.av_picture_copy((*C.struct_AVPicture)(dst), (*C.struct_AVPicture)(src), (C.enum_AVPixelFormat)(pixFmt), (C.int)(width), (C.int)(height)) } -// Deprecated: No use +// Deprecated: Unused. +// +// AvPictureCrop func AvPictureCrop(dst, src *AVPicture, pixFmt AVPixelFormat, topBand, leftBand int32) int32 { return (int32)(C.av_picture_crop((*C.struct_AVPicture)(dst), (*C.struct_AVPicture)(src), (C.enum_AVPixelFormat)(pixFmt), (C.int)(topBand), (C.int)(leftBand))) } -// Deprecated: No use +// Deprecated: Unused. +// +// AvPicturePad func AvPicturePad(dst, src *AVPicture, width, height int32, pixFmt AVPixelFormat, padTop, padBottom, padLeft, padRight int32, color *int32) int32 { return (int32)(C.av_picture_pad((*C.struct_AVPicture)(dst), (*C.struct_AVPicture)(src), @@ -4663,6 +5197,8 @@ func AvPicturePad(dst, src *AVPicture, width, height int32, pixFmt AVPixelFormat } // Deprecated: Use AvPixFmtGetChromaSubSample() instead. +// +// AvCodecGetChromaSubSample func AvCodecGetChromaSubSample(pixFmt AVPixelFormat, hShift, vShift *int32) { C.avcodec_get_chroma_sub_sample((C.enum_AVPixelFormat)(pixFmt), (*C.int)(hShift), (*C.int)(vShift)) @@ -4685,12 +5221,16 @@ func AvCodecFindBestPixFmtOfList(pixFmtList *AVPixelFormat, } // Deprecated: Use AvGetPixFmtLoss() instead. +// +// AvCodecGetPixFmtLoss func AvCodecGetPixFmtLoss(dstPixFmt, srcPixFmt AVPixelFormat, hasAlpha int32) int32 { return (int32)(C.avcodec_get_pix_fmt_loss((C.enum_AVPixelFormat)(dstPixFmt), (C.enum_AVPixelFormat)(srcPixFmt), (C.int)(hasAlpha))) } // Deprecated: Use AvFindBestPixFmtOf2() instead. +// +// AvCodecFindBestPixFmtOf2 func AvCodecFindBestPixFmtOf2(dstPixFmt1, dstPixFmt2, srcPixFmt AVPixelFormat, hasAlpha int32, lossPtr *int32) AVPixelFormat { return (AVPixelFormat)(C.avcodec_find_best_pix_fmt_of_2( @@ -4698,7 +5238,9 @@ func AvCodecFindBestPixFmtOf2(dstPixFmt1, dstPixFmt2, srcPixFmt AVPixelFormat, (C.enum_AVPixelFormat)(srcPixFmt), (C.int)(hasAlpha), (*C.int)(lossPtr))) } -// Deprecated: No use +// Deprecated: No use. +// +// AvCodecFindBestPixFmt2 func AvCodecFindBestPixFmt2(dstPixFmt1, dstPixFmt2, srcPixFmt AVPixelFormat, hasAlpha int32, lossPtr *int32) AVPixelFormat { return (AVPixelFormat)(C.avcodec_find_best_pix_fmt2( @@ -4713,6 +5255,8 @@ func AvCodecDefaultGetFormat(avctx *AVCodecContext, fmt *AVPixelFormat) AVPixelF } // Deprecated: Use AvFourccMakeString() or AvFourcc2str() instead. +// +// AvGetCodecTagString func AvGetCodecTagString(buf *int8, bufSize uintptr, codecTag uint32) int32 { return (int32)(C.av_get_codec_tag_string((*C.char)(buf), (C.size_t)(bufSize), (C.uint)(codecTag))) @@ -4734,21 +5278,24 @@ func AvCodecProfileName(codecID AVCodecID, profile int32) string { return C.GoString(C.avcodec_profile_name((C.enum_AVCodecID)(codecID), (C.int)(profile))) } -// typedef int (*avcodec_context_excute_func)(AVCodecContext *c2, void *arg2) -type AVCodecContextExcuteFunc = C.avcodec_context_excute_func +// typedef int (*avcodec_context_execute_func)(AVCodecContext *c2, void *arg2); +type AVCodecContextExecuteFunc = C.avcodec_context_execute_func + +// typedef int (*avcodec_context_execute2_func)(AVCodecContext *c2, void *arg2, int, int); +type AVCodecContextExecute2Func = C.avcodec_context_execute2_func // AvCodecDefaultExecute -func AvCodecDefaultExecute(avctx *AVCodecContext, f AVCodecContextExcuteFunc, arg CVoidPointer, +func AvCodecDefaultExecute(avctx *AVCodecContext, f AVCodecContextExecuteFunc, arg CVoidPointer, ret *int32, count, size int32) int32 { return (int32)(C.avcodec_default_execute((*C.struct_AVCodecContext)(avctx), - (C.avcodec_context_excute_func)(f), VoidPointer(arg), (*C.int)(ret), (C.int)(count), (C.int)(size))) + (C.avcodec_context_execute_func)(f), VoidPointer(arg), (*C.int)(ret), (C.int)(count), (C.int)(size))) } // AvCodecDefaultExecute2 -func AvCodecDefaultExecute2(avctx *AVCodecContext, f AVCodecContextExcuteFunc, arg CVoidPointer, +func AvCodecDefaultExecute2(avctx *AVCodecContext, f AVCodecContextExecute2Func, arg CVoidPointer, ret *int32, count int32) int32 { return (int32)(C.avcodec_default_execute2((*C.struct_AVCodecContext)(avctx), - (C.avcodec_context_excute_func)(f), VoidPointer(arg), (*C.int)(ret), (C.int)(count))) + (C.avcodec_context_execute2_func)(f), VoidPointer(arg), (*C.int)(ret), (C.int)(count))) } // AvCodecFillAudioFrame fills AVFrame audio data and linesize pointers. @@ -4794,37 +5341,41 @@ func AvGetAudioFrameDuration2(par *AVCodecParameters, frameBytes int32) int32 { // AVBitStreamFilterContext type AVBitStreamFilterContext C.struct_AVBitStreamFilterContext -// Custom: GetPrivData gets `AVBitStreamFilterContext.priv_data` value. +// GetPrivData gets `AVBitStreamFilterContext.priv_data` value. func (obsfc *AVBitStreamFilterContext) GetPrivData() unsafe.Pointer { return obsfc.priv_data } -// Custom: GetFilter gets `AVBitStreamFilterContext.filter` value. +// GetFilter gets `AVBitStreamFilterContext.filter` value. func (obsfc *AVBitStreamFilterContext) GetFilter() *AVBitStreamFilter { return (*AVBitStreamFilter)(obsfc.filter) } -// Custom: GetParser gets `AVBitStreamFilterContext.parser` value. +// GetParser gets `AVBitStreamFilterContext.parser` value. func (obsfc *AVBitStreamFilterContext) GetParser() *AVCodecParserContext { return (*AVCodecParserContext)(obsfc.parser) } -// Custom: GetNext gets `AVBitStreamFilterContext.next` value. +// GetNext gets `AVBitStreamFilterContext.next` value. func (obsfc *AVBitStreamFilterContext) GetNext() *AVBitStreamFilterContext { return (*AVBitStreamFilterContext)(obsfc.next) } -// Custom: GetArgs gets `AVBitStreamFilterContext.args` value. +// GetArgs gets `AVBitStreamFilterContext.args` value. func (obsfc *AVBitStreamFilterContext) GetArgs() string { return C.GoString(obsfc.args) } // Deprecated: Use AVBSFContext instead. +// +// AvRegisterBitstreamFilter func AvRegisterBitstreamFilter(bsf *AVBitStreamFilter) { C.av_register_bitstream_filter((*C.struct_AVBitStreamFilter)(bsf)) } // Deprecated: Use AVBSFContext instead. +// +// AvBitstreamFilterInit func AvBitstreamFilterInit(name string) *AVBitStreamFilterContext { namePtr, nameFunc := StringCasting(name) defer nameFunc() @@ -4832,6 +5383,8 @@ func AvBitstreamFilterInit(name string) *AVBitStreamFilterContext { } // Deprecated: Use AVBSFContext instead. +// +// AvBitstreamFilterFilter func AvBitstreamFilterFilter(bsfc *AVBitStreamFilterContext, avctx *AVCodecContext, args string, outbuf **uint8, poutbufSize *int32, buf *uint8, bufSize int32, keyframe int32) int32 { @@ -4844,16 +5397,22 @@ func AvBitstreamFilterFilter(bsfc *AVBitStreamFilterContext, avctx *AVCodecConte } // Deprecated: Use AVBSFContext instead. +// +// AvBitstreamFilterClose func AvBitstreamFilterClose(bsfc *AVBitStreamFilterContext) { C.av_bitstream_filter_close((*C.struct_AVBitStreamFilterContext)(bsfc)) } // Deprecated: Use AVBSFContext instead. +// +// AvBitstreamFilterNext func AvBitstreamFilterNext(f *AVBitStreamFilter) *AVBitStreamFilter { return (*AVBitStreamFilter)(C.av_bitstream_filter_next((*C.struct_AVBitStreamFilter)(f))) } -// Deprecated: No use +// Deprecated: No use. +// +// AvBsfNext func AvBsfNext(opaque CVoidPointerPointer) *AVBitStreamFilter { return (*AVBitStreamFilter)(C.av_bsf_next(VoidPointerPointer(opaque))) } @@ -4873,12 +5432,18 @@ func AvXiphlacing(s *uint8, v int32) int32 { return (int32)(C.av_xiphlacing((*C.uchar)(s), (C.uint)(v))) } -// Deprecated: No use +// Deprecated: No use. +// +// AvRegisterHwaccel func AvRegisterHwaccel(hwaccel *AVHWAccel) { C.av_register_hwaccel((*C.struct_AVHWAccel)(hwaccel)) } -// Deprecated: No use +// Deprecated: No use. +// +// AvHwaccelNext returns the first registered hardware accelerator if hwaccel is NULL, +// returns the next registered hardware accelerator after hwaccelif hwaccel is non-NULL, +// or NULL if hwaccel is the last one. func AvHwaccelNext(hwaccel *AVHWAccel) *AVHWAccel { return (*AVHWAccel)(C.av_hwaccel_next((*C.struct_AVHWAccel)(hwaccel))) } @@ -4893,9 +5458,11 @@ const ( AV_LOCK_DESTROY = AVLockOp(C.AV_LOCK_DESTROY) ) -// typedef int (*av_lockmgr_cb)(void **mutex, enum AVLockOp op) +// typedef int (*av_lockmgr_cb)(void **mutex, enum AVLockOp op); type AVLockmgrCb C.av_lockmgr_cb +// Deprecated: No use. +// // AvLockmgrRegister func AvLockmgrRegister(cb AVLockmgrCb) int32 { return (int32)(C.av_lockmgr_register((C.av_lockmgr_cb)(cb))) diff --git a/avcodec_avdct.go b/avcodec_avdct.go index 52fe7a7..2e9cb5e 100644 --- a/avcodec_avdct.go +++ b/avcodec_avdct.go @@ -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) } diff --git a/avcodec_avfft.go b/avcodec_avfft.go index 9094bce..6ae5892 100644 --- a/avcodec_avfft.go +++ b/avcodec_avfft.go @@ -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) } diff --git a/avcodec_bsf.go b/avcodec_bsf.go index 897fd79..5d30831 100644 --- a/avcodec_bsf.go +++ b/avcodec_bsf.go @@ -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)) } diff --git a/avcodec_codec.go b/avcodec_codec.go index e2291ab..935aef2 100644 --- a/avcodec_codec.go +++ b/avcodec_codec.go @@ -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))) } diff --git a/avcodec_codec_desc.go b/avcodec_codec_desc.go index 129d20f..8874b28 100644 --- a/avcodec_codec_desc.go +++ b/avcodec_codec_desc.go @@ -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 diff --git a/avcodec_codec_par.go b/avcodec_codec_par.go index 9742529..da2a706 100644 --- a/avcodec_codec_par.go +++ b/avcodec_codec_par.go @@ -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) } diff --git a/avcodec_dirac.go b/avcodec_dirac.go index 6d9ca3a..664e34f 100644 --- a/avcodec_dirac.go +++ b/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) } diff --git a/avcodec_dv_profile.go b/avcodec_dv_profile.go index 3e82738..c97bdad 100644 --- a/avcodec_dv_profile.go +++ b/avcodec_dv_profile.go @@ -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)) } diff --git a/avcodec_packet.go b/avcodec_packet.go index 488289d..89fe2a0 100644 --- a/avcodec_packet.go +++ b/avcodec_packet.go @@ -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))) } diff --git a/avcodec_vaapi.go b/avcodec_vaapi.go index 3f97952..0326ac8 100644 --- a/avcodec_vaapi.go +++ b/avcodec_vaapi.go @@ -7,5 +7,7 @@ package ffmpeg */ import "C" -// Deprecated: No use +// Deprecated: No use. +// +// VaapiContext type VaapiContext C.struct_vaapi_context diff --git a/avcodec_xvmc.go b/avcodec_xvmc.go index e05be1b..255093e 100644 --- a/avcodec_xvmc.go +++ b/avcodec_xvmc.go @@ -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 diff --git a/avdevice.go b/avdevice.go index f09c74a..468dcdd 100644 --- a/avdevice.go +++ b/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) } diff --git a/avfilter.go b/avfilter.go index 6f158d4..b2b68ae 100644 --- a/avfilter.go +++ b/avfilter.go @@ -59,72 +59,72 @@ const ( // callback functions used to interact with the filter. type AVFilter C.struct_AVFilter -// Custom: GetName gets `AVFilter.name` value. +// GetName gets `AVFilter.name` value. func (flt *AVFilter) GetName() string { return C.GoString(flt.name) } -// Custom: GetDescription gets `AVFilter.description` value. +// GetDescription gets `AVFilter.description` value. func (flt *AVFilter) GetDescription() string { return C.GoString(flt.description) } -// Custom: GetInputs gets `AVFilter.inputs` value. +// GetInputs gets `AVFilter.inputs` value. func (flt *AVFilter) GetInputs() *AVFilterPad { return (*AVFilterPad)(flt.inputs) } -// Custom: SetInputs sets `AVFilter.inputs` value. +// SetInputs sets `AVFilter.inputs` value. func (flt *AVFilter) SetInputs(v *AVFilterPad) { flt.inputs = (*C.struct_AVFilterPad)(v) } -// Custom: GetInputsAddr gets `AVFilter.inputs` address. +// GetInputsAddr gets `AVFilter.inputs` address. func (flt *AVFilter) GetInputsAddr() **AVFilterPad { return (**AVFilterPad)(unsafe.Pointer(&flt.inputs)) } -// Custom: GetOutputs gets `AVFilter.outputs` value. +// GetOutputs gets `AVFilter.outputs` value. func (flt *AVFilter) GetOutputs() *AVFilterPad { return (*AVFilterPad)(flt.outputs) } -// Custom: SetOutputs sets `AVFilter.outputs` value. +// SetOutputs sets `AVFilter.outputs` value. func (flt *AVFilter) SetOutputs(v *AVFilterPad) { flt.outputs = (*C.struct_AVFilterPad)(v) } -// Custom: GetOutputsAddr gets `AVFilter.outputs` address. +// GetOutputsAddr gets `AVFilter.outputs` address. func (flt *AVFilter) GetOutputsAddr() **AVFilterPad { return (**AVFilterPad)(unsafe.Pointer(&flt.outputs)) } -// Custom: GetPrivClass gets `AVFilter.priv_class` value. +// GetPrivClass gets `AVFilter.priv_class` value. func (flt *AVFilter) GetPrivClass() *AVClass { return (*AVClass)(flt.priv_class) } -// Custom: SetPrivClass sets `AVFilter.priv_class` value. +// SetPrivClass sets `AVFilter.priv_class` value. func (flt *AVFilter) SetPrivClass(v *AVClass) { flt.priv_class = (*C.struct_AVClass)(v) } -// Custom: GetPrivClassAddr gets `AVFilter.priv_class` address. +// GetPrivClassAddr gets `AVFilter.priv_class` address. func (flt *AVFilter) GetPrivClassAddr() **AVClass { return (**AVClass)(unsafe.Pointer(&flt.priv_class)) } -// Custom: GetFlags gets `AVFilter.flags` value. +// GetFlags gets `AVFilter.flags` value. func (flt *AVFilter) GetFlags() int32 { return (int32)(flt.flags) } -// Custom: SetFlags sets `AVFilter.flags` value. +// SetFlags sets `AVFilter.flags` value. func (flt *AVFilter) SetFlags(v int32) { flt.flags = (C.int)(v) } -// Custom: GetFlagsAddr gets `AVFilter.flags` address. +// GetFlagsAddr gets `AVFilter.flags` address. func (flt *AVFilter) GetFlagsAddr() *int32 { return (*int32)(&flt.flags) } @@ -139,57 +139,63 @@ type AVFilterInternal C.struct_AVFilterInternal // AVFilterContext type AVFilterContext C.struct_AVFilterContext -// Custom: GetAvClass gets `AVFilterContext.av_class` value. +// GetAvClass gets `AVFilterContext.av_class` value. func (fltc *AVFilterContext) GetAvClass() *AVClass { return (*AVClass)(fltc.av_class) } -// Custom: SetAvClass sets `AVFilterContext.av_class` value. +// SetAvClass sets `AVFilterContext.av_class` value. func (fltc *AVFilterContext) SetAvClass(v *AVClass) { fltc.av_class = (*C.struct_AVClass)(v) } -// Custom: GetAvClassAddr gets `AVFilterContext.av_class` address. +// GetAvClassAddr gets `AVFilterContext.av_class` address. func (fltc *AVFilterContext) GetAvClassAddr() **AVClass { return (**AVClass)(unsafe.Pointer(&fltc.av_class)) } -// Custom: GetFilter gets `AVFilterContext.filter` value. +// GetFilter gets `AVFilterContext.filter` value. func (fltc *AVFilterContext) GetFilter() *AVFilter { return (*AVFilter)(fltc.filter) } -// Custom: SetFilter sets `AVFilterContext.filter` value. +// SetFilter sets `AVFilterContext.filter` value. func (fltc *AVFilterContext) SetFilter(v *AVFilter) { fltc.filter = (*C.struct_AVFilter)(v) } -// Custom: GetFilterAddr gets `AVFilterContext.filter` address. +// GetFilterAddr gets `AVFilterContext.filter` address. func (fltc *AVFilterContext) GetFilterAddr() **AVFilter { return (**AVFilter)(unsafe.Pointer(&fltc.filter)) } -// Custom: GetName gets `AVFilterContext.name` value. +// GetName gets `AVFilterContext.name` value. func (fltc *AVFilterContext) GetName() string { return C.GoString(fltc.name) } -// Custom: GetInputPads gets `AVFilterContext.input_pads` value. +// SetName sets `AVFilterContext.name` value. +func (fltc *AVFilterContext) SetName(v string) { + C.free(unsafe.Pointer(fltc.name)) + fltc.name, _ = StringCasting(v) +} + +// GetInputPads gets `AVFilterContext.input_pads` value. func (fltc *AVFilterContext) GetInputPads() *AVFilterPad { return (*AVFilterPad)(fltc.input_pads) } -// Custom: SetInputPads sets `AVFilterContext.input_pads` value. +// SetInputPads sets `AVFilterContext.input_pads` value. func (fltc *AVFilterContext) SetInputPads(v *AVFilterPad) { fltc.input_pads = (*C.struct_AVFilterPad)(v) } -// Custom: GetInputPadsAddr gets `AVFilterContext.input_pads` address. +// GetInputPadsAddr gets `AVFilterContext.input_pads` address. func (fltc *AVFilterContext) GetInputPadsAddr() **AVFilterPad { return (**AVFilterPad)(unsafe.Pointer(&fltc.input_pads)) } -// Custom: GetInputs gets `AVFilterContext.inputs` value. +// GetInputs gets `AVFilterContext.inputs` value. func (fltc *AVFilterContext) GetInputs() []*AVFilterLink { if fltc.inputs == nil { return nil @@ -197,47 +203,47 @@ func (fltc *AVFilterContext) GetInputs() []*AVFilterLink { return unsafe.Slice((**AVFilterLink)(unsafe.Pointer(fltc.inputs)), fltc.nb_inputs) } -// Custom: SetInputs sets `AVFilterContext.inputs` value. +// SetInputs sets `AVFilterContext.inputs` value. func (fltc *AVFilterContext) SetInputs(v **AVFilterLink) { fltc.inputs = (**C.struct_AVFilterLink)(unsafe.Pointer(v)) } -// Custom: GetInputsAddr gets `AVFilterContext.inputs` address. +// GetInputsAddr gets `AVFilterContext.inputs` address. func (fltc *AVFilterContext) GetInputsAddr() ***AVFilterLink { return (***AVFilterLink)(unsafe.Pointer(&fltc.inputs)) } -// Custom: GetNbInputs gets `AVFilterContext.nb_inputs` value. +// GetNbInputs gets `AVFilterContext.nb_inputs` value. func (fltc *AVFilterContext) GetNbInputs() uint32 { return (uint32)(fltc.nb_inputs) } -// Custom: SetNbInputs sets `AVFilterContext.nb_inputs` value. +// SetNbInputs sets `AVFilterContext.nb_inputs` value. func (fltc *AVFilterContext) SetNbInputs(v uint32) { fltc.nb_inputs = (C.uint)(v) } -// Custom: GetNbInputsAddr gets `AVFilterContext.nb_inputs` address. +// GetNbInputsAddr gets `AVFilterContext.nb_inputs` address. func (fltc *AVFilterContext) GetNbInputsAddr() *uint32 { return (*uint32)(&fltc.nb_inputs) } -// Custom: GetOutputPads gets `AVFilterContext.output_pads` value. +// GetOutputPads gets `AVFilterContext.output_pads` value. func (fltc *AVFilterContext) GetOutputPads() *AVFilterPad { return (*AVFilterPad)(unsafe.Pointer(fltc.output_pads)) } -// Custom: SetOutputPads sets `AVFilterContext.output_pads` value. +// SetOutputPads sets `AVFilterContext.output_pads` value. func (fltc *AVFilterContext) SetOutputPads(v *AVFilterPad) { fltc.output_pads = (*C.struct_AVFilterPad)(v) } -// Custom: GetOutputPadsAddr gets `AVFilterContext.output_pads` address. +// GetOutputPadsAddr gets `AVFilterContext.output_pads` address. func (fltc *AVFilterContext) GetOutputPadsAddr() **AVFilterPad { return (**AVFilterPad)(unsafe.Pointer(&fltc.output_pads)) } -// Custom: GetOutputs gets `AVFilterContext.outputs` value. +// GetOutputs gets `AVFilterContext.outputs` value. func (fltc *AVFilterContext) GetOutputs() []*AVFilterLink { if fltc.outputs == nil { return nil @@ -245,87 +251,87 @@ func (fltc *AVFilterContext) GetOutputs() []*AVFilterLink { return unsafe.Slice((**AVFilterLink)(unsafe.Pointer(fltc.outputs)), fltc.nb_outputs) } -// Custom: SetOutputs sets `AVFilterContext.outputs` value. +// SetOutputs sets `AVFilterContext.outputs` value. func (fltc *AVFilterContext) SetOutputs(v **AVFilterLink) { fltc.outputs = (**C.struct_AVFilterLink)(unsafe.Pointer(v)) } -// Custom: GetOutputsAddr gets `AVFilterContext.outputs` address. +// GetOutputsAddr gets `AVFilterContext.outputs` address. func (fltc *AVFilterContext) GetOutputsAddr() ***AVFilterLink { return (***AVFilterLink)(unsafe.Pointer(&fltc.outputs)) } -// Custom: GetNbOutputs gets `AVFilterContext.nb_outputs` value. +// GetNbOutputs gets `AVFilterContext.nb_outputs` value. func (fltc *AVFilterContext) GetNbOutputs() uint32 { return (uint32)(fltc.nb_outputs) } -// Custom: SetNbOutputs sets `AVFilterContext.nb_outputs` value. +// SetNbOutputs sets `AVFilterContext.nb_outputs` value. func (fltc *AVFilterContext) SetNbOutputs(v uint32) { fltc.nb_outputs = (C.uint)(v) } -// Custom: GetNbOutputsAddr gets `AVFilterContext.nb_outputs` address. +// GetNbOutputsAddr gets `AVFilterContext.nb_outputs` address. func (fltc *AVFilterContext) GetNbOutputsAddr() *uint32 { return (*uint32)(&fltc.nb_outputs) } -// Custom: GetPriv gets `AVFilterContext.priv` value. +// GetPriv gets `AVFilterContext.priv` value. func (fltc *AVFilterContext) GetPriv() unsafe.Pointer { return fltc.priv } -// Custom: SetPriv sets `AVFilterContext.priv` value. +// SetPriv sets `AVFilterContext.priv` value. func (fltc *AVFilterContext) SetPriv(v CVoidPointer) { fltc.priv = VoidPointer(v) } -// Custom: GetPrivAddr gets `AVFilterContext.priv` address. +// GetPrivAddr gets `AVFilterContext.priv` address. func (fltc *AVFilterContext) GetPrivAddr() *unsafe.Pointer { return &fltc.priv } -// Custom: GetGraph gets `AVFilterContext.graph` value. +// GetGraph gets `AVFilterContext.graph` value. func (fltc *AVFilterContext) GetGraph() *AVFilterGraph { return (*AVFilterGraph)(fltc.graph) } -// Custom: SetGraph sets `AVFilterContext.graph` value. +// SetGraph sets `AVFilterContext.graph` value. func (fltc *AVFilterContext) SetGraph(v *AVFilterGraph) { fltc.graph = (*C.struct_AVFilterGraph)(v) } -// Custom: GetGraphAddr gets `AVFilterContext.graph` address. +// GetGraphAddr gets `AVFilterContext.graph` address. func (fltc *AVFilterContext) GetGraphAddr() **AVFilterGraph { return (**AVFilterGraph)(unsafe.Pointer(&fltc.graph)) } -// Custom: GetThreadType gets `AVFilterContext.threadtype` value. +// GetThreadType gets `AVFilterContext.threadtype` value. func (fltc *AVFilterContext) GetThreadType() int32 { return (int32)(fltc.thread_type) } -// Custom: SetThreadType sets `AVFilterContext.threadtype` value. +// SetThreadType sets `AVFilterContext.threadtype` value. func (fltc *AVFilterContext) SetThreadType(v int32) { fltc.thread_type = (C.int)(v) } -// Custom: GetThreadTypeAddr gets `AVFilterContext.threadtype` address. +// GetThreadTypeAddr gets `AVFilterContext.threadtype` address. func (fltc *AVFilterContext) GetThreadTypeAddr() *int32 { return (*int32)(&fltc.thread_type) } -// Custom: GetInternal gets `AVFilterContext.internal` value. +// GetInternal gets `AVFilterContext.internal` value. func (fltc *AVFilterContext) GetInternal() *AVFilterInternal { return (*AVFilterInternal)(fltc.internal) } -// Custom: SetInternal sets `AVFilterContext.internal` value. +// SetInternal sets `AVFilterContext.internal` value. func (fltc *AVFilterContext) SetInternal(v *AVFilterInternal) { fltc.internal = (*C.struct_AVFilterInternal)(v) } -// Custom: GetInternalAddr gets `AVFilterContext.internal` address. +// GetInternalAddr gets `AVFilterContext.internal` address. func (fltc *AVFilterContext) GetInternalAddr() **AVFilterInternal { return (**AVFilterInternal)(unsafe.Pointer(&fltc.internal)) } @@ -333,127 +339,127 @@ func (fltc *AVFilterContext) GetInternalAddr() **AVFilterInternal { // AVFilterCommand type AVFilterCommand C.struct_AVFilterCommand -// Custom: GetCommandQueue gets `AVFilterContext.command_queue` value. +// GetCommandQueue gets `AVFilterContext.command_queue` value. func (fltc *AVFilterContext) GetCommandQueue() *AVFilterCommand { return (*AVFilterCommand)(fltc.command_queue) } -// Custom: SetCommandQueue sets `AVFilterContext.command_queue` value. +// SetCommandQueue sets `AVFilterContext.command_queue` value. func (fltc *AVFilterContext) SetCommandQueue(v *AVFilterCommand) { fltc.command_queue = (*C.struct_AVFilterCommand)(v) } -// Custom: GetCommandQueueAddr gets `AVFilterContext.command_queue` address. +// GetCommandQueueAddr gets `AVFilterContext.command_queue` address. func (fltc *AVFilterContext) GetCommandQueueAddr() **AVFilterCommand { return (**AVFilterCommand)(unsafe.Pointer(&fltc.command_queue)) } -// Custom: GetEnableStr gets `AVFilterContext.enable_str` value. +// GetEnableStr gets `AVFilterContext.enable_str` value. func (fltc *AVFilterContext) GetEnableStr() string { return C.GoString(fltc.enable_str) } -// Custom: GetEnable gets `AVFilterContext.enable` value. +// GetEnable gets `AVFilterContext.enable` value. func (fltc *AVFilterContext) GetEnable() unsafe.Pointer { return fltc.enable } -// Custom: SetEnable sets `AVFilterContext.enable` value. +// SetEnable sets `AVFilterContext.enable` value. func (fltc *AVFilterContext) SetEnable(v CVoidPointer) { fltc.enable = VoidPointer(v) } -// Custom: GetEnableAddr gets `AVFilterContext.enable` address. +// GetEnableAddr gets `AVFilterContext.enable` address. func (fltc *AVFilterContext) GetEnableAddr() *unsafe.Pointer { return &fltc.enable } -// Custom: GetVarValues gets `AVFilterContext.var_values` value. +// GetVarValues gets `AVFilterContext.var_values` value. func (fltc *AVFilterContext) GetVarValues() *float64 { return (*float64)(fltc.var_values) } -// Custom: SetVarValues sets `AVFilterContext.var_values` value. +// SetVarValues sets `AVFilterContext.var_values` value. func (fltc *AVFilterContext) SetVarValues(v *float64) { fltc.var_values = (*C.double)(v) } -// Custom: GetVarValuesAddr gets `AVFilterContext.var_values` address. +// GetVarValuesAddr gets `AVFilterContext.var_values` address. func (fltc *AVFilterContext) GetVarValuesAddr() **float64 { return (**float64)(unsafe.Pointer(&fltc.var_values)) } -// Custom: GetIsDisabled gets `AVFilterContext.is_disabled` value. +// GetIsDisabled gets `AVFilterContext.is_disabled` value. func (fltc *AVFilterContext) GetIsDisabled() int32 { return (int32)(fltc.is_disabled) } -// Custom: SetIsDisabled sets `AVFilterContext.is_disabled` value. +// SetIsDisabled sets `AVFilterContext.is_disabled` value. func (fltc *AVFilterContext) SetIsDisabled(v int32) { fltc.is_disabled = (C.int)(v) } -// Custom: GetIsDisabledAddr gets `AVFilterContext.is_disabled` address. +// GetIsDisabledAddr gets `AVFilterContext.is_disabled` address. func (fltc *AVFilterContext) GetIsDisabledAddr() *int32 { return (*int32)(&fltc.is_disabled) } -// Custom: GetHwDeviceCtx gets `AVFilterContext.hw_device_ctx` value. +// GetHwDeviceCtx gets `AVFilterContext.hw_device_ctx` value. func (fltc *AVFilterContext) GetHwDeviceCtx() *AVBufferRef { return (*AVBufferRef)(fltc.hw_device_ctx) } -// Custom: SetHwDeviceCtx sets `AVFilterContext.hw_device_ctx` value. +// SetHwDeviceCtx sets `AVFilterContext.hw_device_ctx` value. func (fltc *AVFilterContext) SetHwDeviceCtx(v *AVBufferRef) { fltc.hw_device_ctx = (*C.struct_AVBufferRef)(v) } -// Custom: GetHwDeviceCtxAddr gets `AVFilterContext.hw_device_ctx` address. +// GetHwDeviceCtxAddr gets `AVFilterContext.hw_device_ctx` address. func (fltc *AVFilterContext) GetHwDeviceCtxAddr() **AVBufferRef { return (**AVBufferRef)(unsafe.Pointer(&fltc.hw_device_ctx)) } -// Custom: GetNbThreads gets `AVFilterContext.nb_threads` value. +// GetNbThreads gets `AVFilterContext.nb_threads` value. func (fltc *AVFilterContext) GetNbThreads() int32 { return (int32)(fltc.nb_threads) } -// Custom: SetNbThreads sets `AVFilterContext.nb_threads` value. +// SetNbThreads sets `AVFilterContext.nb_threads` value. func (fltc *AVFilterContext) SetNbThreads(v int32) { fltc.nb_threads = (C.int)(v) } -// Custom: GetNbThreadsAddr gets `AVFilterContext.nb_threads` address. +// GetNbThreadsAddr gets `AVFilterContext.nb_threads` address. func (fltc *AVFilterContext) GetNbThreadsAddr() *int32 { return (*int32)(&fltc.nb_threads) } -// Custom: GetReady gets `AVFilterContext.ready` value. +// GetReady gets `AVFilterContext.ready` value. func (fltc *AVFilterContext) GetReady() uint32 { return (uint32)(fltc.ready) } -// Custom: SetReady sets `AVFilterContext.ready` value. +// SetReady sets `AVFilterContext.ready` value. func (fltc *AVFilterContext) SetReady(v uint32) { fltc.ready = (C.uint)(v) } -// Custom: GetReadyAddr gets `AVFilterContext.ready` address. +// GetReadyAddr gets `AVFilterContext.ready` address. func (fltc *AVFilterContext) GetReadyAddr() *uint32 { return (*uint32)(&fltc.ready) } -// Custom: GetExtraHwFrames gets `AVFilterContext.extra_hw_frames` value. +// GetExtraHwFrames gets `AVFilterContext.extra_hw_frames` value. func (fltc *AVFilterContext) GetExtraHwFrames() int32 { return (int32)(fltc.extra_hw_frames) } -// Custom: SetExtraHwFrames sets `AVFilterContext.extra_hw_frames` value. +// SetExtraHwFrames sets `AVFilterContext.extra_hw_frames` value. func (fltc *AVFilterContext) SetExtraHwFrames(v int32) { fltc.extra_hw_frames = (C.int)(v) } -// Custom: GetExtraHwFramesAddr gets `AVFilterContext.extra_hw_frames` address. +// GetExtraHwFramesAddr gets `AVFilterContext.extra_hw_frames` address. func (fltc *AVFilterContext) GetExtraHwFramesAddr() *int32 { return (*int32)(&fltc.extra_hw_frames) } @@ -461,47 +467,47 @@ func (fltc *AVFilterContext) GetExtraHwFramesAddr() *int32 { // AVFilterFormatsConfig type AVFilterFormatsConfig C.struct_AVFilterFormatsConfig -// Custom: GetFormats gets `AVFilterFormatsConfig.formats` value. +// GetFormats gets `AVFilterFormatsConfig.formats` value. func (fltf *AVFilterFormatsConfig) GetFormats() *AVFilterFormats { return (*AVFilterFormats)(fltf.formats) } -// Custom: SetFormats sets `AVFilterFormatsConfig.formats` value. +// SetFormats sets `AVFilterFormatsConfig.formats` value. func (fltf *AVFilterFormatsConfig) SetFormats(v *AVFilterFormats) { fltf.formats = (*C.struct_AVFilterFormats)(v) } -// Custom: GetFormatsAddr gets `AVFilterFormatsConfig.formats` address. +// GetFormatsAddr gets `AVFilterFormatsConfig.formats` address. func (fltf *AVFilterFormatsConfig) GetFormatsAddr() **AVFilterFormats { return (**AVFilterFormats)(unsafe.Pointer(&fltf.formats)) } -// Custom: GetSamplerates gets `AVFilterFormatsConfig.samplerates` value. +// GetSamplerates gets `AVFilterFormatsConfig.samplerates` value. func (fltf *AVFilterFormatsConfig) GetSamplerates() *AVFilterFormats { return (*AVFilterFormats)(fltf.samplerates) } -// Custom: SetSamplerates sets `AVFilterFormatsConfig.samplerates` value. +// SetSamplerates sets `AVFilterFormatsConfig.samplerates` value. func (fltf *AVFilterFormatsConfig) SetSamplerates(v *AVFilterFormats) { fltf.samplerates = (*C.struct_AVFilterFormats)(v) } -// Custom: GetSampleratesAddr gets `AVFilterFormatsConfig.samplerates` address. +// GetSampleratesAddr gets `AVFilterFormatsConfig.samplerates` address. func (fltf *AVFilterFormatsConfig) GetSampleratesAddr() **AVFilterFormats { return (**AVFilterFormats)(unsafe.Pointer(&fltf.samplerates)) } -// Custom: GetChannelLayouts gets `AVFilterFormatsConfig.channel_layouts` value. +// GetChannelLayouts gets `AVFilterFormatsConfig.channel_layouts` value. func (fltf *AVFilterFormatsConfig) GetChannelLayouts() *AVFilterChannelLayouts { return (*AVFilterChannelLayouts)(fltf.channel_layouts) } -// Custom: SetChannelLayouts sets `AVFilterFormatsConfig.channel_layouts` value. +// SetChannelLayouts sets `AVFilterFormatsConfig.channel_layouts` value. func (fltf *AVFilterFormatsConfig) SetChannelLayouts(v *AVFilterChannelLayouts) { fltf.channel_layouts = (*C.struct_AVFilterChannelLayouts)(v) } -// Custom: GetChannelLayoutsAddr gets `AVFilterFormatsConfig.channel_layouts` address. +// GetChannelLayoutsAddr gets `AVFilterFormatsConfig.channel_layouts` address. func (fltf *AVFilterFormatsConfig) GetChannelLayoutsAddr() **AVFilterChannelLayouts { return (**AVFilterChannelLayouts)(unsafe.Pointer(&fltf.channel_layouts)) } @@ -509,182 +515,182 @@ func (fltf *AVFilterFormatsConfig) GetChannelLayoutsAddr() **AVFilterChannelLayo // AVFilterLink type AVFilterLink C.struct_AVFilterLink -// Custom: GetSrc gets `AVFilterLink.src` value. +// GetSrc gets `AVFilterLink.src` value. func (fltl *AVFilterLink) GetSrc() *AVFilterContext { return (*AVFilterContext)(fltl.src) } -// Custom: SetSrc sets `AVFilterLink.src` value. +// SetSrc sets `AVFilterLink.src` value. func (fltl *AVFilterLink) SetSrc(v *AVFilterContext) { fltl.src = (*C.struct_AVFilterContext)(v) } -// Custom: GetSrcAddr gets `AVFilterLink.src` address. +// GetSrcAddr gets `AVFilterLink.src` address. func (fltl *AVFilterLink) GetSrcAddr() **AVFilterContext { return (**AVFilterContext)(unsafe.Pointer(&fltl.src)) } -// Custom: GetSrcpad gets `AVFilterLink.srcpad` value. +// GetSrcpad gets `AVFilterLink.srcpad` value. func (fltl *AVFilterLink) GetSrcpad() *AVFilterPad { return (*AVFilterPad)(fltl.srcpad) } -// Custom: SetSrcpad sets `AVFilterLink.srcpad` value. +// SetSrcpad sets `AVFilterLink.srcpad` value. func (fltl *AVFilterLink) SetSrcpad(v *AVFilterPad) { fltl.srcpad = (*C.struct_AVFilterPad)(v) } -// Custom: GetSrcpadAddr gets `AVFilterLink.srcpad` address. +// GetSrcpadAddr gets `AVFilterLink.srcpad` address. func (fltl *AVFilterLink) GetSrcpadAddr() **AVFilterPad { return (**AVFilterPad)(unsafe.Pointer(&fltl.srcpad)) } -// Custom: GetDst gets `AVFilterLink.dst` value. +// GetDst gets `AVFilterLink.dst` value. func (fltl *AVFilterLink) GetDst() *AVFilterContext { return (*AVFilterContext)(fltl.dst) } -// Custom: SetDst sets `AVFilterLink.dst` value. +// SetDst sets `AVFilterLink.dst` value. func (fltl *AVFilterLink) SetDst(v *AVFilterContext) { fltl.dst = (*C.struct_AVFilterContext)(v) } -// Custom: GetDstAddr gets `AVFilterLink.dst` address. +// GetDstAddr gets `AVFilterLink.dst` address. func (fltl *AVFilterLink) GetDstAddr() **AVFilterContext { return (**AVFilterContext)(unsafe.Pointer(&fltl.dst)) } -// Custom: GetDstpad gets `AVFilterLink.dstpad` value. +// GetDstpad gets `AVFilterLink.dstpad` value. func (fltl *AVFilterLink) GetDstpad() *AVFilterPad { return (*AVFilterPad)(fltl.dstpad) } -// Custom: SetDstpad sets `AVFilterLink.dstpad` value. +// SetDstpad sets `AVFilterLink.dstpad` value. func (fltl *AVFilterLink) SetDstpad(v *AVFilterPad) { fltl.dstpad = (*C.struct_AVFilterPad)(v) } -// Custom: GetDstpadAddr gets `AVFilterLink.dstpad` address. +// GetDstpadAddr gets `AVFilterLink.dstpad` address. func (fltl *AVFilterLink) GetDstpadAddr() **AVFilterPad { return (**AVFilterPad)(unsafe.Pointer(&fltl.dstpad)) } -// Custom: GetType gets `AVFilterLink.type` value. +// GetType gets `AVFilterLink.type` value. func (fltl *AVFilterLink) GetType() AVMediaType { return (AVMediaType)(fltl._type) } -// Custom: SetType sets `AVFilterLink.type` value. +// SetType sets `AVFilterLink.type` value. func (fltl *AVFilterLink) SetType(v AVMediaType) { fltl._type = (C.enum_AVMediaType)(v) } -// Custom: GetTypeAddr gets `AVFilterLink.type` address. +// GetTypeAddr gets `AVFilterLink.type` address. func (fltl *AVFilterLink) GetTypeAddr() *AVMediaType { return (*AVMediaType)(&fltl._type) } -// Custom: GetW gets `AVFilterLink.w` value. +// GetW gets `AVFilterLink.w` value. func (fltl *AVFilterLink) GetW() int32 { return (int32)(fltl.w) } -// Custom: SetW sets `AVFilterLink.w` value. +// SetW sets `AVFilterLink.w` value. func (fltl *AVFilterLink) SetW(v int32) { fltl.w = (C.int)(v) } -// Custom: GetWAddr gets `AVFilterLink.w` address. +// GetWAddr gets `AVFilterLink.w` address. func (fltl *AVFilterLink) GetWAddr() *int32 { return (*int32)(&fltl.w) } -// Custom: GetH gets `AVFilterLink.h` value. +// GetH gets `AVFilterLink.h` value. func (fltl *AVFilterLink) GetH() int32 { return (int32)(fltl.h) } -// Custom: SetH sets `AVFilterLink.h` value. +// SetH sets `AVFilterLink.h` value. func (fltl *AVFilterLink) SetH(v int32) { fltl.h = (C.int)(v) } -// Custom: GetHAddr gets `AVFilterLink.h` address. +// GetHAddr gets `AVFilterLink.h` address. func (fltl *AVFilterLink) GetHAddr() *int32 { return (*int32)(&fltl.h) } -// Custom: GetSampleAspectRatio gets `AVFilterLink.sample_aspect_ratio` value. +// GetSampleAspectRatio gets `AVFilterLink.sample_aspect_ratio` value. func (fltl *AVFilterLink) GetSampleAspectRatio() AVRational { return (AVRational)(fltl.sample_aspect_ratio) } -// Custom: SetSampleAspectRatio sets `AVFilterLink.sample_aspect_ratio` value. +// SetSampleAspectRatio sets `AVFilterLink.sample_aspect_ratio` value. func (fltl *AVFilterLink) SetSampleAspectRatio(v AVRational) { fltl.sample_aspect_ratio = (C.struct_AVRational)(v) } -// Custom: GetSampleAspectRatioAddr gets `AVFilterLink.sample_aspect_ratio` address. +// GetSampleAspectRatioAddr gets `AVFilterLink.sample_aspect_ratio` address. func (fltl *AVFilterLink) GetSampleAspectRatioAddr() *AVRational { return (*AVRational)(&fltl.sample_aspect_ratio) } -// Custom: GetChannelLayout gets `AVFilterLink.channel_layout` value. +// GetChannelLayout gets `AVFilterLink.channel_layout` value. func (fltl *AVFilterLink) GetChannelLayout() uint64 { return (uint64)(fltl.channel_layout) } -// Custom: SetChannelLayout sets `AVFilterLink.channel_layout` value. +// SetChannelLayout sets `AVFilterLink.channel_layout` value. func (fltl *AVFilterLink) SetChannelLayout(v uint64) { fltl.channel_layout = (C.uint64_t)(v) } -// Custom: GetChannelLayoutAddr gets `AVFilterLink.channel_layout` address. +// GetChannelLayoutAddr gets `AVFilterLink.channel_layout` address. func (fltl *AVFilterLink) GetChannelLayoutAddr() *uint64 { return (*uint64)(&fltl.channel_layout) } -// Custom: GetSampleRate gets `AVFilterLink.sample_rate` value. +// GetSampleRate gets `AVFilterLink.sample_rate` value. func (fltl *AVFilterLink) GetSampleRate() int32 { return (int32)(fltl.sample_rate) } -// Custom: SetSampleRate sets `AVFilterLink.sample_rate` value. +// SetSampleRate sets `AVFilterLink.sample_rate` value. func (fltl *AVFilterLink) SetSampleRate(v int32) { fltl.sample_rate = (C.int)(v) } -// Custom: GetSampleRateAddr gets `AVFilterLink.sample_rate` address. +// GetSampleRateAddr gets `AVFilterLink.sample_rate` address. func (fltl *AVFilterLink) GetSampleRateAddr() *int32 { return (*int32)(&fltl.sample_rate) } -// Custom: GetFormat gets `AVFilterLink.format` value. +// GetFormat gets `AVFilterLink.format` value. func (fltl *AVFilterLink) GetFormat() int32 { return (int32)(fltl.format) } -// Custom: SetFormat sets `AVFilterLink.format` value. +// SetFormat sets `AVFilterLink.format` value. func (fltl *AVFilterLink) SetFormat(v int32) { fltl.format = (C.int)(v) } -// Custom: GetFormatAddr gets `AVFilterLink.format` address. +// GetFormatAddr gets `AVFilterLink.format` address. func (fltl *AVFilterLink) GetFormatAddr() *int32 { return (*int32)(&fltl.format) } -// Custom: GetTimeBase gets `AVFilterLink.time_base` value. +// GetTimeBase gets `AVFilterLink.time_base` value. func (fltl *AVFilterLink) GetTimeBase() AVRational { return (AVRational)(fltl.time_base) } -// Custom: SetTimeBase sets `AVFilterLink.time_base` value. +// SetTimeBase sets `AVFilterLink.time_base` value. func (fltl *AVFilterLink) SetTimeBase(v AVRational) { fltl.time_base = (C.struct_AVRational)(v) } -// Custom: GetTimeBaseAddr gets `AVFilterLink.time_base` address. +// GetTimeBaseAddr gets `AVFilterLink.time_base` address. func (fltl *AVFilterLink) GetTimeBaseAddr() *AVRational { return (*AVRational)(&fltl.time_base) } @@ -702,11 +708,15 @@ func AvFilterLinkFree(link **AVFilterLink) { } // Deprecated: Use av_buffersink_get_channels() instead. +// +// AvFilterLinkGetChannels gets the number of channels of a link. func AvFilterLinkGetChannels(link *AVFilterLink) int32 { return (int32)(C.avfilter_link_get_channels((*C.struct_AVFilterLink)(link))) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFilterLinkSetClosed sets the closed field of a link. func AvFilterLinkSetClosed(link *AVFilterLink, closed int32) { C.avfilter_link_set_closed((*C.struct_AVFilterLink)(link), (C.int)(closed)) } @@ -739,17 +749,23 @@ func AvFilterIterate(opaque CVoidPointerPointer) *AVFilter { return (*AVFilter)(C.av_filter_iterate(VoidPointerPointer(opaque))) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFilterRegisterAll initializes the filter system. Register all builtin filters. func AvFilterRegisterAll() { C.avfilter_register_all() } -// Deprecated: No use +// Deprecated: No use. +// +// AvFilterRegister registers a filter. func AvFilterRegister(filter *AVFilter) { C.avfilter_register((*C.struct_AVFilter)(filter)) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFilterNext iterates over all registered filters. func AvFilterNext(filter *AVFilter) *AVFilter { return (*AVFilter)(C.avfilter_next((*C.struct_AVFilter)(filter))) } @@ -798,32 +814,32 @@ func AvFilterGetClass() *AVClass { // AVFilterGraphInternal type AVFilterGraphInternal C.struct_AVFilterGraphInternal -// typedef int (avfilter_action_func)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) +// typedef int (avfilter_action_func)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs); type AVFilterActionFunc = C.avfilter_action_func // typedef int (avfilter_execute_func)(AVFilterContext *ctx, avfilter_action_func *func, -// void *arg, int *ret, int nb_jobs) +// void *arg, int *ret, int nb_jobs); type AVFilterExecuteFunc = C.avfilter_execute_func // AVFilterGraph type AVFilterGraph C.struct_AVFilterGraph -// Custom: GetAvClass gets `AVFilterGraph.av_class` value. +// GetAvClass gets `AVFilterGraph.av_class` value. func (fltg *AVFilterGraph) GetAvClass() *AVClass { return (*AVClass)(fltg.av_class) } -// Custom: SetAvClass sets `AVFilterGraph.av_class` value. +// SetAvClass sets `AVFilterGraph.av_class` value. func (fltg *AVFilterGraph) SetAvClass(v *AVClass) { fltg.av_class = (*C.struct_AVClass)(v) } -// Custom: GetAvClassAddr gets `AVFilterGraph.av_class` address. +// GetAvClassAddr gets `AVFilterGraph.av_class` address. func (fltg *AVFilterGraph) GetAvClassAddr() **AVClass { return (**AVClass)(unsafe.Pointer(&fltg.av_class)) } -// Custom: GetFilters gets `AVFilterGraph.filters` value. +// GetFilters gets `AVFilterGraph.filters` value. func (fltg *AVFilterGraph) GetFilters() []*AVFilterContext { if fltg.filters == nil { return nil @@ -831,117 +847,119 @@ func (fltg *AVFilterGraph) GetFilters() []*AVFilterContext { return unsafe.Slice((**AVFilterContext)(unsafe.Pointer(fltg.filters)), fltg.nb_filters) } -// Custom: SetFilters sets `AVFilterGraph.filters` value. +// SetFilters sets `AVFilterGraph.filters` value. func (fltg *AVFilterGraph) SetFilters(v **AVFilterContext) { fltg.filters = (**C.struct_AVFilterContext)(unsafe.Pointer(v)) } -// Custom: GetFiltersAddr gets `AVFilterGraph.filters` address. +// GetFiltersAddr gets `AVFilterGraph.filters` address. func (fltg *AVFilterGraph) GetFiltersAddr() ***AVFilterContext { return (***AVFilterContext)(unsafe.Pointer(&fltg.filters)) } -// Custom: GetNbFilters gets `AVFilterGraph.nb_filters` value. +// GetNbFilters gets `AVFilterGraph.nb_filters` value. func (fltg *AVFilterGraph) GetNbFilters() uint32 { return (uint32)(fltg.nb_filters) } -// Custom: SetNbFilters sets `AVFilterGraph.nb_filters` value. +// SetNbFilters sets `AVFilterGraph.nb_filters` value. func (fltg *AVFilterGraph) SetNbFilters(v uint32) { fltg.nb_filters = (C.uint)(v) } -// Custom: GetNbFiltersAddr gets `AVFilterGraph.nb_filters` address. +// GetNbFiltersAddr gets `AVFilterGraph.nb_filters` address. func (fltg *AVFilterGraph) GetNbFiltersAddr() *uint32 { return (*uint32)(&fltg.nb_filters) } -// Custom: GetScaleSwsOpts gets `AVFilterGraph.scale_sws_opts` value. +// GetScaleSwsOpts gets `AVFilterGraph.scale_sws_opts` value. func (fltg *AVFilterGraph) GetScaleSwsOpts() string { return C.GoString(fltg.scale_sws_opts) } -// Custom: GetResampleLavrOpts gets `AVFilterGraph.resample_lavr_opts` value. +// Deprecated: No use. +// +// GetResampleLavrOpts gets `AVFilterGraph.resample_lavr_opts` value. func (fltg *AVFilterGraph) GetResampleLavrOpts() string { return C.GoString(fltg.resample_lavr_opts) } -// Custom: GetThreadType gets `AVFilterGraph.threadtype` value. +// GetThreadType gets `AVFilterGraph.threadtype` value. func (fltg *AVFilterGraph) GetThreadType() int32 { return (int32)(fltg.thread_type) } -// Custom: SetThreadType sets `AVFilterGraph.threadtype` value. +// SetThreadType sets `AVFilterGraph.threadtype` value. func (fltg *AVFilterGraph) SetThreadType(v int32) { fltg.thread_type = (C.int)(v) } -// Custom: GetThreadTypeAddr gets `AVFilterGraph.threadtype` address. +// GetThreadTypeAddr gets `AVFilterGraph.threadtype` address. func (fltg *AVFilterGraph) GetThreadTypeAddr() *int32 { return (*int32)(&fltg.thread_type) } -// Custom: GetNbThreads gets `AVFilterGraph.nb_threads` value. +// GetNbThreads gets `AVFilterGraph.nb_threads` value. func (fltg *AVFilterGraph) GetNbThreads() int32 { return (int32)(fltg.nb_threads) } -// Custom: SetNbThreads sets `AVFilterGraph.nb_threads` value. +// SetNbThreads sets `AVFilterGraph.nb_threads` value. func (fltg *AVFilterGraph) SetNbThreads(v int32) { fltg.nb_threads = (C.int)(v) } -// Custom: GetNbThreadsAddr gets `AVFilterGraph.nb_threads` address. +// GetNbThreadsAddr gets `AVFilterGraph.nb_threads` address. func (fltg *AVFilterGraph) GetNbThreadsAddr() *int32 { return (*int32)(&fltg.nb_threads) } -// Custom: GetInternal gets `AVFilterGraph.internal` value. +// GetInternal gets `AVFilterGraph.internal` value. func (fltg *AVFilterGraph) GetInternal() *AVFilterGraphInternal { return (*AVFilterGraphInternal)(fltg.internal) } -// Custom: SetInternal sets `AVFilterGraph.internal` value. +// SetInternal sets `AVFilterGraph.internal` value. func (fltg *AVFilterGraph) SetInternal(v *AVFilterGraphInternal) { fltg.internal = (*C.struct_AVFilterGraphInternal)(v) } -// Custom: GetInternalAddr gets `AVFilterGraph.internal` address. +// GetInternalAddr gets `AVFilterGraph.internal` address. func (fltg *AVFilterGraph) GetInternalAddr() **AVFilterGraphInternal { return (**AVFilterGraphInternal)(unsafe.Pointer(&fltg.internal)) } -// Custom: GetOpaque gets `AVFilterGraph.opaque` value. +// GetOpaque gets `AVFilterGraph.opaque` value. func (fltg *AVFilterGraph) GetOpaque() unsafe.Pointer { return fltg.opaque } -// Custom: SetOpaque sets `AVFilterGraph.opaque` value. +// SetOpaque sets `AVFilterGraph.opaque` value. func (fltg *AVFilterGraph) SetOpaque(v CVoidPointer) { fltg.opaque = VoidPointer(v) } -// Custom: GetOpaqueAddr gets `AVFilterGraph.opaque` address. +// GetOpaqueAddr gets `AVFilterGraph.opaque` address. func (fltg *AVFilterGraph) GetOpaqueAddr() *unsafe.Pointer { return (*unsafe.Pointer)(&fltg.opaque) } -// Custom: GetExecute gets `AVFilterGraph.execute` value. +// GetExecute gets `AVFilterGraph.execute` value. func (fltg *AVFilterGraph) GetExecute() *AVFilterExecuteFunc { return (*AVFilterExecuteFunc)(fltg.execute) } -// Custom: SetExecute sets `AVFilterGraph.execute` value. +// SetExecute sets `AVFilterGraph.execute` value. func (fltg *AVFilterGraph) SetExecute(v *AVFilterExecuteFunc) { fltg.execute = (*C.avfilter_execute_func)(v) } -// Custom: GetExecuteAddr gets `AVFilterGraph.execute` address. +// GetExecuteAddr gets `AVFilterGraph.execute` address. func (fltg *AVFilterGraph) GetExecuteAddr() **AVFilterExecuteFunc { return (**AVFilterExecuteFunc)(unsafe.Pointer(&fltg.execute)) } -// Custom: GetAresampleSwrOpts gets `AVFilterGraph.aresample_swr_opts` value. +// GetAresampleSwrOpts gets `AVFilterGraph.aresample_swr_opts` value. func (fltg *AVFilterGraph) GetAresampleSwrOpts() string { return C.GoString(fltg.aresample_swr_opts) } @@ -968,8 +986,8 @@ func AvFilterGraphGetFilter(graph *AVFilterGraph, name string) *AVFilterContext } // AvFilterGraphCreateFilter creates and adds a filter instance into an existing graph. -func AvFilterGraphCreateFilter(graph *AVFilterGraph, filtCtx **AVFilterContext, filter *AVFilter, - name, args string, opaque CVoidPointer) int32 { +func AvFilterGraphCreateFilter(filtCtx **AVFilterContext, filter *AVFilter, + name, args string, opaque CVoidPointer, graph *AVFilterGraph) int32 { namePtr, nameFunc := StringCasting(name) defer nameFunc() argsPtr, argsFunc := StringCasting(args) @@ -1003,52 +1021,58 @@ func AvFilterGraphFree(graph **AVFilterGraph) { // AVFilterInOut type AVFilterInOut C.struct_AVFilterInOut -// Custom: GetName gets `AVFilterInOut.name` value. +// GetName gets `AVFilterInOut.name` value. func (fltio *AVFilterInOut) GetName() string { return C.GoString(fltio.name) } -// Custom: GetFilterCtx gets `AVFilterInOut.filter_ctx` value. +// SetName sets `AVFilterInOut.name` value. +func (fltio *AVFilterInOut) SetName(v string) { + C.free(unsafe.Pointer(fltio.name)) + fltio.name, _ = StringCasting(v) +} + +// GetFilterCtx gets `AVFilterInOut.filter_ctx` value. func (fltio *AVFilterInOut) GetFilterCtx() *AVFilterContext { return (*AVFilterContext)(fltio.filter_ctx) } -// Custom: SetFilterCtx sets `AVFilterInOut.filter_ctx` value. +// SetFilterCtx sets `AVFilterInOut.filter_ctx` value. func (fltio *AVFilterInOut) SetFilterCtx(v *AVFilterContext) { fltio.filter_ctx = (*C.struct_AVFilterContext)(v) } -// Custom: GetFilterCtxAddr gets `AVFilterInOut.filter_ctx` address. +// GetFilterCtxAddr gets `AVFilterInOut.filter_ctx` address. func (fltio *AVFilterInOut) GetFilterCtxAddr() **AVFilterContext { return (**AVFilterContext)(unsafe.Pointer(&fltio.filter_ctx)) } -// Custom: GetPadIdx gets `AVFilterInOut.pad_idx` value. +// GetPadIdx gets `AVFilterInOut.pad_idx` value. func (fltio *AVFilterInOut) GetPadIdx() int32 { return (int32)(fltio.pad_idx) } -// Custom: SetPadIdx sets `AVFilterInOut.pad_idx` value. +// SetPadIdx sets `AVFilterInOut.pad_idx` value. func (fltio *AVFilterInOut) SetPadIdx(v int32) { fltio.pad_idx = (C.int)(v) } -// Custom: GetPadIdxAddr gets `AVFilterInOut.pad_idx` address. +// GetPadIdxAddr gets `AVFilterInOut.pad_idx` address. func (fltio *AVFilterInOut) GetPadIdxAddr() *int32 { return (*int32)(&fltio.pad_idx) } -// Custom: GetNext gets `AVFilterInOut.next` value. +// GetNext gets `AVFilterInOut.next` value. func (fltio *AVFilterInOut) GetNext() *AVFilterInOut { return (*AVFilterInOut)(fltio.next) } -// Custom: SetNext sets `AVFilterInOut.next` value. +// SetNext sets `AVFilterInOut.next` value. func (fltio *AVFilterInOut) SetNext(v *AVFilterInOut) { fltio.next = (*C.struct_AVFilterInOut)(v) } -// Custom: GetNextAddr gets `AVFilterInOut.next` address. +// GetNextAddr gets `AVFilterInOut.next` address. func (fltio *AVFilterInOut) GetNextAddr() **AVFilterInOut { return (**AVFilterInOut)(unsafe.Pointer(&fltio.next)) } @@ -1075,7 +1099,7 @@ func AvFilterGraphParse(graph *AVFilterGraph, filters string, inputs, outputs *A } // AvFilterGraphParsePtr adds a graph described by a string to a graph. -func AvFilterGraphParsePtr(graph *AVFilterGraph, filters string, inputs, outputs *AVFilterInOut, +func AvFilterGraphParsePtr(graph *AVFilterGraph, filters string, inputs, outputs **AVFilterInOut, logCtx CVoidPointer) int32 { filtersPtr, filtersFunc := StringCasting(filters) defer filtersFunc() @@ -1087,7 +1111,7 @@ func AvFilterGraphParsePtr(graph *AVFilterGraph, filters string, inputs, outputs // AvFilterGraphParse2 adds a graph described by a string to a graph. func AvFilterGraphParse2(graph *AVFilterGraph, filters string, - inputs, outputs *AVFilterInOut) int32 { + inputs, outputs **AVFilterInOut) int32 { filtersPtr, filtersFunc := StringCasting(filters) defer filtersFunc() return (int32)(C.avfilter_graph_parse2((*C.struct_AVFilterGraph)(graph), diff --git a/avfilter_buffersink.go b/avfilter_buffersink.go index 9f8132a..8927575 100644 --- a/avfilter_buffersink.go +++ b/avfilter_buffersink.go @@ -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()) } diff --git a/avfilter_buffersrc.go b/avfilter_buffersrc.go index e380fbd..5a0adb4 100644 --- a/avfilter_buffersrc.go +++ b/avfilter_buffersrc.go @@ -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) } diff --git a/avformat.go b/avformat.go index eaf8cdf..8d97741 100644 --- a/avformat.go +++ b/avformat.go @@ -3,6 +3,14 @@ package ffmpeg /* #include +typedef int (*av_format_context_open_cb)(struct AVFormatContext *s, AVIOContext **p, const char *url, int flags, + const AVIOInterruptCB *int_cb, AVDictionary **options); + +typedef int (*av_format_context_io_open_func)(struct AVFormatContext *s, AVIOContext **pb, const char *url, + int flags, AVDictionary **options); + +typedef void (*av_format_context_io_close_func)(struct AVFormatContext *s, AVIOContext *pb); + int get_av_index_entry_flags(AVIndexEntry *ie) { return ie->flags; } @@ -44,42 +52,42 @@ type AVCodecTag C.struct_AVCodecTag // AVProbeData type AVProbeData C.struct_AVProbeData -// Custom: GetFilename gets `AVProbeData.filename` value. +// GetFilename gets `AVProbeData.filename` value. func (pd *AVProbeData) GetFilename() string { return C.GoString(pd.filename) } -// Custom: GetBuf gets `AVProbeData.buf` value. +// GetBuf gets `AVProbeData.buf` value. func (pd *AVProbeData) GetBuf() *uint8 { return (*uint8)(pd.buf) } -// Custom: SetBuf sets `AVProbeData.buf` value. +// SetBuf sets `AVProbeData.buf` value. func (pd *AVProbeData) SetBuf(v *uint8) { pd.buf = (*C.uint8_t)(v) } -// Custom: GetBufAddr gets `AVProbeData.buf` address. +// GetBufAddr gets `AVProbeData.buf` address. func (pd *AVProbeData) GetBufAddr() **uint8 { return (**uint8)(unsafe.Pointer(&pd.buf)) } -// Custom: GetBufSize gets `AVProbeData.buf_size` value. +// GetBufSize gets `AVProbeData.buf_size` value. func (pd *AVProbeData) GetBufSize() int32 { return (int32)(pd.buf_size) } -// Custom: SetBufSize sets `AVProbeData.buf_size` value. +// SetBufSize sets `AVProbeData.buf_size` value. func (pd *AVProbeData) SetBufSize(v int32) { pd.buf_size = (C.int)(v) } -// Custom: GetBufSizeAddr gets `AVProbeData.buf_size` address. +// GetBufSizeAddr gets `AVProbeData.buf_size` address. func (pd *AVProbeData) GetBufSizeAddr() *int32 { return (*int32)(&pd.buf_size) } -// Custom: GetMimeType gets `AVProbeData.mimetype` value. +// GetMimeType gets `AVProbeData.mimetype` value. func (pd *AVProbeData) GetMimeType() string { return C.GoString(pd.mime_type) } @@ -115,97 +123,97 @@ const ( // AVOutputFormat type AVOutputFormat C.struct_AVOutputFormat -// Custom: GetName gets `AVOutputFormat.name` value. +// GetName gets `AVOutputFormat.name` value. func (ofmt *AVOutputFormat) GetName() string { return C.GoString(ofmt.name) } -// Custom: GetLongName gets `AVOutputFormat.long_name` value. +// GetLongName gets `AVOutputFormat.long_name` value. func (ofmt *AVOutputFormat) GetLongName() string { return C.GoString(ofmt.long_name) } -// Custom: GetMimeType gets `AVOutputFormat.mimetype` value. +// GetMimeType gets `AVOutputFormat.mimetype` value. func (ofmt *AVOutputFormat) GetMimeType() string { return C.GoString(ofmt.mime_type) } -// Custom: GetExtensions gets `AVOutputFormat.extensions` value. +// GetExtensions gets `AVOutputFormat.extensions` value. func (ofmt *AVOutputFormat) GetExtensions() string { return C.GoString(ofmt.extensions) } -// Custom: GetAudioCodec gets `AVOutputFormat.audio_codec` value. +// GetAudioCodec gets `AVOutputFormat.audio_codec` value. func (ofmt *AVOutputFormat) GetAudioCodec() AVCodecID { return (AVCodecID)(ofmt.audio_codec) } -// Custom: SetAudioCodec sets `AVOutputFormat.audio_codec` value. +// SetAudioCodec sets `AVOutputFormat.audio_codec` value. func (ofmt *AVOutputFormat) SetAudioCodec(v AVCodecID) { ofmt.audio_codec = (C.enum_AVCodecID)(v) } -// Custom: GetAudioCodecAddr gets `AVOutputFormat.audio_codec` address. +// GetAudioCodecAddr gets `AVOutputFormat.audio_codec` address. func (ofmt *AVOutputFormat) GetAudioCodecAddr() *AVCodecID { return (*AVCodecID)(unsafe.Pointer(&ofmt.audio_codec)) } -// Custom: GetVideoCodec gets `AVOutputFormat.video_codec` value. +// GetVideoCodec gets `AVOutputFormat.video_codec` value. func (ofmt *AVOutputFormat) GetVideoCodec() AVCodecID { return (AVCodecID)(ofmt.video_codec) } -// Custom: SetVideoCodec sets `AVOutputFormat.video_codec` value. +// SetVideoCodec sets `AVOutputFormat.video_codec` value. func (ofmt *AVOutputFormat) SetVideoCodec(v AVCodecID) { ofmt.video_codec = (C.enum_AVCodecID)(v) } -// Custom: GetVideoCodecAddr gets `AVOutputFormat.video_codec` address. +// GetVideoCodecAddr gets `AVOutputFormat.video_codec` address. func (ofmt *AVOutputFormat) GetVideoCodecAddr() *AVCodecID { return (*AVCodecID)(unsafe.Pointer(&ofmt.video_codec)) } -// Custom: GetSubtitleCodec gets `AVOutputFormat.subtitle_codec` value. +// GetSubtitleCodec gets `AVOutputFormat.subtitle_codec` value. func (ofmt *AVOutputFormat) GetSubtitleCodec() AVCodecID { return (AVCodecID)(ofmt.subtitle_codec) } -// Custom: SetSubtitleCodec sets `AVOutputFormat.subtitle_codec` value. +// SetSubtitleCodec sets `AVOutputFormat.subtitle_codec` value. func (ofmt *AVOutputFormat) SetSubtitleCodec(v AVCodecID) { ofmt.subtitle_codec = (C.enum_AVCodecID)(v) } -// Custom: GetSubtitleCodecAddr gets `AVOutputFormat.subtitle_codec` address. +// GetSubtitleCodecAddr gets `AVOutputFormat.subtitle_codec` address. func (ofmt *AVOutputFormat) GetSubtitleCodecAddr() *AVCodecID { return (*AVCodecID)(unsafe.Pointer(&ofmt.subtitle_codec)) } -// Custom: GetFlags gets `AVOutputFormat.flags` value. +// GetFlags gets `AVOutputFormat.flags` value. func (ofmt *AVOutputFormat) GetFlags() int32 { return (int32)(ofmt.flags) } -// Custom: SetFlags sets `AVOutputFormat.flags` value. +// SetFlags sets `AVOutputFormat.flags` value. func (ofmt *AVOutputFormat) SetFlags(v int32) { ofmt.flags = (C.int)(v) } -// Custom: GetFlagsAddr gets `AVOutputFormat.flags` address. +// GetFlagsAddr gets `AVOutputFormat.flags` address. func (ofmt *AVOutputFormat) GetFlagsAddr() *int32 { return (*int32)(&ofmt.flags) } -// Custom: GetPrivClass gets `AVOutputFormat.priv_class` value. +// GetPrivClass gets `AVOutputFormat.priv_class` value. func (ofmt *AVOutputFormat) GetPrivClass() *AVClass { return (*AVClass)(ofmt.priv_class) } -// Custom: SetPrivClass sets `AVOutputFormat.priv_class` value. +// SetPrivClass sets `AVOutputFormat.priv_class` value. func (ofmt *AVOutputFormat) SetPrivClass(v *AVClass) { ofmt.priv_class = (*C.struct_AVClass)(v) } -// Custom: GetPrivClassAddr gets `AVOutputFormat.priv_class` address. +// GetPrivClassAddr gets `AVOutputFormat.priv_class` address. func (ofmt *AVOutputFormat) GetPrivClassAddr() **AVClass { return (**AVClass)(unsafe.Pointer(&ofmt.priv_class)) } @@ -213,52 +221,52 @@ func (ofmt *AVOutputFormat) GetPrivClassAddr() **AVClass { // AVInputFormat type AVInputFormat C.struct_AVInputFormat -// Custom: GetName gets `AVInputFormat.name` value. +// GetName gets `AVInputFormat.name` value. func (ifmt *AVInputFormat) GetName() string { return C.GoString(ifmt.name) } -// Custom: GetLongName gets `AVInputFormat.long_name` value. +// GetLongName gets `AVInputFormat.long_name` value. func (ifmt *AVInputFormat) GetLongName() string { return C.GoString(ifmt.long_name) } -// Custom: GetFlags gets `AVInputFormat.flags` value. +// GetFlags gets `AVInputFormat.flags` value. func (ifmt *AVInputFormat) GetFlags() int32 { return (int32)(ifmt.flags) } -// Custom: SetFlags sets `AVInputFormat.flags` value. +// SetFlags sets `AVInputFormat.flags` value. func (ifmt *AVInputFormat) SetFlags(v int32) { ifmt.flags = (C.int)(v) } -// Custom: GetFlagsAddr gets `AVInputFormat.flags` address. +// GetFlagsAddr gets `AVInputFormat.flags` address. func (ifmt *AVInputFormat) GetFlagsAddr() *int32 { return (*int32)(&ifmt.flags) } -// Custom: GetExtensions gets `AVInputFormat.extensions` value. +// GetExtensions gets `AVInputFormat.extensions` value. func (ifmt *AVInputFormat) GetExtensions() string { return C.GoString(ifmt.extensions) } -// Custom: GetPrivClass gets `AVInputFormat.priv_class` value. +// GetPrivClass gets `AVInputFormat.priv_class` value. func (ifmt *AVInputFormat) GetPrivClass() *AVClass { return (*AVClass)(ifmt.priv_class) } -// Custom: SetPrivClass sets `AVInputFormat.priv_class` value. +// SetPrivClass sets `AVInputFormat.priv_class` value. func (ifmt *AVInputFormat) SetPrivClass(v *AVClass) { ifmt.priv_class = (*C.struct_AVClass)(v) } -// Custom: GetPrivClassAddr gets `AVInputFormat.priv_class` address. +// GetPrivClassAddr gets `AVInputFormat.priv_class` address. func (ifmt *AVInputFormat) GetPrivClassAddr() **AVClass { return (**AVClass)(unsafe.Pointer(&ifmt.priv_class)) } -// Custom: GetMimeType gets `AVInputFormat.mimetype` value. +// GetMimeType gets `AVInputFormat.mimetype` value. func (ifmt *AVInputFormat) GetMimeType() string { return C.GoString(ifmt.mime_type) } @@ -278,32 +286,32 @@ const ( // AVIndexEntry type AVIndexEntry C.struct_AVIndexEntry -// Custom: GetPos gets `AVIndexEntry.pos` value. +// GetPos gets `AVIndexEntry.pos` value. func (ie *AVIndexEntry) GetPos() int64 { return (int64)(ie.pos) } -// Custom: SetPos sets `AVIndexEntry.pos` value. +// SetPos sets `AVIndexEntry.pos` value. func (ie *AVIndexEntry) SetPos(v int64) { ie.pos = (C.int64_t)(v) } -// Custom: GetPosAddr gets `AVIndexEntry.pos` address. +// GetPosAddr gets `AVIndexEntry.pos` address. func (ie *AVIndexEntry) GetPosAddr() *int64 { return (*int64)(&ie.pos) } -// Custom: GetTimestamp gets `AVIndexEntry.timestamp` value. +// GetTimestamp gets `AVIndexEntry.timestamp` value. func (ie *AVIndexEntry) GetTimestamp() int64 { return (int64)(ie.timestamp) } -// Custom: SetTimestamp sets `AVIndexEntry.timestamp` value. +// SetTimestamp sets `AVIndexEntry.timestamp` value. func (ie *AVIndexEntry) SetTimestamp(v int64) { ie.timestamp = (C.int64_t)(v) } -// Custom: GetTimestampAddr gets `AVIndexEntry.timestamp` address. +// GetTimestampAddr gets `AVIndexEntry.timestamp` address. func (ie *AVIndexEntry) GetTimestampAddr() *int64 { return (*int64)(&ie.timestamp) } @@ -313,37 +321,37 @@ const ( AVINDEX_DISCARD_FRAME = C.AVINDEX_DISCARD_FRAME ) -// Custom: GetFlags gets `AVIndexEntry.flags` value. +// GetFlags gets `AVIndexEntry.flags` value. func (ie *AVIndexEntry) GetFlags() int32 { return (int32)(C.get_av_index_entry_flags((*C.struct_AVIndexEntry)(ie))) } -// Custom: SetFlags sets `AVIndexEntry.flags` value. +// SetFlags sets `AVIndexEntry.flags` value. func (ie *AVIndexEntry) SetFlags(v int32) { C.set_av_index_entry_flags((*C.struct_AVIndexEntry)(ie), (C.int)(v)) } -// Custom: GetSize gets `AVIndexEntry.size` value. +// GetSize gets `AVIndexEntry.size` value. func (ie *AVIndexEntry) GetSize() int32 { return (int32)(C.get_av_index_entry_size((*C.struct_AVIndexEntry)(ie))) } -// Custom: SetSize sets `AVIndexEntry.size` value. +// SetSize sets `AVIndexEntry.size` value. func (ie *AVIndexEntry) SetSize(v int32) { C.set_av_index_entry_size((*C.struct_AVIndexEntry)(ie), (C.int)(v)) } -// Custom: GetMinDistance gets `AVIndexEntry.min_distance` value. +// GetMinDistance gets `AVIndexEntry.min_distance` value. func (ie *AVIndexEntry) GetMinDistance() int32 { return (int32)(ie.min_distance) } -// Custom: SetMinDistance sets `AVIndexEntry.min_distance` value. +// SetMinDistance sets `AVIndexEntry.min_distance` value. func (ie *AVIndexEntry) SetMinDistance(v int32) { ie.min_distance = (C.int)(v) } -// Custom: GetMinDistanceAddr gets `AVIndexEntry.min_distance` address. +// GetMinDistanceAddr gets `AVIndexEntry.min_distance` address. func (ie *AVIndexEntry) GetMinDistanceAddr() *int32 { return (*int32)(&ie.min_distance) } @@ -383,257 +391,263 @@ const ( // AVStream type AVStream C.struct_AVStream -// Custom: GetIndex gets `AVStream.index` value. +// GetIndex gets `AVStream.index` value. func (stm *AVStream) GetIndex() int32 { return (int32)(stm.index) } -// Custom: SetIndex sets `AVStream.index` value. +// SetIndex sets `AVStream.index` value. func (stm *AVStream) SetIndex(v int32) { stm.index = (C.int)(v) } -// Custom: GetIndexAddr gets `AVStream.index` address. +// GetIndexAddr gets `AVStream.index` address. func (stm *AVStream) GetIndexAddr() *int32 { return (*int32)(&stm.index) } -// Custom: GetId gets `AVStream.id` value. +// GetId gets `AVStream.id` value. func (stm *AVStream) GetId() int32 { return (int32)(stm.id) } -// Custom: SetId sets `AVStream.id` value. +// SetId sets `AVStream.id` value. func (stm *AVStream) SetId(v int32) { stm.id = (C.int)(v) } -// Custom: GetIdAddr gets `AVStream.id` address. +// GetIdAddr gets `AVStream.id` address. func (stm *AVStream) GetIdAddr() *int32 { return (*int32)(&stm.id) } -// Custom: GetCodec gets `AVStream.codec` value. +// Deprecated: No use. +// +// GetCodec gets `AVStream.codec` value. func (stm *AVStream) GetCodec() *AVCodecContext { return (*AVCodecContext)(stm.codec) } -// Custom: SetCodec sets `AVStream.codec` value. +// Deprecated: No use. +// +// SetCodec sets `AVStream.codec` value. func (stm *AVStream) SetCodec(v *AVCodecContext) { stm.codec = (*C.struct_AVCodecContext)(v) } -// Custom: GetCodecAddr gets `AVStream.codec` address. +// Deprecated: No use. +// +// GetCodecAddr gets `AVStream.codec` address. func (stm *AVStream) GetCodecAddr() **AVCodecContext { return (**AVCodecContext)(unsafe.Pointer(&stm.codec)) } -// Custom: GetPrivData gets `AVStream.priv_data` value. +// GetPrivData gets `AVStream.priv_data` value. func (stm *AVStream) GetPrivData() unsafe.Pointer { return stm.priv_data } -// Custom: SetPrivData sets `AVStream.priv_data` value. +// SetPrivData sets `AVStream.priv_data` value. func (stm *AVStream) SetPrivData(v CVoidPointer) { stm.priv_data = VoidPointer(v) } -// Custom: GetPrivDataAddr gets `AVStream.priv_data` address. +// GetPrivDataAddr gets `AVStream.priv_data` address. func (stm *AVStream) GetPrivDataAddr() unsafe.Pointer { return (unsafe.Pointer)(&stm.priv_data) } -// Custom: GetTimeBase gets `AVStream.time_base` value. +// GetTimeBase gets `AVStream.time_base` value. func (stm *AVStream) GetTimeBase() AVRational { return (AVRational)(stm.time_base) } -// Custom: SetTimeBase sets `AVStream.time_base` value. +// SetTimeBase sets `AVStream.time_base` value. func (stm *AVStream) SetTimeBase(v AVRational) { stm.time_base = (C.struct_AVRational)(v) } -// Custom: GetTimeBaseAddr gets `AVStream.time_base` address. +// GetTimeBaseAddr gets `AVStream.time_base` address. func (stm *AVStream) GetTimeBaseAddr() *AVRational { return (*AVRational)(&stm.time_base) } -// Custom: GetStartTime gets `AVStream.start_time` value. +// GetStartTime gets `AVStream.start_time` value. func (stm *AVStream) GetStartTime() int64 { return (int64)(stm.start_time) } -// Custom: SetStartTime sets `AVStream.start_time` value. +// SetStartTime sets `AVStream.start_time` value. func (stm *AVStream) SetStartTime(v int64) { stm.start_time = (C.int64_t)(v) } -// Custom: GetStartTimeAddr gets `AVStream.start_time` address. +// GetStartTimeAddr gets `AVStream.start_time` address. func (stm *AVStream) GetStartTimeAddr() *int64 { return (*int64)(&stm.start_time) } -// Custom: GetDuration gets `AVStream.duration` value. +// GetDuration gets `AVStream.duration` value. func (stm *AVStream) GetDuration() int64 { return (int64)(stm.duration) } -// Custom: SetDuration sets `AVStream.duration` value. +// SetDuration sets `AVStream.duration` value. func (stm *AVStream) SetDuration(v int64) { stm.duration = (C.int64_t)(v) } -// Custom: GetDurationAddr gets `AVStream.duration` address. +// GetDurationAddr gets `AVStream.duration` address. func (stm *AVStream) GetDurationAddr() *int64 { return (*int64)(&stm.duration) } -// Custom: GetNbFrames gets `AVStream.nb_frames` value. +// GetNbFrames gets `AVStream.nb_frames` value. func (stm *AVStream) GetNbFrames() int64 { return (int64)(stm.nb_frames) } -// Custom: SetNbFrames sets `AVStream.nb_frames` value. +// SetNbFrames sets `AVStream.nb_frames` value. func (stm *AVStream) SetNbFrames(v int64) { stm.nb_frames = (C.int64_t)(v) } -// Custom: GetNbFramesAddr gets `AVStream.nb_frames` address. +// GetNbFramesAddr gets `AVStream.nb_frames` address. func (stm *AVStream) GetNbFramesAddr() *int64 { return (*int64)(&stm.nb_frames) } -// Custom: GetDisposition gets `AVStream.disposition` value. +// GetDisposition gets `AVStream.disposition` value. func (stm *AVStream) GetDisposition() int32 { return (int32)(stm.disposition) } -// Custom: SetDisposition sets `AVStream.disposition` value. +// SetDisposition sets `AVStream.disposition` value. func (stm *AVStream) SetDisposition(v int32) { stm.disposition = (C.int)(v) } -// Custom: GetDispositionAddr gets `AVStream.disposition` address. +// GetDispositionAddr gets `AVStream.disposition` address. func (stm *AVStream) GetDispositionAddr() *int32 { return (*int32)(&stm.disposition) } -// Custom: GetDiscard gets `AVStream.discard` value. +// GetDiscard gets `AVStream.discard` value. func (stm *AVStream) GetDiscard() AVDiscard { return (AVDiscard)(stm.discard) } -// Custom: SetDiscard sets `AVStream.discard` value. +// SetDiscard sets `AVStream.discard` value. func (stm *AVStream) SetDiscard(v AVDiscard) { stm.discard = (C.enum_AVDiscard)(v) } -// Custom: GetDiscardAddr gets `AVStream.discard` address. +// GetDiscardAddr gets `AVStream.discard` address. func (stm *AVStream) GetDiscardAddr() *AVDiscard { return (*AVDiscard)(&stm.discard) } -// Custom: GetSampleAspectRatio gets `AVStream.sample_aspect_ratio` value. +// GetSampleAspectRatio gets `AVStream.sample_aspect_ratio` value. func (stm *AVStream) GetSampleAspectRatio() AVRational { return (AVRational)(stm.sample_aspect_ratio) } -// Custom: SetSampleAspectRatio sets `AVStream.sample_aspect_ratio` value. +// SetSampleAspectRatio sets `AVStream.sample_aspect_ratio` value. func (stm *AVStream) SetSampleAspectRatio(v AVRational) { stm.sample_aspect_ratio = (C.struct_AVRational)(v) } -// Custom: GetSampleAspectRatioAddr gets `AVStream.sample_aspect_ratio` address. +// GetSampleAspectRatioAddr gets `AVStream.sample_aspect_ratio` address. func (stm *AVStream) GetSampleAspectRatioAddr() *AVRational { return (*AVRational)(&stm.sample_aspect_ratio) } -// Custom: GetMetadata gets `AVStream.metadata` value. +// GetMetadata gets `AVStream.metadata` value. func (stm *AVStream) GetMetadata() *AVDictionary { return (*AVDictionary)(stm.metadata) } -// Custom: SetMetadata sets `AVStream.metadata` value. +// SetMetadata sets `AVStream.metadata` value. func (stm *AVStream) SetMetadata(v *AVDictionary) { stm.metadata = (*C.struct_AVDictionary)(v) } -// Custom: GetMetadataAddr gets `AVStream.metadata` address. +// GetMetadataAddr gets `AVStream.metadata` address. func (stm *AVStream) GetMetadataAddr() **AVDictionary { return (**AVDictionary)(unsafe.Pointer(&stm.metadata)) } -// Custom: GetAvgFrameRate gets `AVStream.avg_frame_rate` value. +// GetAvgFrameRate gets `AVStream.avg_frame_rate` value. func (stm *AVStream) GetAvgFrameRate() AVRational { return (AVRational)(stm.avg_frame_rate) } -// Custom: SetAvgFrameRate sets `AVStream.avg_frame_rate` value. +// SetAvgFrameRate sets `AVStream.avg_frame_rate` value. func (stm *AVStream) SetAvgFrameRate(v AVRational) { stm.avg_frame_rate = (C.struct_AVRational)(v) } -// Custom: GetAvgFrameRateAddr gets `AVStream.avg_frame_rate` address. +// GetAvgFrameRateAddr gets `AVStream.avg_frame_rate` address. func (stm *AVStream) GetAvgFrameRateAddr() *AVRational { return (*AVRational)(&stm.avg_frame_rate) } -// Custom: GetAttachedPic gets `AVStream.attached_pic` value. +// GetAttachedPic gets `AVStream.attached_pic` value. func (stm *AVStream) GetAttachedPic() AVPacket { return (AVPacket)(stm.attached_pic) } -// Custom: SetAttachedPic sets `AVStream.attached_pic` value. +// SetAttachedPic sets `AVStream.attached_pic` value. func (stm *AVStream) SetAttachedPic(v AVPacket) { stm.attached_pic = (C.struct_AVPacket)(v) } -// Custom: GetAttachedPicAddr gets `AVStream.attached_pic` address. +// GetAttachedPicAddr gets `AVStream.attached_pic` address. func (stm *AVStream) GetAttachedPicAddr() *AVPacket { return (*AVPacket)(&stm.attached_pic) } -// Custom: GetSideData gets `AVStream.side_data` value. +// GetSideData gets `AVStream.side_data` value. func (stm *AVStream) GetSideData() *AVPacketSideData { return (*AVPacketSideData)(stm.side_data) } -// Custom: SetSideData sets `AVStream.side_data` value. +// SetSideData sets `AVStream.side_data` value. func (stm *AVStream) SetSideData(v *AVPacketSideData) { stm.side_data = (*C.struct_AVPacketSideData)(v) } -// Custom: GetSideDataAddr gets `AVStream.side_data` address. +// GetSideDataAddr gets `AVStream.side_data` address. func (stm *AVStream) GetSideDataAddr() **AVPacketSideData { return (**AVPacketSideData)(unsafe.Pointer(&stm.side_data)) } -// Custom: GetNbSideData gets `AVStream.nb_side_data` value. +// GetNbSideData gets `AVStream.nb_side_data` value. func (stm *AVStream) GetNbSideData() int32 { return (int32)(stm.nb_side_data) } -// Custom: SetNbSideData sets `AVStream.nb_side_data` value. +// SetNbSideData sets `AVStream.nb_side_data` value. func (stm *AVStream) SetNbSideData(v int32) { stm.nb_side_data = (C.int)(v) } -// Custom: GetNbSideDataAddr gets `AVStream.nb_side_data` address. +// GetNbSideDataAddr gets `AVStream.nb_side_data` address. func (stm *AVStream) GetNbSideDataAddr() *int32 { return (*int32)(&stm.nb_side_data) } -// Custom: GetEventFlags gets `AVStream.event_flags` value. +// GetEventFlags gets `AVStream.event_flags` value. func (stm *AVStream) GetEventFlags() int32 { return (int32)(stm.event_flags) } -// Custom: SetEventFlags sets `AVStream.event_flags` value. +// SetEventFlags sets `AVStream.event_flags` value. func (stm *AVStream) SetEventFlags(v int32) { stm.event_flags = (C.int)(v) } -// Custom: GetEventFlagsAddr gets `AVStream.event_flags` address. +// GetEventFlagsAddr gets `AVStream.event_flags` address. func (stm *AVStream) GetEventFlagsAddr() *int32 { return (*int32)(&stm.event_flags) } @@ -643,54 +657,71 @@ const ( AVSTREAM_EVENT_FLAG_NEW_PACKETS = int32(C.AVSTREAM_EVENT_FLAG_NEW_PACKETS) ) -// Custom: GetRFrameRate gets `AVStream.r_frame_rate` value. +// GetRFrameRate gets `AVStream.r_frame_rate` value. func (stm *AVStream) GetRFrameRate() AVRational { return (AVRational)(stm.r_frame_rate) } -// Custom: SetRFrameRate sets `AVStream.r_frame_rate` value. +// SetRFrameRate sets `AVStream.r_frame_rate` value. func (stm *AVStream) SetRFrameRate(v AVRational) { stm.r_frame_rate = (C.struct_AVRational)(v) } -// Custom: GetRFrameRateAddr gets `AVStream.r_frame_rate` address. +// GetRFrameRateAddr gets `AVStream.r_frame_rate` address. func (stm *AVStream) GetRFrameRateAddr() *AVRational { return (*AVRational)(&stm.r_frame_rate) } -// Custom: GetRecommendedEncoderConfiguration gets `AVStream.recommended_encoder_configuration` value. +// Deprecated: Unused. +// +// GetRecommendedEncoderConfiguration gets `AVStream.recommended_encoder_configuration` value. func (stm *AVStream) GetRecommendedEncoderConfiguration() string { return C.GoString(stm.recommended_encoder_configuration) } -// Custom: GetCodecpar gets `AVStream.codecpar` value. +// GetCodecpar gets `AVStream.codecpar` value. func (stm *AVStream) GetCodecpar() *AVCodecParameters { return (*AVCodecParameters)(stm.codecpar) } -// Custom: SetCodecpar sets `AVStream.codecpar` value. +// SetCodecpar sets `AVStream.codecpar` value. func (stm *AVStream) SetCodecpar(v *AVCodecParameters) { stm.codecpar = (*C.struct_AVCodecParameters)(v) } -// Custom: GetCodecparAddr gets `AVStream.codecpar` address. +// GetCodecparAddr gets `AVStream.codecpar` address. func (stm *AVStream) GetCodecparAddr() **AVCodecParameters { return (**AVCodecParameters)(unsafe.Pointer(&stm.codecpar)) } -// Deprecated: No use +// Deprecated: No use. +// +// AvStreamGetRFrameRate func AvStreamGetRFrameRate(s *AVStream) AVRational { return (AVRational)(C.av_stream_get_r_frame_rate((*C.struct_AVStream)(s))) } -// Deprecated: No use +// Deprecated: No use. +// +// AvStreamSetRFrameRate func AvStreamSetRFrameRate(s *AVStream, r AVRational) { C.av_stream_set_r_frame_rate((*C.struct_AVStream)(s), (C.struct_AVRational)(r)) } -// Deprecated: No use -func AvStreamGetRecommendedEncoderConfiguration(s *AVStream) *int8 { - return (*int8)(C.av_stream_get_recommended_encoder_configuration((*C.struct_AVStream)(s))) +// Deprecated: No use. +// +// AvStreamGetRecommendedEncoderConfiguration +func AvStreamGetRecommendedEncoderConfiguration(s *AVStream) string { + return C.GoString(C.av_stream_get_recommended_encoder_configuration((*C.struct_AVStream)(s))) +} + +// Deprecated: No use. +// +// AvStreamSetRecommendedEncoderConfiguration +func AvStreamSetRecommendedEncoderConfiguration(s *AVStream, configuration string) { + configurationPtr, configurationFunc := StringCasting(configuration) + defer configurationFunc() + C.av_stream_set_recommended_encoder_configuration((*C.struct_AVStream)(s), (*C.char)(configurationPtr)) } // AvStreamGetParser @@ -711,52 +742,52 @@ const ( // AVProgram type AVProgram C.struct_AVProgram -// Custom: GetId gets `AVProgram.id` value. +// GetId gets `AVProgram.id` value. func (pgm *AVProgram) GetId() int32 { return (int32)(pgm.id) } -// Custom: SetId sets `AVProgram.id` value. +// SetId sets `AVProgram.id` value. func (pgm *AVProgram) SetId(v int32) { pgm.id = (C.int)(v) } -// Custom: GetIdAddr gets `AVProgram.id` address. +// GetIdAddr gets `AVProgram.id` address. func (pgm *AVProgram) GetIdAddr() *int32 { return (*int32)(&pgm.id) } -// Custom: GetFlags gets `AVProgram.flags` value. +// GetFlags gets `AVProgram.flags` value. func (pgm *AVProgram) GetFlags() int32 { return (int32)(pgm.flags) } -// Custom: SetFlags sets `AVProgram.flags` value. +// SetFlags sets `AVProgram.flags` value. func (pgm *AVProgram) SetFlags(v int32) { pgm.flags = (C.int)(v) } -// Custom: GetFlagsAddr gets `AVProgram.flags` address. +// GetFlagsAddr gets `AVProgram.flags` address. func (pgm *AVProgram) GetFlagsAddr() *int32 { return (*int32)(&pgm.flags) } -// Custom: GetDiscard gets `AVProgram.discard` value. +// GetDiscard gets `AVProgram.discard` value. func (pgm *AVProgram) GetDiscard() AVDiscard { return (AVDiscard)(pgm.discard) } -// Custom: SetDiscard sets `AVProgram.discard` value. +// SetDiscard sets `AVProgram.discard` value. func (pgm *AVProgram) SetDiscard(v AVDiscard) { pgm.discard = (C.enum_AVDiscard)(v) } -// Custom: GetDiscardAddr gets `AVProgram.discard` address. +// GetDiscardAddr gets `AVProgram.discard` address. func (pgm *AVProgram) GetDiscardAddr() *AVDiscard { return (*AVDiscard)(unsafe.Pointer(&pgm.discard)) } -// Custom: GetStreamIndex gets `AVProgram.stream_index` value. +// GetStreamIndex gets `AVProgram.stream_index` value. func (pgm *AVProgram) GetStreamIndex() (v []uint32) { if pgm.stream_index == nil { return v @@ -764,102 +795,102 @@ func (pgm *AVProgram) GetStreamIndex() (v []uint32) { return unsafe.Slice((*uint32)(unsafe.Pointer(pgm.stream_index)), pgm.nb_stream_indexes) } -// Custom: SetStreamIndex sets `AVProgram.stream_index` value. +// SetStreamIndex sets `AVProgram.stream_index` value. func (pgm *AVProgram) SetStreamIndex(v *uint32) { pgm.stream_index = (*C.uint)(v) } -// Custom: GetStreamIndexAddr gets `AVProgram.stream_index` address. +// GetStreamIndexAddr gets `AVProgram.stream_index` address. func (pgm *AVProgram) GetStreamIndexAddr() **uint32 { return (**uint32)(unsafe.Pointer(&pgm.stream_index)) } -// Custom: GetNbStreamIndexes gets `AVProgram.nb_stream_indexes` value. +// GetNbStreamIndexes gets `AVProgram.nb_stream_indexes` value. func (pgm *AVProgram) GetNbStreamIndexes() uint32 { return (uint32)(pgm.nb_stream_indexes) } -// Custom: SetNbStreamIndexes sets `AVProgram.nb_stream_indexes` value. +// SetNbStreamIndexes sets `AVProgram.nb_stream_indexes` value. func (pgm *AVProgram) SetNbStreamIndexes(v uint32) { pgm.nb_stream_indexes = (C.uint)(v) } -// Custom: GetNbStreamIndexesAddr gets `AVProgram.nb_stream_indexes` address. +// GetNbStreamIndexesAddr gets `AVProgram.nb_stream_indexes` address. func (pgm *AVProgram) GetNbStreamIndexesAddr() *uint32 { return (*uint32)(&pgm.nb_stream_indexes) } -// Custom: GetMetadata gets `AVProgram.metadata` value. +// GetMetadata gets `AVProgram.metadata` value. func (pgm *AVProgram) GetMetadata() *AVDictionary { return (*AVDictionary)(pgm.metadata) } -// Custom: SetMetadata sets `AVProgram.metadata` value. +// SetMetadata sets `AVProgram.metadata` value. func (pgm *AVProgram) SetMetadata(v *AVDictionary) { pgm.metadata = (*C.struct_AVDictionary)(v) } -// Custom: GetMetadataAddr gets `AVProgram.metadata` address. +// GetMetadataAddr gets `AVProgram.metadata` address. func (pgm *AVProgram) GetMetadataAddr() **AVDictionary { return (**AVDictionary)(unsafe.Pointer(&pgm.metadata)) } -// Custom: GetProgramNum gets `AVProgram.program_num` value. +// GetProgramNum gets `AVProgram.program_num` value. func (pgm *AVProgram) GetProgramNum() int32 { return (int32)(pgm.program_num) } -// Custom: SetProgramNum sets `AVProgram.program_num` value. +// SetProgramNum sets `AVProgram.program_num` value. func (pgm *AVProgram) SetProgramNum(v int32) { pgm.program_num = (C.int)(v) } -// Custom: GetProgramNumAddr gets `AVProgram.program_num` address. +// GetProgramNumAddr gets `AVProgram.program_num` address. func (pgm *AVProgram) GetProgramNumAddr() *int32 { return (*int32)(&pgm.program_num) } -// Custom: GetPmtPid gets `AVProgram.pmt_pid` value. +// GetPmtPid gets `AVProgram.pmt_pid` value. func (pgm *AVProgram) GetPmtPid() int32 { return (int32)(pgm.pmt_pid) } -// Custom: SetPmtPid sets `AVProgram.pmt_pid` value. +// SetPmtPid sets `AVProgram.pmt_pid` value. func (pgm *AVProgram) SetPmtPid(v int32) { pgm.pmt_pid = (C.int)(v) } -// Custom: GetPmtPidAddr gets `AVProgram.pmt_pid` address. +// GetPmtPidAddr gets `AVProgram.pmt_pid` address. func (pgm *AVProgram) GetPmtPidAddr() *int32 { return (*int32)(&pgm.pmt_pid) } -// Custom: GetPcrPid gets `AVProgram.pcr_pid` value. +// GetPcrPid gets `AVProgram.pcr_pid` value. func (pgm *AVProgram) GetPcrPid() int32 { return (int32)(pgm.pcr_pid) } -// Custom: SetPcrPid sets `AVProgram.pcr_pid` value. +// SetPcrPid sets `AVProgram.pcr_pid` value. func (pgm *AVProgram) SetPcrPid(v int32) { pgm.pcr_pid = (C.int)(v) } -// Custom: GetPcrPidAddr gets `AVProgram.pcr_pid` address. +// GetPcrPidAddr gets `AVProgram.pcr_pid` address. func (pgm *AVProgram) GetPcrPidAddr() *int32 { return (*int32)(&pgm.pcr_pid) } -// Custom: GetPmtVersion gets `AVProgram.pmt_version` value. +// GetPmtVersion gets `AVProgram.pmt_version` value. func (pgm *AVProgram) GetPmtVersion() int32 { return (int32)(pgm.pmt_version) } -// Custom: SetPmtVersion sets `AVProgram.pmt_version` value. +// SetPmtVersion sets `AVProgram.pmt_version` value. func (pgm *AVProgram) SetPmtVersion(v int32) { pgm.pmt_version = (C.int)(v) } -// Custom: GetPmtVersionAddr gets `AVProgram.pmt_version` address. +// GetPmtVersionAddr gets `AVProgram.pmt_version` address. func (pgm *AVProgram) GetPmtVersionAddr() *int32 { return (*int32)(&pgm.pmt_version) } @@ -872,77 +903,77 @@ const ( // AVChapter type AVChapter = C.struct_AVChapter -// Custom: GetId gets `AVChapter.id` value. +// GetId gets `AVChapter.id` value. func (cpt *AVChapter) GetId() int32 { return (int32)(cpt.id) } -// Custom: SetId sets `AVChapter.id` value. +// SetId sets `AVChapter.id` value. func (cpt *AVChapter) SetId(v int32) { cpt.id = (C.int)(v) } -// Custom: GetIdAddr gets `AVChapter.id` address. +// GetIdAddr gets `AVChapter.id` address. func (cpt *AVChapter) GetIdAddr() *int32 { return (*int32)(&cpt.id) } -// Custom: GetTimeBase gets `AVChapter.time_base` value. +// GetTimeBase gets `AVChapter.time_base` value. func (cpt *AVChapter) GetTimeBase() AVRational { return (AVRational)(cpt.time_base) } -// Custom: SetTimeBase sets `AVChapter.time_base` value. +// SetTimeBase sets `AVChapter.time_base` value. func (cpt *AVChapter) SetTimeBase(v AVRational) { cpt.time_base = (C.struct_AVRational)(v) } -// Custom: GetTimeBaseAddr gets `AVChapter.time_base` address. +// GetTimeBaseAddr gets `AVChapter.time_base` address. func (cpt *AVChapter) GetTimeBaseAddr() *AVRational { return (*AVRational)(&cpt.time_base) } -// Custom: GetStart gets `AVChapter.start` value. +// GetStart gets `AVChapter.start` value. func (cpt *AVChapter) GetStart() int64 { return (int64)(cpt.start) } -// Custom: SetStart sets `AVChapter.start` value. +// SetStart sets `AVChapter.start` value. func (cpt *AVChapter) SetStart(v int64) { cpt.start = (C.int64_t)(v) } -// Custom: GetStartAddr gets `AVChapter.start` address. +// GetStartAddr gets `AVChapter.start` address. func (cpt *AVChapter) GetStartAddr() *int64 { return (*int64)(&cpt.start) } -// Custom: GetEnd gets `AVChapter.end` value. +// GetEnd gets `AVChapter.end` value. func (cpt *AVChapter) GetEnd() int64 { return (int64)(cpt.end) } -// Custom: SetEnd sets `AVChapter.end` value. +// SetEnd sets `AVChapter.end` value. func (cpt *AVChapter) SetEnd(v int64) { cpt.end = (C.int64_t)(v) } -// Custom: GetEndAddr gets `AVChapter.end` address. +// GetEndAddr gets `AVChapter.end` address. func (cpt *AVChapter) GetEndAddr() *int64 { return (*int64)(&cpt.end) } -// Custom: GetMetadata gets `AVChapter.metadata` value. +// GetMetadata gets `AVChapter.metadata` value. func (cpt *AVChapter) GetMetadata() *AVDictionary { return (*AVDictionary)(cpt.metadata) } -// Custom: SetMetadata sets `AVChapter.metadata` value. +// SetMetadata sets `AVChapter.metadata` value. func (cpt *AVChapter) SetMetadata(v *AVDictionary) { cpt.metadata = (*C.struct_AVDictionary)(v) } -// Custom: GetMetadataAddr gets `AVChapter.metadata` address. +// GetMetadataAddr gets `AVChapter.metadata` address. func (cpt *AVChapter) GetMetadataAddr() **AVDictionary { return (**AVDictionary)(unsafe.Pointer(&cpt.metadata)) } @@ -966,112 +997,112 @@ type AVFormatInternal C.struct_AVFormatInternal // Format I/O context. type AVFormatContext C.struct_AVFormatContext -// Custom: GetAvClass gets `AVFormatContext.av_class` value. +// GetAvClass gets `AVFormatContext.av_class` value. func (s *AVFormatContext) GetAvClass() *AVClass { return (*AVClass)(s.av_class) } -// Custom: SetAvClass sets `AVFormatContext.av_class` value. +// SetAvClass sets `AVFormatContext.av_class` value. func (s *AVFormatContext) SetAvClass(v *AVClass) { s.av_class = (*C.struct_AVClass)(v) } -// Custom: GetAvClassAddr gets `AVFormatContext.av_class` address. +// GetAvClassAddr gets `AVFormatContext.av_class` address. func (s *AVFormatContext) GetAvClassAddr() **AVClass { return (**AVClass)(unsafe.Pointer(&s.av_class)) } -// Custom: GetIformat gets `AVFormatContext.iformat` value. +// GetIformat gets `AVFormatContext.iformat` value. func (s *AVFormatContext) GetIformat() *AVInputFormat { return (*AVInputFormat)(s.iformat) } -// Custom: SetIformat sets `AVFormatContext.iformat` value. +// SetIformat sets `AVFormatContext.iformat` value. func (s *AVFormatContext) SetIformat(v *AVInputFormat) { s.iformat = (*C.struct_AVInputFormat)(v) } -// Custom: GetIformatAddr gets `AVFormatContext.iformat` address. +// GetIformatAddr gets `AVFormatContext.iformat` address. func (s *AVFormatContext) GetIformatAddr() **AVInputFormat { return (**AVInputFormat)(unsafe.Pointer(&s.iformat)) } -// Custom: GetOformat gets `AVFormatContext.oformat` value. +// GetOformat gets `AVFormatContext.oformat` value. func (s *AVFormatContext) GetOformat() *AVOutputFormat { return (*AVOutputFormat)(s.oformat) } -// Custom: SetOformat sets `AVFormatContext.oformat` value. +// SetOformat sets `AVFormatContext.oformat` value. func (s *AVFormatContext) SetOformat(v *AVOutputFormat) { s.oformat = (*C.struct_AVOutputFormat)(v) } -// Custom: GetOformatAddr gets `AVFormatContext.oformat` address. +// GetOformatAddr gets `AVFormatContext.oformat` address. func (s *AVFormatContext) GetOformatAddr() **AVOutputFormat { return (**AVOutputFormat)(unsafe.Pointer(&s.oformat)) } -// Custom: GetPrivData gets `AVFormatContext.priv_data` value. +// GetPrivData gets `AVFormatContext.priv_data` value. func (s *AVFormatContext) GetPrivData() unsafe.Pointer { return s.priv_data } -// Custom: SetPrivData sets `AVFormatContext.priv_data` value. +// SetPrivData sets `AVFormatContext.priv_data` value. func (s *AVFormatContext) SetPrivData(v CVoidPointer) { s.priv_data = VoidPointer(v) } -// Custom: GetPrivDataAddr gets `AVFormatContext.priv_data` address. +// GetPrivDataAddr gets `AVFormatContext.priv_data` address. func (s *AVFormatContext) GetPrivDataAddr() unsafe.Pointer { return (unsafe.Pointer)(&s.priv_data) } -// Custom: GetPb gets `AVFormatContext.pb` value. +// GetPb gets `AVFormatContext.pb` value. func (s *AVFormatContext) GetPb() *AVIOContext { return (*AVIOContext)(s.pb) } -// Custom: SetPb sets `AVFormatContext.pb` value. +// SetPb sets `AVFormatContext.pb` value. func (s *AVFormatContext) SetPb(v *AVIOContext) { s.pb = (*C.struct_AVIOContext)(v) } -// Custom: GetPbAddr gets `AVFormatContext.pb` address. +// GetPbAddr gets `AVFormatContext.pb` address. func (s *AVFormatContext) GetPbAddr() **AVIOContext { return (**AVIOContext)(unsafe.Pointer(&s.pb)) } -// Custom: GetCtxFlags gets `AVFormatContext.ctx_flags` value. +// GetCtxFlags gets `AVFormatContext.ctx_flags` value. func (s *AVFormatContext) GetCtxFlags() int32 { return (int32)(s.ctx_flags) } -// Custom: SetCtxFlags sets `AVFormatContext.ctx_flags` value. +// SetCtxFlags sets `AVFormatContext.ctx_flags` value. func (s *AVFormatContext) SetCtxFlags(v int32) { s.ctx_flags = (C.int)(v) } -// Custom: GetCtxFlagsAddr gets `AVFormatContext.ctx_flags` address. +// GetCtxFlagsAddr gets `AVFormatContext.ctx_flags` address. func (s *AVFormatContext) GetCtxFlagsAddr() *int32 { return (*int32)(&s.ctx_flags) } -// Custom: GetNbStreams gets `AVFormatContext.nb_streams` value. +// GetNbStreams gets `AVFormatContext.nb_streams` value. func (s *AVFormatContext) GetNbStreams() uint32 { return (uint32)(s.nb_streams) } -// Custom: SetNbStreams sets `AVFormatContext.nb_streams` value. +// SetNbStreams sets `AVFormatContext.nb_streams` value. func (s *AVFormatContext) SetNbStreams(v uint32) { s.nb_streams = (C.uint)(v) } -// Custom: GetNbStreamsAddr gets `AVFormatContext.nb_streams` address. +// GetNbStreamsAddr gets `AVFormatContext.nb_streams` address. func (s *AVFormatContext) GetNbStreamsAddr() *uint32 { return (*uint32)(&s.nb_streams) } -// Custom: GetStreams gets `AVFormatContext.streams` value. +// GetStreams gets `AVFormatContext.streams` value. func (s *AVFormatContext) GetStreams() (v []*AVStream) { if s.streams == nil { return v @@ -1079,27 +1110,29 @@ func (s *AVFormatContext) GetStreams() (v []*AVStream) { return unsafe.Slice((**AVStream)(unsafe.Pointer(s.streams)), s.nb_streams) } -// Custom: SetStreams sets `AVFormatContext.streams` value. +// SetStreams sets `AVFormatContext.streams` value. func (s *AVFormatContext) SetStreams(v **AVStream) { s.streams = (**C.struct_AVStream)(unsafe.Pointer(v)) } -// Custom: GetStreamsAddr gets `AVFormatContext.streams` address. +// GetStreamsAddr gets `AVFormatContext.streams` address. func (s *AVFormatContext) GetStreamsAddr() ***AVStream { return (***AVStream)(unsafe.Pointer(&s.streams)) } -// Custom: GetFilename gets `AVFormatContext.filename` value. +// Deprecated: Use url instead. +// +// GetFilename gets `AVFormatContext.filename` value. func (s *AVFormatContext) GetFilename() string { return C.GoString((*C.char)(&s.filename[0])) } -// Custom: GetUrl gets `AVFormatContext.url` value. +// GetUrl gets `AVFormatContext.url` value. func (s *AVFormatContext) GetUrl() string { return C.GoString(s.url) } -// Custom: SetUrl sets `AVFormatContext.url` value. +// SetUrl sets `AVFormatContext.url` value. func (s *AVFormatContext) SetUrl(v string) { vPtr, _ := StringCasting(v) if s.url != nil { @@ -1108,172 +1141,172 @@ func (s *AVFormatContext) SetUrl(v string) { s.url = (*C.char)(vPtr) } -// Custom: GetStartTime gets `AVFormatContext.start_time` value. +// GetStartTime gets `AVFormatContext.start_time` value. func (s *AVFormatContext) GetStartTime() int64 { return (int64)(s.start_time) } -// Custom: SetStartTime sets `AVFormatContext.start_time` value. +// SetStartTime sets `AVFormatContext.start_time` value. func (s *AVFormatContext) SetStartTime(v int64) { s.start_time = (C.int64_t)(v) } -// Custom: GetStartTimeAddr gets `AVFormatContext.start_time` address. +// GetStartTimeAddr gets `AVFormatContext.start_time` address. func (s *AVFormatContext) GetStartTimeAddr() *int64 { return (*int64)(&s.start_time) } -// Custom: GetDuration gets `AVFormatContext.duration` value. +// GetDuration gets `AVFormatContext.duration` value. func (s *AVFormatContext) GetDuration() int64 { return (int64)(s.duration) } -// Custom: SetDuration sets `AVFormatContext.duration` value. +// SetDuration sets `AVFormatContext.duration` value. func (s *AVFormatContext) SetDuration(v int64) { s.duration = (C.int64_t)(v) } -// Custom: GetDurationAddr gets `AVFormatContext.duration` address. +// GetDurationAddr gets `AVFormatContext.duration` address. func (s *AVFormatContext) GetDurationAddr() *int64 { return (*int64)(&s.duration) } -// Custom: GetBitRate gets `AVFormatContext.bit_rate` value. +// GetBitRate gets `AVFormatContext.bit_rate` value. func (s *AVFormatContext) GetBitRate() int64 { return (int64)(s.bit_rate) } -// Custom: SetBitRate sets `AVFormatContext.bit_rate` value. +// SetBitRate sets `AVFormatContext.bit_rate` value. func (s *AVFormatContext) SetBitRate(v int64) { s.bit_rate = (C.int64_t)(v) } -// Custom: GetBitRateAddr gets `AVFormatContext.bit_rate` address. +// GetBitRateAddr gets `AVFormatContext.bit_rate` address. func (s *AVFormatContext) GetBitRateAddr() *int64 { return (*int64)(&s.bit_rate) } -// Custom: GetPacketSize gets `AVFormatContext.packet_size` value. +// GetPacketSize gets `AVFormatContext.packet_size` value. func (s *AVFormatContext) GetPacketSize() uint32 { return (uint32)(s.packet_size) } -// Custom: SetPacketSize sets `AVFormatContext.packet_size` value. +// SetPacketSize sets `AVFormatContext.packet_size` value. func (s *AVFormatContext) SetPacketSize(v uint32) { s.packet_size = (C.uint)(v) } -// Custom: GetPacketSizeAddr gets `AVFormatContext.packet_size` address. +// GetPacketSizeAddr gets `AVFormatContext.packet_size` address. func (s *AVFormatContext) GetPacketSizeAddr() *uint32 { return (*uint32)(&s.packet_size) } -// Custom: GetMaxDelay gets `AVFormatContext.max_delay` value. +// GetMaxDelay gets `AVFormatContext.max_delay` value. func (s *AVFormatContext) GetMaxDelay() int32 { return (int32)(s.max_delay) } -// Custom: SetMaxDelay sets `AVFormatContext.max_delay` value. +// SetMaxDelay sets `AVFormatContext.max_delay` value. func (s *AVFormatContext) SetMaxDelay(v int32) { s.max_delay = (C.int)(v) } -// Custom: GetMaxDelayAddr gets `AVFormatContext.max_delay` address. +// GetMaxDelayAddr gets `AVFormatContext.max_delay` address. func (s *AVFormatContext) GetMaxDelayAddr() *int32 { return (*int32)(&s.max_delay) } -// Custom: GetFlags gets `AVFormatContext.flags` value. +// GetFlags gets `AVFormatContext.flags` value. func (s *AVFormatContext) GetFlags() int32 { return (int32)(s.flags) } -// Custom: SetFlags sets `AVFormatContext.flags` value. +// SetFlags sets `AVFormatContext.flags` value. func (s *AVFormatContext) SetFlags(v int32) { s.flags = (C.int)(v) } -// Custom: GetFlagsAddr gets `AVFormatContext.flags` address. +// GetFlagsAddr gets `AVFormatContext.flags` address. func (s *AVFormatContext) GetFlagsAddr() *int32 { return (*int32)(&s.flags) } -// Custom: GetProbesize gets `AVFormatContext.probesize` value. +// GetProbesize gets `AVFormatContext.probesize` value. func (s *AVFormatContext) GetProbesize() int64 { return (int64)(s.probesize) } -// Custom: SetProbesize sets `AVFormatContext.probesize` value. +// SetProbesize sets `AVFormatContext.probesize` value. func (s *AVFormatContext) SetProbesize(v int64) { s.probesize = (C.int64_t)(v) } -// Custom: GetProbesizeAddr gets `AVFormatContext.probesize` address. +// GetProbesizeAddr gets `AVFormatContext.probesize` address. func (s *AVFormatContext) GetProbesizeAddr() *int64 { return (*int64)(&s.probesize) } -// Custom: GetMaxAnalyzeDuration gets `AVFormatContext.max_analyze_duration` value. +// GetMaxAnalyzeDuration gets `AVFormatContext.max_analyze_duration` value. func (s *AVFormatContext) GetMaxAnalyzeDuration() int64 { return (int64)(s.max_analyze_duration) } -// Custom: SetMaxAnalyzeDuration sets `AVFormatContext.max_analyze_duration` value. +// SetMaxAnalyzeDuration sets `AVFormatContext.max_analyze_duration` value. func (s *AVFormatContext) SetMaxAnalyzeDuration(v int64) { s.max_analyze_duration = (C.int64_t)(v) } -// Custom: GetMaxAnalyzeDurationAddr gets `AVFormatContext.max_analyze_duration` address. +// GetMaxAnalyzeDurationAddr gets `AVFormatContext.max_analyze_duration` address. func (s *AVFormatContext) GetMaxAnalyzeDurationAddr() *int64 { return (*int64)(&s.max_analyze_duration) } -// Custom: GetKey gets `AVFormatContext.key` value. +// GetKey gets `AVFormatContext.key` value. func (s *AVFormatContext) GetKey() *uint8 { return (*uint8)(s.key) } -// Custom: SetKey sets `AVFormatContext.key` value. +// SetKey sets `AVFormatContext.key` value. func (s *AVFormatContext) SetKey(v *uint8) { s.key = (*C.uint8_t)(v) } -// Custom: GetKeyAddr gets `AVFormatContext.key` address. +// GetKeyAddr gets `AVFormatContext.key` address. func (s *AVFormatContext) GetKeyAddr() **uint8 { return (**uint8)(unsafe.Pointer(&s.key)) } -// Custom: GetKeylen gets `AVFormatContext.keylen` value. +// GetKeylen gets `AVFormatContext.keylen` value. func (s *AVFormatContext) GetKeylen() int32 { return (int32)(s.keylen) } -// Custom: SetKeylen sets `AVFormatContext.keylen` value. +// SetKeylen sets `AVFormatContext.keylen` value. func (s *AVFormatContext) SetKeylen(v int32) { s.keylen = (C.int)(v) } -// Custom: GetKeylenAddr gets `AVFormatContext.keylen` address. +// GetKeylenAddr gets `AVFormatContext.keylen` address. func (s *AVFormatContext) GetKeylenAddr() *int32 { return (*int32)(&s.keylen) } -// Custom: GetNbPrograms gets `AVFormatContext.nb_programs` value. +// GetNbPrograms gets `AVFormatContext.nb_programs` value. func (s *AVFormatContext) GetNbPrograms() uint32 { return (uint32)(s.nb_programs) } -// Custom: SetNbPrograms sets `AVFormatContext.nb_programs` value. +// SetNbPrograms sets `AVFormatContext.nb_programs` value. func (s *AVFormatContext) SetNbPrograms(v uint32) { s.nb_programs = (C.uint)(v) } -// Custom: GetNbProgramsAddr gets `AVFormatContext.nb_programs` address. +// GetNbProgramsAddr gets `AVFormatContext.nb_programs` address. func (s *AVFormatContext) GetNbProgramsAddr() *uint32 { return (*uint32)(&s.nb_programs) } -// Custom: GetPrograms gets `AVFormatContext.programs` value. +// GetPrograms gets `AVFormatContext.programs` value. func (s *AVFormatContext) GetPrograms() (v []*AVProgram) { if s.programs == nil { return v @@ -1281,107 +1314,107 @@ func (s *AVFormatContext) GetPrograms() (v []*AVProgram) { return unsafe.Slice((**AVProgram)(unsafe.Pointer(s.programs)), s.nb_programs) } -// Custom: SetPrograms sets `AVFormatContext.programs` value. +// SetPrograms sets `AVFormatContext.programs` value. func (s *AVFormatContext) SetPrograms(v **AVProgram) { s.programs = (**C.struct_AVProgram)(unsafe.Pointer(v)) } -// Custom: GetProgramsAddr gets `AVFormatContext.programs` address. +// GetProgramsAddr gets `AVFormatContext.programs` address. func (s *AVFormatContext) GetProgramsAddr() ***AVProgram { return (***AVProgram)(unsafe.Pointer(&s.programs)) } -// Custom: GetVideoCodecId gets `AVFormatContext.video_codec_id` value. +// GetVideoCodecId gets `AVFormatContext.video_codec_id` value. func (s *AVFormatContext) GetVideoCodecId() AVCodecID { return (AVCodecID)(s.video_codec_id) } -// Custom: SetVideoCodecId sets `AVFormatContext.video_codec_id` value. +// SetVideoCodecId sets `AVFormatContext.video_codec_id` value. func (s *AVFormatContext) SetVideoCodecId(v AVCodecID) { s.video_codec_id = (C.enum_AVCodecID)(v) } -// Custom: GetVideoCodecIdAddr gets `AVFormatContext.video_codec_id` address. +// GetVideoCodecIdAddr gets `AVFormatContext.video_codec_id` address. func (s *AVFormatContext) GetVideoCodecIdAddr() *AVCodecID { return (*AVCodecID)(unsafe.Pointer(&s.video_codec_id)) } -// Custom: GetAudioCodecId gets `AVFormatContext.audio_codec_id` value. +// GetAudioCodecId gets `AVFormatContext.audio_codec_id` value. func (s *AVFormatContext) GetAudioCodecId() AVCodecID { return (AVCodecID)(s.audio_codec_id) } -// Custom: SetAudioCodecId sets `AVFormatContext.audio_codec_id` value. +// SetAudioCodecId sets `AVFormatContext.audio_codec_id` value. func (s *AVFormatContext) SetAudioCodecId(v AVCodecID) { s.audio_codec_id = (C.enum_AVCodecID)(v) } -// Custom: GetAudioCodecIdAddr gets `AVFormatContext.audio_codec_id` address. +// GetAudioCodecIdAddr gets `AVFormatContext.audio_codec_id` address. func (s *AVFormatContext) GetAudioCodecIdAddr() *AVCodecID { return (*AVCodecID)(unsafe.Pointer(&s.audio_codec_id)) } -// Custom: GetSubtitleCodecId gets `AVFormatContext.subtitle_codec_id` value. +// GetSubtitleCodecId gets `AVFormatContext.subtitle_codec_id` value. func (s *AVFormatContext) GetSubtitleCodecId() AVCodecID { return (AVCodecID)(s.subtitle_codec_id) } -// Custom: SetSubtitleCodecId sets `AVFormatContext.subtitle_codec_id` value. +// SetSubtitleCodecId sets `AVFormatContext.subtitle_codec_id` value. func (s *AVFormatContext) SetSubtitleCodecId(v AVCodecID) { s.subtitle_codec_id = (C.enum_AVCodecID)(v) } -// Custom: GetSubtitleCodecIdAddr gets `AVFormatContext.subtitle_codec_id` address. +// GetSubtitleCodecIdAddr gets `AVFormatContext.subtitle_codec_id` address. func (s *AVFormatContext) GetSubtitleCodecIdAddr() *AVCodecID { return (*AVCodecID)(unsafe.Pointer(&s.subtitle_codec_id)) } -// Custom: GetMaxIndexSize gets `AVFormatContext.max_index_size` value. +// GetMaxIndexSize gets `AVFormatContext.max_index_size` value. func (s *AVFormatContext) GetMaxIndexSize() uint32 { return (uint32)(s.max_index_size) } -// Custom: SetMaxIndexSize sets `AVFormatContext.max_index_size` value. +// SetMaxIndexSize sets `AVFormatContext.max_index_size` value. func (s *AVFormatContext) SetMaxIndexSize(v uint32) { s.max_index_size = (C.uint)(v) } -// Custom: GetMaxIndexSizeAddr gets `AVFormatContext.max_index_size` address. +// GetMaxIndexSizeAddr gets `AVFormatContext.max_index_size` address. func (s *AVFormatContext) GetMaxIndexSizeAddr() *uint32 { return (*uint32)(&s.max_index_size) } -// Custom: GetMaxPictureBuffer gets `AVFormatContext.max_picture_buffer` value. +// GetMaxPictureBuffer gets `AVFormatContext.max_picture_buffer` value. func (s *AVFormatContext) GetMaxPictureBuffer() uint32 { return (uint32)(s.max_picture_buffer) } -// Custom: SetMaxPictureBuffer sets `AVFormatContext.max_picture_buffer` value. +// SetMaxPictureBuffer sets `AVFormatContext.max_picture_buffer` value. func (s *AVFormatContext) SetMaxPictureBuffer(v uint32) { s.max_picture_buffer = (C.uint)(v) } -// Custom: GetMaxPictureBufferAddr gets `AVFormatContext.max_picture_buffer` address. +// GetMaxPictureBufferAddr gets `AVFormatContext.max_picture_buffer` address. func (s *AVFormatContext) GetMaxPictureBufferAddr() *uint32 { return (*uint32)(&s.max_picture_buffer) } -// Custom: GetNbChapters gets `AVFormatContext.nb_chapters` value. +// GetNbChapters gets `AVFormatContext.nb_chapters` value. func (s *AVFormatContext) GetNbChapters() uint32 { return (uint32)(s.nb_chapters) } -// Custom: SetNbChapters sets `AVFormatContext.nb_chapters` value. +// SetNbChapters sets `AVFormatContext.nb_chapters` value. func (s *AVFormatContext) SetNbChapters(v uint32) { s.nb_chapters = (C.uint)(v) } -// Custom: GetNbChaptersAddr gets `AVFormatContext.nb_chapters` address. +// GetNbChaptersAddr gets `AVFormatContext.nb_chapters` address. func (s *AVFormatContext) GetNbChaptersAddr() *uint32 { return (*uint32)(&s.nb_chapters) } -// Custom: GetChapters gets `AVFormatContext.chapters` value. +// GetChapters gets `AVFormatContext.chapters` value. func (s *AVFormatContext) GetChapters() (v []*AVChapter) { if s.chapters == nil { return v @@ -1389,602 +1422,664 @@ func (s *AVFormatContext) GetChapters() (v []*AVChapter) { return unsafe.Slice((**AVChapter)(unsafe.Pointer(s.chapters)), s.nb_chapters) } -// Custom: SetChapters sets `AVFormatContext.chapters` value. +// SetChapters sets `AVFormatContext.chapters` value. func (s *AVFormatContext) SetChapters(v **AVChapter) { s.chapters = (**C.struct_AVChapter)(v) } -// Custom: GetChaptersAddr gets `AVFormatContext.chapters` address. +// GetChaptersAddr gets `AVFormatContext.chapters` address. func (s *AVFormatContext) GetChaptersAddr() ***AVChapter { return (***AVChapter)(&s.chapters) } -// Custom: GetMetadata gets `AVFormatContext.metadata` value. +// GetMetadata gets `AVFormatContext.metadata` value. func (s *AVFormatContext) GetMetadata() *AVDictionary { return (*AVDictionary)(s.metadata) } -// Custom: SetMetadata sets `AVFormatContext.metadata` value. +// SetMetadata sets `AVFormatContext.metadata` value. func (s *AVFormatContext) SetMetadata(v *AVDictionary) { s.metadata = (*C.struct_AVDictionary)(v) } -// Custom: GetMetadataAddr gets `AVFormatContext.metadata` address. +// GetMetadataAddr gets `AVFormatContext.metadata` address. func (s *AVFormatContext) GetMetadataAddr() **AVDictionary { return (**AVDictionary)(unsafe.Pointer(&s.metadata)) } -// Custom: GetStartTimeRealtime gets `AVFormatContext.start_time_realtime` value. +// GetStartTimeRealtime gets `AVFormatContext.start_time_realtime` value. func (s *AVFormatContext) GetStartTimeRealtime() int64 { return (int64)(s.start_time_realtime) } -// Custom: SetStartTimeRealtime sets `AVFormatContext.start_time_realtime` value. +// SetStartTimeRealtime sets `AVFormatContext.start_time_realtime` value. func (s *AVFormatContext) SetStartTimeRealtime(v int64) { s.start_time_realtime = (C.int64_t)(v) } -// Custom: GetStartTimeRealtimeAddr gets `AVFormatContext.start_time_realtime` address. +// GetStartTimeRealtimeAddr gets `AVFormatContext.start_time_realtime` address. func (s *AVFormatContext) GetStartTimeRealtimeAddr() *int64 { return (*int64)(&s.start_time_realtime) } -// Custom: GetFpsProbeSize gets `AVFormatContext.fps_probe_size` value. +// GetFpsProbeSize gets `AVFormatContext.fps_probe_size` value. func (s *AVFormatContext) GetFpsProbeSize() int32 { return (int32)(s.fps_probe_size) } -// Custom: SetFpsProbeSize sets `AVFormatContext.fps_probe_size` value. +// SetFpsProbeSize sets `AVFormatContext.fps_probe_size` value. func (s *AVFormatContext) SetFpsProbeSize(v int32) { s.fps_probe_size = (C.int)(v) } -// Custom: GetFpsProbeSizeAddr gets `AVFormatContext.fps_probe_size` address. +// GetFpsProbeSizeAddr gets `AVFormatContext.fps_probe_size` address. func (s *AVFormatContext) GetFpsProbeSizeAddr() *int32 { return (*int32)(&s.fps_probe_size) } -// Custom: GetErrorRecognition gets `AVFormatContext.error_recognition` value. +// GetErrorRecognition gets `AVFormatContext.error_recognition` value. func (s *AVFormatContext) GetErrorRecognition() int32 { return (int32)(s.error_recognition) } -// Custom: SetErrorRecognition sets `AVFormatContext.error_recognition` value. +// SetErrorRecognition sets `AVFormatContext.error_recognition` value. func (s *AVFormatContext) SetErrorRecognition(v int32) { s.error_recognition = (C.int)(v) } -// Custom: GetErrorRecognitionAddr gets `AVFormatContext.error_recognition` address. +// GetErrorRecognitionAddr gets `AVFormatContext.error_recognition` address. func (s *AVFormatContext) GetErrorRecognitionAddr() *int32 { return (*int32)(&s.error_recognition) } -// Custom: GetInterruptCallback gets `AVFormatContext.interrupt_callback` value. +// GetInterruptCallback gets `AVFormatContext.interrupt_callback` value. func (s *AVFormatContext) GetInterruptCallback() AVIOInterruptCB { return (AVIOInterruptCB)(s.interrupt_callback) } -// Custom: SetInterruptCallback sets `AVFormatContext.interrupt_callback` value. +// SetInterruptCallback sets `AVFormatContext.interrupt_callback` value. func (s *AVFormatContext) SetInterruptCallback(v AVIOInterruptCB) { s.interrupt_callback = (C.AVIOInterruptCB)(v) } -// Custom: GetInterruptCallbackAddr gets `AVFormatContext.interrupt_callback` address. +// GetInterruptCallbackAddr gets `AVFormatContext.interrupt_callback` address. func (s *AVFormatContext) GetInterruptCallbackAddr() *AVIOInterruptCB { return (*AVIOInterruptCB)(&s.interrupt_callback) } -// Custom: GetDebug gets `AVFormatContext.debug` value. +// GetDebug gets `AVFormatContext.debug` value. func (s *AVFormatContext) GetDebug() int32 { return (int32)(s.debug) } -// Custom: SetDebug sets `AVFormatContext.debug` value. +// SetDebug sets `AVFormatContext.debug` value. func (s *AVFormatContext) SetDebug(v int32) { s.debug = (C.int)(v) } -// Custom: GetDebugAddr gets `AVFormatContext.debug` address. +// GetDebugAddr gets `AVFormatContext.debug` address. func (s *AVFormatContext) GetDebugAddr() *int32 { return (*int32)(&s.debug) } -// Custom: GetMaxInterleaveDelta gets `AVFormatContext.max_interleave_delta` value. +// GetMaxInterleaveDelta gets `AVFormatContext.max_interleave_delta` value. func (s *AVFormatContext) GetMaxInterleaveDelta() int64 { return (int64)(s.max_interleave_delta) } -// Custom: SetMaxInterleaveDelta sets `AVFormatContext.max_interleave_delta` value. +// SetMaxInterleaveDelta sets `AVFormatContext.max_interleave_delta` value. func (s *AVFormatContext) SetMaxInterleaveDelta(v int64) { s.max_interleave_delta = (C.int64_t)(v) } -// Custom: GetMaxInterleaveDeltaAddr gets `AVFormatContext.max_interleave_delta` address. +// GetMaxInterleaveDeltaAddr gets `AVFormatContext.max_interleave_delta` address. func (s *AVFormatContext) GetMaxInterleaveDeltaAddr() *int64 { return (*int64)(&s.max_interleave_delta) } -// Custom: GetStrictStdCompliance gets `AVFormatContext.strict_std_compliance` value. +// GetStrictStdCompliance gets `AVFormatContext.strict_std_compliance` value. func (s *AVFormatContext) GetStrictStdCompliance() int32 { return (int32)(s.strict_std_compliance) } -// Custom: SetStrictStdCompliance sets `AVFormatContext.strict_std_compliance` value. +// SetStrictStdCompliance sets `AVFormatContext.strict_std_compliance` value. func (s *AVFormatContext) SetStrictStdCompliance(v int32) { s.strict_std_compliance = (C.int)(v) } -// Custom: GetStrictStdComplianceAddr gets `AVFormatContext.strict_std_compliance` address. +// GetStrictStdComplianceAddr gets `AVFormatContext.strict_std_compliance` address. func (s *AVFormatContext) GetStrictStdComplianceAddr() *int32 { return (*int32)(&s.strict_std_compliance) } -// Custom: GetEventFlags gets `AVFormatContext.event_flags` value. +// GetEventFlags gets `AVFormatContext.event_flags` value. func (s *AVFormatContext) GetEventFlags() int32 { return (int32)(s.event_flags) } -// Custom: SetEventFlags sets `AVFormatContext.event_flags` value. +// SetEventFlags sets `AVFormatContext.event_flags` value. func (s *AVFormatContext) SetEventFlags(v int32) { s.event_flags = (C.int)(v) } -// Custom: GetEventFlagsAddr gets `AVFormatContext.event_flags` address. +// GetEventFlagsAddr gets `AVFormatContext.event_flags` address. func (s *AVFormatContext) GetEventFlagsAddr() *int32 { return (*int32)(&s.event_flags) } -// Custom: GetMaxTsProbe gets `AVFormatContext.max_ts_probe` value. +// GetMaxTsProbe gets `AVFormatContext.max_ts_probe` value. func (s *AVFormatContext) GetMaxTsProbe() int32 { return (int32)(s.max_ts_probe) } -// Custom: SetMaxTsProbe sets `AVFormatContext.max_ts_probe` value. +// SetMaxTsProbe sets `AVFormatContext.max_ts_probe` value. func (s *AVFormatContext) SetMaxTsProbe(v int32) { s.max_ts_probe = (C.int)(v) } -// Custom: GetMaxTsProbeAddr gets `AVFormatContext.max_ts_probe` address. +// GetMaxTsProbeAddr gets `AVFormatContext.max_ts_probe` address. func (s *AVFormatContext) GetMaxTsProbeAddr() *int32 { return (*int32)(&s.max_ts_probe) } -// Custom: GetAvoidNegativeTs gets `AVFormatContext.avoid_negative_ts` value. +// GetAvoidNegativeTs gets `AVFormatContext.avoid_negative_ts` value. func (s *AVFormatContext) GetAvoidNegativeTs() int32 { return (int32)(s.avoid_negative_ts) } -// Custom: SetAvoidNegativeTs sets `AVFormatContext.avoid_negative_ts` value. +// SetAvoidNegativeTs sets `AVFormatContext.avoid_negative_ts` value. func (s *AVFormatContext) SetAvoidNegativeTs(v int32) { s.avoid_negative_ts = (C.int)(v) } -// Custom: GetAvoidNegativeTsAddr gets `AVFormatContext.avoid_negative_ts` address. +// GetAvoidNegativeTsAddr gets `AVFormatContext.avoid_negative_ts` address. func (s *AVFormatContext) GetAvoidNegativeTsAddr() *int32 { return (*int32)(&s.avoid_negative_ts) } -// Custom: GetTsId gets `AVFormatContext.ts_id` value. +// GetTsId gets `AVFormatContext.ts_id` value. func (s *AVFormatContext) GetTsId() int32 { return (int32)(s.ts_id) } -// Custom: SetTsId sets `AVFormatContext.ts_id` value. +// SetTsId sets `AVFormatContext.ts_id` value. func (s *AVFormatContext) SetTsId(v int32) { s.ts_id = (C.int)(v) } -// Custom: GetTsIdAddr gets `AVFormatContext.ts_id` address. +// GetTsIdAddr gets `AVFormatContext.ts_id` address. func (s *AVFormatContext) GetTsIdAddr() *int32 { return (*int32)(&s.ts_id) } -// Custom: GetAudioPreload gets `AVFormatContext.audio_preload` value. +// GetAudioPreload gets `AVFormatContext.audio_preload` value. func (s *AVFormatContext) GetAudioPreload() int32 { return (int32)(s.audio_preload) } -// Custom: SetAudioPreload sets `AVFormatContext.audio_preload` value. +// SetAudioPreload sets `AVFormatContext.audio_preload` value. func (s *AVFormatContext) SetAudioPreload(v int32) { s.audio_preload = (C.int)(v) } -// Custom: GetAudioPreloadAddr gets `AVFormatContext.audio_preload` address. +// GetAudioPreloadAddr gets `AVFormatContext.audio_preload` address. func (s *AVFormatContext) GetAudioPreloadAddr() *int32 { return (*int32)(&s.audio_preload) } -// Custom: GetMaxChunkDuration gets `AVFormatContext.max_chunk_duration` value. +// GetMaxChunkDuration gets `AVFormatContext.max_chunk_duration` value. func (s *AVFormatContext) GetMaxChunkDuration() int32 { return (int32)(s.max_chunk_duration) } -// Custom: SetMaxChunkDuration sets `AVFormatContext.max_chunk_duration` value. +// SetMaxChunkDuration sets `AVFormatContext.max_chunk_duration` value. func (s *AVFormatContext) SetMaxChunkDuration(v int32) { s.max_chunk_duration = (C.int)(v) } -// Custom: GetMaxChunkDurationAddr gets `AVFormatContext.max_chunk_duration` address. +// GetMaxChunkDurationAddr gets `AVFormatContext.max_chunk_duration` address. func (s *AVFormatContext) GetMaxChunkDurationAddr() *int32 { return (*int32)(&s.max_chunk_duration) } -// Custom: GetMaxChunkSize gets `AVFormatContext.max_chunk_size` value. +// GetMaxChunkSize gets `AVFormatContext.max_chunk_size` value. func (s *AVFormatContext) GetMaxChunkSize() int32 { return (int32)(s.max_chunk_size) } -// Custom: SetMaxChunkSize sets `AVFormatContext.max_chunk_size` value. +// SetMaxChunkSize sets `AVFormatContext.max_chunk_size` value. func (s *AVFormatContext) SetMaxChunkSize(v int32) { s.max_chunk_size = (C.int)(v) } -// Custom: GetMaxChunkSizeAddr gets `AVFormatContext.max_chunk_size` address. +// GetMaxChunkSizeAddr gets `AVFormatContext.max_chunk_size` address. func (s *AVFormatContext) GetMaxChunkSizeAddr() *int32 { return (*int32)(&s.max_chunk_size) } -// Custom: GetUseWallclockAsTimestamps gets `AVFormatContext.use_wallclock_as_timestamps` value. +// GetUseWallclockAsTimestamps gets `AVFormatContext.use_wallclock_as_timestamps` value. func (s *AVFormatContext) GetUseWallclockAsTimestamps() int32 { return (int32)(s.use_wallclock_as_timestamps) } -// Custom: SetUseWallclockAsTimestamps sets `AVFormatContext.use_wallclock_as_timestamps` value. +// SetUseWallclockAsTimestamps sets `AVFormatContext.use_wallclock_as_timestamps` value. func (s *AVFormatContext) SetUseWallclockAsTimestamps(v int32) { s.use_wallclock_as_timestamps = (C.int)(v) } -// Custom: GetUseWallclockAsTimestampsAddr gets `AVFormatContext.use_wallclock_as_timestamps` address. +// GetUseWallclockAsTimestampsAddr gets `AVFormatContext.use_wallclock_as_timestamps` address. func (s *AVFormatContext) GetUseWallclockAsTimestampsAddr() *int32 { return (*int32)(&s.use_wallclock_as_timestamps) } -// Custom: GetAvioFlags gets `AVFormatContext.avio_flags` value. +// GetAvioFlags gets `AVFormatContext.avio_flags` value. func (s *AVFormatContext) GetAvioFlags() int32 { return (int32)(s.avio_flags) } -// Custom: SetAvioFlags sets `AVFormatContext.avio_flags` value. +// SetAvioFlags sets `AVFormatContext.avio_flags` value. func (s *AVFormatContext) SetAvioFlags(v int32) { s.avio_flags = (C.int)(v) } -// Custom: GetAvioFlagsAddr gets `AVFormatContext.avio_flags` address. +// GetAvioFlagsAddr gets `AVFormatContext.avio_flags` address. func (s *AVFormatContext) GetAvioFlagsAddr() *int32 { return (*int32)(&s.avio_flags) } -// Custom: GetDurationEstimationMethod gets `AVFormatContext.duration_estimation_method` value. +// GetDurationEstimationMethod gets `AVFormatContext.duration_estimation_method` value. func (s *AVFormatContext) GetDurationEstimationMethod() AVDurationEstimationMethod { return (AVDurationEstimationMethod)(s.duration_estimation_method) } -// Custom: SetDurationEstimationMethod sets `AVFormatContext.duration_estimation_method` value. +// SetDurationEstimationMethod sets `AVFormatContext.duration_estimation_method` value. func (s *AVFormatContext) SetDurationEstimationMethod(v AVDurationEstimationMethod) { s.duration_estimation_method = (C.enum_AVDurationEstimationMethod)(v) } -// Custom: GetDurationEstimationMethodAddr gets `AVFormatContext.duration_estimation_method` address. +// GetDurationEstimationMethodAddr gets `AVFormatContext.duration_estimation_method` address. func (s *AVFormatContext) GetDurationEstimationMethodAddr() *AVDurationEstimationMethod { return (*AVDurationEstimationMethod)(unsafe.Pointer(&s.duration_estimation_method)) } -// Custom: GetSkipInitialBytes gets `AVFormatContext.skip_initial_bytes` value. +// GetSkipInitialBytes gets `AVFormatContext.skip_initial_bytes` value. func (s *AVFormatContext) GetSkipInitialBytes() int64 { return (int64)(s.skip_initial_bytes) } -// Custom: SetSkipInitialBytes sets `AVFormatContext.skip_initial_bytes` value. +// SetSkipInitialBytes sets `AVFormatContext.skip_initial_bytes` value. func (s *AVFormatContext) SetSkipInitialBytes(v int64) { s.skip_initial_bytes = (C.int64_t)(v) } -// Custom: GetSkipInitialBytesAddr gets `AVFormatContext.skip_initial_bytes` address. +// GetSkipInitialBytesAddr gets `AVFormatContext.skip_initial_bytes` address. func (s *AVFormatContext) GetSkipInitialBytesAddr() *int64 { return (*int64)(&s.skip_initial_bytes) } -// Custom: GetCorrectTsOverflow gets `AVFormatContext.correct_ts_overflow` value. +// GetCorrectTsOverflow gets `AVFormatContext.correct_ts_overflow` value. func (s *AVFormatContext) GetCorrectTsOverflow() uint32 { return (uint32)(s.correct_ts_overflow) } -// Custom: SetCorrectTsOverflow sets `AVFormatContext.correct_ts_overflow` value. +// SetCorrectTsOverflow sets `AVFormatContext.correct_ts_overflow` value. func (s *AVFormatContext) SetCorrectTsOverflow(v uint32) { s.correct_ts_overflow = (C.uint)(v) } -// Custom: GetCorrectTsOverflowAddr gets `AVFormatContext.correct_ts_overflow` address. +// GetCorrectTsOverflowAddr gets `AVFormatContext.correct_ts_overflow` address. func (s *AVFormatContext) GetCorrectTsOverflowAddr() *uint32 { return (*uint32)(&s.correct_ts_overflow) } -// Custom: GetSeek2any gets `AVFormatContext.seek2any` value. +// GetSeek2any gets `AVFormatContext.seek2any` value. func (s *AVFormatContext) GetSeek2any() int32 { return (int32)(s.seek2any) } -// Custom: SetSeek2any sets `AVFormatContext.seek2any` value. +// SetSeek2any sets `AVFormatContext.seek2any` value. func (s *AVFormatContext) SetSeek2any(v int32) { s.seek2any = (C.int)(v) } -// Custom: GetSeek2anyAddr gets `AVFormatContext.seek2any` address. +// GetSeek2anyAddr gets `AVFormatContext.seek2any` address. func (s *AVFormatContext) GetSeek2anyAddr() *int32 { return (*int32)(&s.seek2any) } -// Custom: GetFlushPackets gets `AVFormatContext.flush_packets` value. +// GetFlushPackets gets `AVFormatContext.flush_packets` value. func (s *AVFormatContext) GetFlushPackets() int32 { return (int32)(s.flush_packets) } -// Custom: SetFlushPackets sets `AVFormatContext.flush_packets` value. +// SetFlushPackets sets `AVFormatContext.flush_packets` value. func (s *AVFormatContext) SetFlushPackets(v int32) { s.flush_packets = (C.int)(v) } -// Custom: GetFlushPacketsAddr gets `AVFormatContext.flush_packets` address. +// GetFlushPacketsAddr gets `AVFormatContext.flush_packets` address. func (s *AVFormatContext) GetFlushPacketsAddr() *int32 { return (*int32)(&s.flush_packets) } -// Custom: GetProbeScore gets `AVFormatContext.probe_score` value. +// GetProbeScore gets `AVFormatContext.probe_score` value. func (s *AVFormatContext) GetProbeScore() int32 { return (int32)(s.probe_score) } -// Custom: SetProbeScore sets `AVFormatContext.probe_score` value. +// SetProbeScore sets `AVFormatContext.probe_score` value. func (s *AVFormatContext) SetProbeScore(v int32) { s.probe_score = (C.int)(v) } -// Custom: GetProbeScoreAddr gets `AVFormatContext.probe_score` address. +// GetProbeScoreAddr gets `AVFormatContext.probe_score` address. func (s *AVFormatContext) GetProbeScoreAddr() *int32 { return (*int32)(&s.probe_score) } -// Custom: GetFormatProbesize gets `AVFormatContext.format_probesize` value. +// GetFormatProbesize gets `AVFormatContext.format_probesize` value. func (s *AVFormatContext) GetFormatProbesize() int32 { return (int32)(s.format_probesize) } -// Custom: SetFormatProbesize sets `AVFormatContext.format_probesize` value. +// SetFormatProbesize sets `AVFormatContext.format_probesize` value. func (s *AVFormatContext) SetFormatProbesize(v int32) { s.format_probesize = (C.int)(v) } -// Custom: GetFormatProbesizeAddr gets `AVFormatContext.format_probesize` address. +// GetFormatProbesizeAddr gets `AVFormatContext.format_probesize` address. func (s *AVFormatContext) GetFormatProbesizeAddr() *int32 { return (*int32)(&s.format_probesize) } -// Custom: GetCodecWhitelist gets `AVFormatContext.codec_whitelist` value. +// GetCodecWhitelist gets `AVFormatContext.codec_whitelist` value. func (s *AVFormatContext) GetCodecWhitelist() string { return C.GoString(s.codec_whitelist) } -// Custom: GetFormatWhitelist gets `AVFormatContext.format_whitelist` value. +// GetFormatWhitelist gets `AVFormatContext.format_whitelist` value. func (s *AVFormatContext) GetFormatWhitelist() string { return C.GoString(s.format_whitelist) } -// Custom: GetInternal gets `AVFormatContext.internal` value. +// GetInternal gets `AVFormatContext.internal` value. func (s *AVFormatContext) GetInternal() *AVFormatInternal { return (*AVFormatInternal)(s.internal) } -// Custom: SetInternal sets `AVFormatContext.internal` value. +// SetInternal sets `AVFormatContext.internal` value. func (s *AVFormatContext) SetInternal(v *AVFormatInternal) { s.internal = (*C.struct_AVFormatInternal)(v) } -// Custom: GetInternalAddr gets `AVFormatContext.internal` address. +// GetInternalAddr gets `AVFormatContext.internal` address. func (s *AVFormatContext) GetInternalAddr() **AVFormatInternal { return (**AVFormatInternal)(unsafe.Pointer(&s.internal)) } -// Custom: GetIoRepositioned gets `AVFormatContext.io_repositioned` value. +// GetIoRepositioned gets `AVFormatContext.io_repositioned` value. func (s *AVFormatContext) GetIoRepositioned() int32 { return (int32)(s.io_repositioned) } -// Custom: SetIoRepositioned sets `AVFormatContext.io_repositioned` value. +// SetIoRepositioned sets `AVFormatContext.io_repositioned` value. func (s *AVFormatContext) SetIoRepositioned(v int32) { s.io_repositioned = (C.int)(v) } -// Custom: GetIoRepositionedAddr gets `AVFormatContext.io_repositioned` address. +// GetIoRepositionedAddr gets `AVFormatContext.io_repositioned` address. func (s *AVFormatContext) GetIoRepositionedAddr() *int32 { return (*int32)(&s.io_repositioned) } -// Custom: GetVideoCodec gets `AVFormatContext.video_codec` value. +// GetVideoCodec gets `AVFormatContext.video_codec` value. func (s *AVFormatContext) GetVideoCodec() *AVCodec { return (*AVCodec)(s.video_codec) } -// Custom: SetVideoCodec sets `AVFormatContext.video_codec` value. +// SetVideoCodec sets `AVFormatContext.video_codec` value. func (s *AVFormatContext) SetVideoCodec(v *AVCodec) { s.video_codec = (*C.struct_AVCodec)(v) } -// Custom: GetVideoCodecAddr gets `AVFormatContext.video_codec` address. +// GetVideoCodecAddr gets `AVFormatContext.video_codec` address. func (s *AVFormatContext) GetVideoCodecAddr() **AVCodec { return (**AVCodec)(unsafe.Pointer(&s.video_codec)) } -// Custom: GetAudioCodec gets `AVFormatContext.audio_codec` value. +// GetAudioCodec gets `AVFormatContext.audio_codec` value. func (s *AVFormatContext) GetAudioCodec() *AVCodec { return (*AVCodec)(s.audio_codec) } -// Custom: SetAudioCodec sets `AVFormatContext.audio_codec` value. +// SetAudioCodec sets `AVFormatContext.audio_codec` value. func (s *AVFormatContext) SetAudioCodec(v *AVCodec) { s.audio_codec = (*C.struct_AVCodec)(v) } -// Custom: GetAudioCodecAddr gets `AVFormatContext.audio_codec` address. +// GetAudioCodecAddr gets `AVFormatContext.audio_codec` address. func (s *AVFormatContext) GetAudioCodecAddr() **AVCodec { return (**AVCodec)(unsafe.Pointer(&s.audio_codec)) } -// Custom: GetSubtitleCodec gets `AVFormatContext.subtitle_codec` value. +// GetSubtitleCodec gets `AVFormatContext.subtitle_codec` value. func (s *AVFormatContext) GetSubtitleCodec() *AVCodec { return (*AVCodec)(s.subtitle_codec) } -// Custom: SetSubtitleCodec sets `AVFormatContext.subtitle_codec` value. +// SetSubtitleCodec sets `AVFormatContext.subtitle_codec` value. func (s *AVFormatContext) SetSubtitleCodec(v *AVCodec) { s.subtitle_codec = (*C.struct_AVCodec)(v) } -// Custom: GetSubtitleCodecAddr gets `AVFormatContext.subtitle_codec` address. +// GetSubtitleCodecAddr gets `AVFormatContext.subtitle_codec` address. func (s *AVFormatContext) GetSubtitleCodecAddr() **AVCodec { return (**AVCodec)(unsafe.Pointer(&s.subtitle_codec)) } -// Custom: GetDataCodec gets `AVFormatContext.data_codec` value. +// GetDataCodec gets `AVFormatContext.data_codec` value. func (s *AVFormatContext) GetDataCodec() *AVCodec { return (*AVCodec)(s.data_codec) } -// Custom: SetDataCodec sets `AVFormatContext.data_codec` value. +// SetDataCodec sets `AVFormatContext.data_codec` value. func (s *AVFormatContext) SetDataCodec(v *AVCodec) { s.data_codec = (*C.struct_AVCodec)(v) } -// Custom: GetDataCodecAddr gets `AVFormatContext.data_codec` address. +// GetDataCodecAddr gets `AVFormatContext.data_codec` address. func (s *AVFormatContext) GetDataCodecAddr() **AVCodec { return (**AVCodec)(unsafe.Pointer(&s.data_codec)) } -// Custom: GetMetadataHeaderPadding gets `AVFormatContext.metadata_header_padding` value. +// GetMetadataHeaderPadding gets `AVFormatContext.metadata_header_padding` value. func (s *AVFormatContext) GetMetadataHeaderPadding() int32 { return (int32)(s.metadata_header_padding) } -// Custom: SetMetadataHeaderPadding sets `AVFormatContext.metadata_header_padding` value. +// SetMetadataHeaderPadding sets `AVFormatContext.metadata_header_padding` value. func (s *AVFormatContext) SetMetadataHeaderPadding(v int32) { s.metadata_header_padding = (C.int)(v) } -// Custom: GetMetadataHeaderPaddingAddr gets `AVFormatContext.metadata_header_padding` address. +// GetMetadataHeaderPaddingAddr gets `AVFormatContext.metadata_header_padding` address. func (s *AVFormatContext) GetMetadataHeaderPaddingAddr() *int32 { return (*int32)(&s.metadata_header_padding) } -// Custom: GetOpaque gets `AVFormatContext.opaque` value. +// GetOpaque gets `AVFormatContext.opaque` value. func (s *AVFormatContext) GetOpaque() unsafe.Pointer { return s.opaque } -// Custom: SetOpaque sets `AVFormatContext.opaque` value. +// SetOpaque sets `AVFormatContext.opaque` value. func (s *AVFormatContext) SetOpaque(v CVoidPointer) { s.opaque = VoidPointer(v) } -// Custom: GetOpaqueAddr gets `AVFormatContext.opaque` address. +// GetOpaqueAddr gets `AVFormatContext.opaque` address. func (s *AVFormatContext) GetOpaqueAddr() unsafe.Pointer { return (unsafe.Pointer)(&s.opaque) } -// Custom: GetOutputTsOffset gets `AVFormatContext.output_ts_offset` value. +// GetOutputTsOffset gets `AVFormatContext.output_ts_offset` value. func (s *AVFormatContext) GetOutputTsOffset() int64 { return (int64)(s.output_ts_offset) } -// Custom: SetOutputTsOffset sets `AVFormatContext.output_ts_offset` value. +// SetOutputTsOffset sets `AVFormatContext.output_ts_offset` value. func (s *AVFormatContext) SetOutputTsOffset(v int64) { s.output_ts_offset = (C.int64_t)(v) } -// Custom: GetOutputTsOffsetAddr gets `AVFormatContext.output_ts_offset` address. +// GetOutputTsOffsetAddr gets `AVFormatContext.output_ts_offset` address. func (s *AVFormatContext) GetOutputTsOffsetAddr() *int64 { return (*int64)(&s.output_ts_offset) } -// Custom: GetDumpSeparator gets `AVFormatContext.dump_separator` value. +// GetDumpSeparator gets `AVFormatContext.dump_separator` value. func (s *AVFormatContext) GetDumpSeparator() *uint8 { return (*uint8)(s.dump_separator) } -// Custom: SetDumpSeparator sets `AVFormatContext.dump_separator` value. +// SetDumpSeparator sets `AVFormatContext.dump_separator` value. func (s *AVFormatContext) SetDumpSeparator(v *uint8) { s.dump_separator = (*C.uint8_t)(v) } -// Custom: GetDumpSeparatorAddr gets `AVFormatContext.dump_separator` address. +// GetDumpSeparatorAddr gets `AVFormatContext.dump_separator` address. func (s *AVFormatContext) GetDumpSeparatorAddr() **uint8 { return (**uint8)(unsafe.Pointer(&s.dump_separator)) } -// Custom: GetDataCodecId gets `AVFormatContext.data_codec_id` value. +// GetDataCodecId gets `AVFormatContext.data_codec_id` value. func (s *AVFormatContext) GetDataCodecId() AVCodecID { return (AVCodecID)(s.data_codec_id) } -// Custom: SetDataCodecId sets `AVFormatContext.data_codec_id` value. +// SetDataCodecId sets `AVFormatContext.data_codec_id` value. func (s *AVFormatContext) SetDataCodecId(v AVCodecID) { s.data_codec_id = (C.enum_AVCodecID)(v) } -// Custom: GetDataCodecIdAddr gets `AVFormatContext.data_codec_id` address. +// GetDataCodecIdAddr gets `AVFormatContext.data_codec_id` address. func (s *AVFormatContext) GetDataCodecIdAddr() *AVCodecID { return (*AVCodecID)(unsafe.Pointer(&s.data_codec_id)) } -// Custom: GetProtocolWhitelist gets `AVFormatContext.protocol_whitelist` value. +// typedef int (*av_format_context_open_cb)(struct AVFormatContext *s, AVIOContext **p, const char *url, int flags, +// const AVIOInterruptCB *int_cb, AVDictionary **options); +type AvFormatContextOpenCb = C.av_format_context_open_cb + +// Deprecated: Use io_open and io_close. +// +// GetOpenCb gets `AVFormatContext.open_cb` value. +func (s *AVFormatContext) GetOpenCb() AvFormatContextOpenCb { + return (AvFormatContextOpenCb)(s.open_cb) +} + +// Deprecated: Use io_open and io_close. +// +// SetOpenCb sets `AVFormatContext.open_cb` value. +func (s *AVFormatContext) SetOpenCb(v AvFormatContextOpenCb) { + s.open_cb = (C.av_format_context_open_cb)(v) +} + +// Deprecated: Use io_open and io_close. +// +// GetOpenCbAddr gets `AVFormatContext.open_cb` address. +func (s *AVFormatContext) GetOpenCbAddr() *AvFormatContextOpenCb { + return (*AvFormatContextOpenCb)(&s.open_cb) +} + +// GetProtocolWhitelist gets `AVFormatContext.protocol_whitelist` value. func (s *AVFormatContext) GetProtocolWhitelist() string { return C.GoString(s.protocol_whitelist) } -// Custom: GetProtocolBlacklist gets `AVFormatContext.protocol_blacklist` value. +// typedef int (*av_format_context_io_open_func)(struct AVFormatContext *s, AVIOContext **pb, const char *url, +// int flags, AVDictionary **options); +type AvFormatContextIoOpenFunc = C.av_format_context_io_open_func + +// typedef void (*av_format_context_io_close_func)(struct AVFormatContext *s, AVIOContext *pb); +type AvFormatContextIoCloseFunc = C.av_format_context_io_close_func + +// GetIoOpen gets `AVFormatContext.io_open` value. +func (s *AVFormatContext) GetIoOpen() AvFormatContextIoOpenFunc { + return (AvFormatContextIoOpenFunc)(s.io_open) +} + +// SetIoOpen sets `AVFormatContext.io_open` value. +func (s *AVFormatContext) SetIoOpen(v AvFormatContextIoOpenFunc) { + s.io_open = (C.av_format_context_io_open_func)(v) +} + +// GetIoOpenAddr gets `AVFormatContext.io_open` address. +func (s *AVFormatContext) GetIoOpenAddr() *AvFormatContextIoOpenFunc { + return (*AvFormatContextIoOpenFunc)(&s.io_open) +} + +// GetIoClose gets `AVFormatContext.io_close` value. +func (s *AVFormatContext) GetIoClose() AvFormatContextIoCloseFunc { + return (AvFormatContextIoCloseFunc)(s.io_close) +} + +// SetIoClose sets `AVFormatContext.io_close` value. +func (s *AVFormatContext) SetIoClose(v AvFormatContextIoCloseFunc) { + s.io_close = (C.av_format_context_io_close_func)(v) +} + +// GetIoCloseAddr gets `AVFormatContext.io_close` address. +func (s *AVFormatContext) GetIoCloseAddr() *AvFormatContextIoCloseFunc { + return (*AvFormatContextIoCloseFunc)(&s.io_close) +} + +// GetProtocolBlacklist gets `AVFormatContext.protocol_blacklist` value. func (s *AVFormatContext) GetProtocolBlacklist() string { return C.GoString(s.protocol_blacklist) } -// Custom: GetMaxStreams gets `AVFormatContext.max_streams` value. +// GetMaxStreams gets `AVFormatContext.max_streams` value. func (s *AVFormatContext) GetMaxStreams() int32 { return (int32)(s.max_streams) } -// Custom: SetMaxStreams sets `AVFormatContext.max_streams` value. +// SetMaxStreams sets `AVFormatContext.max_streams` value. func (s *AVFormatContext) SetMaxStreams(v int32) { s.max_streams = (C.int)(v) } -// Custom: GetMaxStreamsAddr gets `AVFormatContext.max_streams` address. +// GetMaxStreamsAddr gets `AVFormatContext.max_streams` address. func (s *AVFormatContext) GetMaxStreamsAddr() *int32 { return (*int32)(&s.max_streams) } -// Custom: GetSkipEstimateDurationFromPts gets `AVFormatContext.skip_estimate_duration_from_pts` value. +// GetSkipEstimateDurationFromPts gets `AVFormatContext.skip_estimate_duration_from_pts` value. func (s *AVFormatContext) GetSkipEstimateDurationFromPts() int32 { return (int32)(s.skip_estimate_duration_from_pts) } -// Custom: SetSkipEstimateDurationFromPts sets `AVFormatContext.skip_estimate_duration_from_pts` value. +// SetSkipEstimateDurationFromPts sets `AVFormatContext.skip_estimate_duration_from_pts` value. func (s *AVFormatContext) SetSkipEstimateDurationFromPts(v int32) { s.skip_estimate_duration_from_pts = (C.int)(v) } -// Custom: GetSkipEstimateDurationFromPtsAddr gets `AVFormatContext.skip_estimate_duration_from_pts` address. +// GetSkipEstimateDurationFromPtsAddr gets `AVFormatContext.skip_estimate_duration_from_pts` address. func (s *AVFormatContext) GetSkipEstimateDurationFromPtsAddr() *int32 { return (*int32)(&s.skip_estimate_duration_from_pts) } -// Custom: GetMaxProbePackets gets `AVFormatContext.max_probe_packets` value. +// GetMaxProbePackets gets `AVFormatContext.max_probe_packets` value. func (s *AVFormatContext) GetMaxProbePackets() int32 { return (int32)(s.max_probe_packets) } -// Custom: SetMaxProbePackets sets `AVFormatContext.max_probe_packets` value. +// SetMaxProbePackets sets `AVFormatContext.max_probe_packets` value. func (s *AVFormatContext) SetMaxProbePackets(v int32) { s.max_probe_packets = (C.int)(v) } -// Custom: GetMaxProbePacketsAddr gets `AVFormatContext.max_probe_packets` address. +// GetMaxProbePacketsAddr gets `AVFormatContext.max_probe_packets` address. func (s *AVFormatContext) GetMaxProbePacketsAddr() *int32 { return (*int32)(&s.max_probe_packets) } @@ -2014,77 +2109,107 @@ const ( AVFMT_EVENT_FLAG_METADATA_UPDATED = C.AVFMT_EVENT_FLAG_METADATA_UPDATED ) -// Deprecated: No use +// Deprecated: No use. +// +// AvFormatGetProbeScore func AvFormatGetProbeScore(s *AVFormatContext) int32 { return (int32)(C.av_format_get_probe_score((*C.struct_AVFormatContext)(s))) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFormatGetVideoCodec func AvFormatGetVideoCodec(s *AVFormatContext) *AVCodec { return (*AVCodec)(C.av_format_get_video_codec((*C.struct_AVFormatContext)(s))) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFormatSetVideoCodec func AvFormatSetVideoCodec(s *AVFormatContext, c *AVCodec) { C.av_format_set_video_codec((*C.struct_AVFormatContext)(s), (*C.struct_AVCodec)(c)) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFormatGetAudioCodec func AvFormatGetAudioCodec(s *AVFormatContext) *AVCodec { return (*AVCodec)(C.av_format_get_audio_codec((*C.struct_AVFormatContext)(s))) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFormatSetAudioCodec func AvFormatSetAudioCodec(s *AVFormatContext, c *AVCodec) { C.av_format_set_audio_codec((*C.struct_AVFormatContext)(s), (*C.struct_AVCodec)(c)) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFormatGetSubtitleCodec func AvFormatGetSubtitleCodec(s *AVFormatContext) *AVCodec { return (*AVCodec)(C.av_format_get_subtitle_codec((*C.struct_AVFormatContext)(s))) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFormatSetSubtitleCodec func AvFormatSetSubtitleCodec(s *AVFormatContext, c *AVCodec) { C.av_format_set_subtitle_codec((*C.struct_AVFormatContext)(s), (*C.struct_AVCodec)(c)) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFormatGetDataCodec func AvFormatGetDataCodec(s *AVFormatContext) *AVCodec { return (*AVCodec)(C.av_format_get_data_codec((*C.struct_AVFormatContext)(s))) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFormatSetDataCodec func AvFormatSetDataCodec(s *AVFormatContext, c *AVCodec) { C.av_format_set_data_codec((*C.struct_AVFormatContext)(s), (*C.struct_AVCodec)(c)) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFormatGetOpaque func AvFormatGetOpaque(s *AVFormatContext) unsafe.Pointer { return C.av_format_get_opaque((*C.struct_AVFormatContext)(s)) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFormatSetOpaque func AvFormatSetOpaque(s *AVFormatContext, opaque CVoidPointer) { C.av_format_set_opaque((*C.struct_AVFormatContext)(s), VoidPointer(opaque)) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFormatGetControlMessageCb func AvFormatGetControlMessageCb(s *AVFormatContext) AVFormatControlMessageFunc { return (AVFormatControlMessageFunc)(C.av_format_get_control_message_cb((*C.struct_AVFormatContext)(s))) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFormatSetControlMessageCb func AvFormatSetControlMessageCb(s *AVFormatContext, callback AVFormatControlMessageFunc) { C.av_format_set_control_message_cb((*C.struct_AVFormatContext)(s), (C.av_format_control_message)(callback)) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFormatGetOpenCb func AvFormatGetOpenCb(s *AVFormatContext) AVOpenCallbackFunc { return (AVOpenCallbackFunc)(C.av_format_get_open_cb((*C.struct_AVFormatContext)(s))) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFormatSetOpenCb func AvFormatSetOpenCb(s *AVFormatContext, callback AVOpenCallbackFunc) { C.av_format_set_open_cb((*C.struct_AVFormatContext)(s), (C.AVOpenCallback)(callback)) } @@ -2115,17 +2240,23 @@ func AvFormatLicense() string { return C.GoString(C.avformat_license()) } -// Deprecated: No use +// Deprecated: No use. +// +// AvRegisterAll func AvRegisterAll() { C.av_register_all() } -// Deprecated: No use +// Deprecated: No use. +// +// AvRegisterInputFormat func AvRegisterInputFormat(format *AVInputFormat) { C.av_register_input_format((*C.struct_AVInputFormat)(format)) } -// Deprecated: No use +// Deprecated: No use. +// +// AvRegisterOutputFormat func AvRegisterOutputFormat(format *AVOutputFormat) { C.av_register_output_format((*C.struct_AVOutputFormat)(format)) } @@ -2142,12 +2273,20 @@ func AvFormatNetworkDeinit() int32 { return (int32)(C.avformat_network_deinit()) } -// Deprecated: No use +// Deprecated: No use. +// +// AvIformatNext returns the first registered input format if f is NULL, +// returns the next registered input format after f if f is non-NULL, +// or NULL if f is the last one. func AvIformatNext(f *AVInputFormat) *AVInputFormat { return (*AVInputFormat)(C.av_iformat_next((*C.struct_AVInputFormat)(f))) } -// Deprecated: No use +// Deprecated: No use. +// +// AvOformatNext returns the first registered output format if f is NULL, +// returns the next registered output format after f if f is non-NULL, +// or NULL if f is the last one. func AvOformatNext(f *AVOutputFormat) *AVOutputFormat { return (*AVOutputFormat)(C.av_oformat_next((*C.struct_AVOutputFormat)(f))) } @@ -2272,6 +2411,8 @@ func AvFormatOpenInput(ps **AVFormatContext, url string, fmt *AVInputFormat, opt } // Deprecated: Use an AVDictionary to pass options to a demuxer. +// +// AvDemuxerOpen func AvDemuxerOpen(ic *AVFormatContext) int32 { return (int32)(C.av_demuxer_open((*C.struct_AVFormatContext)(ic))) } @@ -2629,6 +2770,8 @@ func AvFormatQueueAttachedPictures(ic *AVFormatContext) int32 { return (int32)(C.avformat_queue_attached_pictures((*C.struct_AVFormatContext)(ic))) } +// Deprecated: No use. +// // AvApplyBitstreamFilters applies a list of bitstream filters to a packet. func AvApplyBitstreamFilters(codec *AVCodecContext, pkt *AVPacket, bsfc *AVBitStreamFilterContext) int32 { return (int32)(C.av_apply_bitstream_filters((*C.struct_AVCodecContext)(codec), diff --git a/avformat_avio.go b/avformat_avio.go index c6286da..e24ca22 100644 --- a/avformat_avio.go +++ b/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 diff --git a/avutil.go b/avutil.go index 68003f7..ccff964 100644 --- a/avutil.go +++ b/avutil.go @@ -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))) } diff --git a/avutil_base64.go b/avutil_base64.go index cf8a6ea..72742a4 100644 --- a/avutil_base64.go +++ b/avutil_base64.go @@ -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 } diff --git a/avutil_blowfish.go b/avutil_blowfish.go index d9172d1..3fcabef 100644 --- a/avutil_blowfish.go +++ b/avutil_blowfish.go @@ -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)) } diff --git a/avutil_buffer.go b/avutil_buffer.go index 1784bcc..f8cdfe2 100644 --- a/avutil_buffer.go +++ b/avutil_buffer.go @@ -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) } diff --git a/avutil_common.go b/avutil_common.go index ba123ad..a598673 100644 --- a/avutil_common.go +++ b/avutil_common.go @@ -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) } diff --git a/avutil_cpu.go b/avutil_cpu.go index 7bf498b..b36a148 100644 --- a/avutil_cpu.go +++ b/avutil_cpu.go @@ -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() diff --git a/avutil_des.go b/avutil_des.go index 96c934a..074621b 100644 --- a/avutil_des.go +++ b/avutil_des.go @@ -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) } diff --git a/avutil_dict.go b/avutil_dict.go index b4a0bed..f5fe55d 100644 --- a/avutil_dict.go +++ b/avutil_dict.go @@ -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) } diff --git a/avutil_dovi_meta.go b/avutil_dovi_meta.go index a92d9ae..f328d36 100644 --- a/avutil_dovi_meta.go +++ b/avutil_dovi_meta.go @@ -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) diff --git a/avutil_downmix_info.go b/avutil_downmix_info.go index cd41b84..bf5e191 100644 --- a/avutil_downmix_info.go +++ b/avutil_downmix_info.go @@ -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) } diff --git a/avutil_encryption_info.go b/avutil_encryption_info.go index 7df0335..aece3b4 100644 --- a/avutil_encryption_info.go +++ b/avutil_encryption_info.go @@ -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)) } diff --git a/avutil_error.go b/avutil_error.go index 121ca45..179b988 100644 --- a/avutil_error.go +++ b/avutil_error.go @@ -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) diff --git a/avutil_fifo.go b/avutil_fifo.go index 360a8da..73f6342 100644 --- a/avutil_fifo.go +++ b/avutil_fifo.go @@ -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))) } diff --git a/avutil_film_grain_params.go b/avutil_film_grain_params.go index e0e198b..40be9ab 100644 --- a/avutil_film_grain_params.go +++ b/avutil_film_grain_params.go @@ -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))) diff --git a/avutil_frame.go b/avutil_frame.go index b8105d4..7c640f4 100644 --- a/avutil_frame.go +++ b/avutil_frame.go @@ -52,77 +52,77 @@ const ( // Structure to hold side data for an AVFrame. type AVFrameSideData C.struct_AVFrameSideData -// Custom: GetType gets `AVFrameSideData.type` value. +// GetType gets `AVFrameSideData.type` value. func (sd *AVFrameSideData) GetType() AVFrameSideDataType { return (AVFrameSideDataType)(sd._type) } -// Custom: SetType sets `AVFrameSideData.type` value. +// SetType sets `AVFrameSideData.type` value. func (sd *AVFrameSideData) SetType(v AVFrameSideDataType) { sd._type = (C.enum_AVFrameSideDataType)(v) } -// Custom: GetTypeAddr gets `AVFrameSideData.type` address. +// GetTypeAddr gets `AVFrameSideData.type` address. func (sd *AVFrameSideData) GetTypeAddr() *AVFrameSideDataType { return (*AVFrameSideDataType)(&sd._type) } -// Custom: GetData gets `AVFrameSideData.data` value. +// GetData gets `AVFrameSideData.data` value. func (sd *AVFrameSideData) GetData() *uint8 { return (*uint8)(sd.data) } -// Custom: SetData sets `AVFrameSideData.data` value. +// SetData sets `AVFrameSideData.data` value. func (sd *AVFrameSideData) SetData(v *uint8) { sd.data = (*C.uint8_t)(v) } -// Custom: GetDataAddr gets `AVFrameSideData.data` address. +// GetDataAddr gets `AVFrameSideData.data` address. func (sd *AVFrameSideData) GetDataAddr() **uint8 { return (**uint8)(unsafe.Pointer(&sd.data)) } -// Custom: GetSize gets `AVFrameSideData.size` value. +// GetSize gets `AVFrameSideData.size` value. func (sd *AVFrameSideData) GetSize() int32 { return (int32)(sd.size) } -// Custom: SetSize sets `AVFrameSideData.size` value. +// SetSize sets `AVFrameSideData.size` value. func (sd *AVFrameSideData) SetSize(v int32) { sd.size = (C.int)(v) } -// Custom: GetSizeAddr gets `AVFrameSideData.size` address. +// GetSizeAddr gets `AVFrameSideData.size` address. func (sd *AVFrameSideData) GetSizeAddr() *int32 { return (*int32)(&sd.size) } -// Custom: GetMetadata gets `AVFrameSideData.metadata` value. +// GetMetadata gets `AVFrameSideData.metadata` value. func (sd *AVFrameSideData) GetMetadata() *AVDictionary { return (*AVDictionary)(sd.metadata) } -// Custom: SetMetadata sets `AVFrameSideData.metadata` value. +// SetMetadata sets `AVFrameSideData.metadata` value. func (sd *AVFrameSideData) SetMetadata(v *AVDictionary) { sd.metadata = (*C.struct_AVDictionary)(v) } -// Custom: GetMetadataAddr gets `AVFrameSideData.metadata` address. +// GetMetadataAddr gets `AVFrameSideData.metadata` address. func (sd *AVFrameSideData) GetMetadataAddr() **AVDictionary { return (**AVDictionary)(unsafe.Pointer(&sd.metadata)) } -// Custom: GetBuf gets `AVFrameSideData.buf` value. +// GetBuf gets `AVFrameSideData.buf` value. func (sd *AVFrameSideData) GetBuf() *AVBufferRef { return (*AVBufferRef)(sd.buf) } -// Custom: SetBuf sets `AVFrameSideData.buf` value. +// SetBuf sets `AVFrameSideData.buf` value. func (sd *AVFrameSideData) SetBuf(v *AVBufferRef) { sd.buf = (*C.struct_AVBufferRef)(v) } -// Custom: GetBufAddr gets `AVFrameSideData.buf` address. +// GetBufAddr gets `AVFrameSideData.buf` address. func (sd *AVFrameSideData) GetBufAddr() **AVBufferRef { return (**AVBufferRef)(unsafe.Pointer(&sd.buf)) } @@ -130,92 +130,92 @@ func (sd *AVFrameSideData) GetBufAddr() **AVBufferRef { // Structure describing a single Region Of Interest. type AVRegionOfInterest C.struct_AVRegionOfInterest -// Custom: GetSelfSize gets `AVRegionOfInterest.self_size` value. +// GetSelfSize gets `AVRegionOfInterest.self_size` value. func (roi *AVRegionOfInterest) GetSelfSize() uint32 { return (uint32)(roi.self_size) } -// Custom: SetSelfSize sets `AVRegionOfInterest.self_size` value. +// SetSelfSize sets `AVRegionOfInterest.self_size` value. func (roi *AVRegionOfInterest) SetSelfSize(v uint32) { roi.self_size = (C.uint32_t)(v) } -// Custom: GetSelfSizeAddr gets `AVRegionOfInterest.self_size` address. +// GetSelfSizeAddr gets `AVRegionOfInterest.self_size` address. func (roi *AVRegionOfInterest) GetSelfSizeAddr() *uint32 { return (*uint32)(&roi.self_size) } -// Custom: GetTop gets `AVRegionOfInterest.top` value. +// GetTop gets `AVRegionOfInterest.top` value. func (roi *AVRegionOfInterest) GetTop() int32 { return (int32)(roi.top) } -// Custom: SetTop sets `AVRegionOfInterest.top` value. +// SetTop sets `AVRegionOfInterest.top` value. func (roi *AVRegionOfInterest) SetTop(v int32) { roi.top = (C.int)(v) } -// Custom: GetTopAddr gets `AVRegionOfInterest.top` address. +// GetTopAddr gets `AVRegionOfInterest.top` address. func (roi *AVRegionOfInterest) GetTopAddr() *int32 { return (*int32)(&roi.top) } -// Custom: GetBottom gets `AVRegionOfInterest.bottom` value. +// GetBottom gets `AVRegionOfInterest.bottom` value. func (roi *AVRegionOfInterest) GetBottom() int32 { return (int32)(roi.bottom) } -// Custom: SetBottom sets `AVRegionOfInterest.bottom` value. +// SetBottom sets `AVRegionOfInterest.bottom` value. func (roi *AVRegionOfInterest) SetBottom(v int32) { roi.bottom = (C.int)(v) } -// Custom: GetBottomAddr gets `AVRegionOfInterest.bottom` address. +// GetBottomAddr gets `AVRegionOfInterest.bottom` address. func (roi *AVRegionOfInterest) GetBottomAddr() *int32 { return (*int32)(&roi.bottom) } -// Custom: GetLeft gets `AVRegionOfInterest.left` value. +// GetLeft gets `AVRegionOfInterest.left` value. func (roi *AVRegionOfInterest) GetLeft() int32 { return (int32)(roi.left) } -// Custom: SetLeft sets `AVRegionOfInterest.left` value. +// SetLeft sets `AVRegionOfInterest.left` value. func (roi *AVRegionOfInterest) SetLeft(v int32) { roi.left = (C.int)(v) } -// Custom: GetLeftAddr gets `AVRegionOfInterest.left` address. +// GetLeftAddr gets `AVRegionOfInterest.left` address. func (roi *AVRegionOfInterest) GetLeftAddr() *int32 { return (*int32)(&roi.left) } -// Custom: GetRight gets `AVRegionOfInterest.right` value. +// GetRight gets `AVRegionOfInterest.right` value. func (roi *AVRegionOfInterest) GetRight() int32 { return (int32)(roi.right) } -// Custom: SetRight sets `AVRegionOfInterest.right` value. +// SetRight sets `AVRegionOfInterest.right` value. func (roi *AVRegionOfInterest) SetRight(v int32) { roi.right = (C.int)(v) } -// Custom: GetRightAddr gets `AVRegionOfInterest.right` address. +// GetRightAddr gets `AVRegionOfInterest.right` address. func (roi *AVRegionOfInterest) GetRightAddr() *int32 { return (*int32)(&roi.right) } -// Custom: GetQoffset gets `AVRegionOfInterest.qoffset` value. +// GetQoffset gets `AVRegionOfInterest.qoffset` value. func (roi *AVRegionOfInterest) GetQoffset() AVRational { return (AVRational)(roi.qoffset) } -// Custom: SetQoffset sets `AVRegionOfInterest.qoffset` value. +// SetQoffset sets `AVRegionOfInterest.qoffset` value. func (roi *AVRegionOfInterest) SetQoffset(v AVRational) { roi.qoffset = (C.struct_AVRational)(v) } -// Custom: GetQoffsetAddr gets `AVRegionOfInterest.qoffset` address. +// GetQoffsetAddr gets `AVRegionOfInterest.qoffset` address. func (roi *AVRegionOfInterest) GetQoffsetAddr() *AVRational { return (*AVRational)(&roi.qoffset) } @@ -227,390 +227,402 @@ const ( AV_NUM_DATA_POINTERS = C.AV_NUM_DATA_POINTERS ) -// Custom: GetData gets `AVFrame.data` value. +// GetData gets `AVFrame.data` value. func (frame *AVFrame) GetData() []*uint8 { return unsafe.Slice((**uint8)(unsafe.Pointer(&frame.data[0])), AV_NUM_DATA_POINTERS) } -// Custom: SetData sets `AVFrame.data` value. +// SetData sets `AVFrame.data` value. func (frame *AVFrame) SetData(v []*uint8) { for i := 0; i < FFMIN(len(v), AV_NUM_DATA_POINTERS); i++ { frame.data[i] = (*C.uint8_t)(v[i]) } } -// Custom: GetDataAddr gets `AVFrame.data` address. +// GetDataAddr gets `AVFrame.data` address. func (frame *AVFrame) GetDataAddr() ***uint8 { return (***uint8)(unsafe.Pointer(&frame.data)) } -// Custom: GetLinesize gets `AVFrame.linesize` value. +// GetLinesize gets `AVFrame.linesize` value. func (frame *AVFrame) GetLinesize() []int32 { return unsafe.Slice((*int32)(&frame.linesize[0]), AV_NUM_DATA_POINTERS) } -// Custom: SetLinesize sets `AVFrame.linesize` value. +// SetLinesize sets `AVFrame.linesize` value. func (frame *AVFrame) SetLinesize(v []int32) { for i := 0; i < FFMIN(len(v), AV_NUM_DATA_POINTERS); i++ { frame.linesize[i] = (C.int)(v[i]) } } -// Custom: GetLinesizeAddr gets `AVFrame.linesize` address. +// GetLinesizeAddr gets `AVFrame.linesize` address. func (frame *AVFrame) GetLinesizeAddr() **int32 { return (**int32)(unsafe.Pointer(&frame.linesize)) } -// Custom: GetExtendedData gets `AVFrame.extended_data` value. +// GetExtendedData gets `AVFrame.extended_data` value. func (frame *AVFrame) GetExtendedData() **uint8 { return (**uint8)(unsafe.Pointer(frame.extended_data)) } -// Custom: SetExtendedData sets `AVFrame.extended_data` value. +// SetExtendedData sets `AVFrame.extended_data` value. func (frame *AVFrame) SetExtendedData(v **uint8) { frame.extended_data = (**C.uint8_t)(unsafe.Pointer(v)) } -// Custom: GetExtendedDataAddr gets `AVFrame.extended_data` address. +// GetExtendedDataAddr gets `AVFrame.extended_data` address. func (frame *AVFrame) GetExtendedDataAddr() ***uint8 { return (***uint8)(unsafe.Pointer(&frame.extended_data)) } -// Custom: GetWidth gets `AVFrame.width` value. +// GetWidth gets `AVFrame.width` value. func (frame *AVFrame) GetWidth() int32 { return (int32)(frame.width) } -// Custom: SetWidth sets `AVFrame.width` value. +// SetWidth sets `AVFrame.width` value. func (frame *AVFrame) SetWidth(v int32) { frame.width = (C.int)(v) } -// Custom: GetWidthAddr gets `AVFrame.width` address. +// GetWidthAddr gets `AVFrame.width` address. func (frame *AVFrame) GetWidthAddr() *int32 { return (*int32)(&frame.width) } -// Custom: GetHeight gets `AVFrame.height` value. +// GetHeight gets `AVFrame.height` value. func (frame *AVFrame) GetHeight() int32 { return (int32)(frame.height) } -// Custom: SetHeight sets `AVFrame.height` value. +// SetHeight sets `AVFrame.height` value. func (frame *AVFrame) SetHeight(v int32) { frame.height = (C.int)(v) } -// Custom: GetHeightAddr gets `AVFrame.height` address. +// GetHeightAddr gets `AVFrame.height` address. func (frame *AVFrame) GetHeightAddr() *int32 { return (*int32)(&frame.height) } -// Custom: GetNbSamples gets `AVFrame.nb_samples` value. +// GetNbSamples gets `AVFrame.nb_samples` value. func (frame *AVFrame) GetNbSamples() int32 { return (int32)(frame.nb_samples) } -// Custom: SetNbSamples sets `AVFrame.nb_samples` value. +// SetNbSamples sets `AVFrame.nb_samples` value. func (frame *AVFrame) SetNbSamples(v int32) { frame.nb_samples = (C.int)(v) } -// Custom: GetNbSamplesAddr gets `AVFrame.nb_samples` address. +// GetNbSamplesAddr gets `AVFrame.nb_samples` address. func (frame *AVFrame) GetNbSamplesAddr() *int32 { return (*int32)(&frame.nb_samples) } -// Custom: GetFormat gets `AVFrame.format` value. +// GetFormat gets `AVFrame.format` value. func (frame *AVFrame) GetFormat() int32 { return (int32)(frame.format) } -// Custom: SetFormat sets `AVFrame.format` value. +// SetFormat sets `AVFrame.format` value. func (frame *AVFrame) SetFormat(v int32) { frame.format = (C.int)(v) } -// Custom: GetFormatAddr gets `AVFrame.format` address. +// GetFormatAddr gets `AVFrame.format` address. func (frame *AVFrame) GetFormatAddr() *int32 { return (*int32)(&frame.format) } -// Custom: GetKeyFrame gets `AVFrame.key_frame` value. +// GetKeyFrame gets `AVFrame.key_frame` value. func (frame *AVFrame) GetKeyFrame() int32 { return (int32)(frame.key_frame) } -// Custom: SetKeyFrame sets `AVFrame.key_frame` value. +// SetKeyFrame sets `AVFrame.key_frame` value. func (frame *AVFrame) SetKeyFrame(v int32) { frame.key_frame = (C.int)(v) } -// Custom: GetKeyFrameAddr gets `AVFrame.key_frame` address. +// GetKeyFrameAddr gets `AVFrame.key_frame` address. func (frame *AVFrame) GetKeyFrameAddr() *int32 { return (*int32)(&frame.key_frame) } -// Custom: GetPictType gets `AVFrame.picttype` value. +// GetPictType gets `AVFrame.picttype` value. func (frame *AVFrame) GetPictType() AVPictureType { return (AVPictureType)(frame.pict_type) } -// Custom: SetPictType sets `AVFrame.picttype` value. +// SetPictType sets `AVFrame.picttype` value. func (frame *AVFrame) SetPictType(v AVPictureType) { frame.pict_type = (C.enum_AVPictureType)(v) } -// Custom: GetPictTypeAddr gets `AVFrame.picttype` address. +// GetPictTypeAddr gets `AVFrame.picttype` address. func (frame *AVFrame) GetPictTypeAddr() *AVPictureType { return (*AVPictureType)(unsafe.Pointer(&frame.pict_type)) } -// Custom: GetSampleAspectRatio gets `AVFrame.sample_aspect_ratio` value. +// GetSampleAspectRatio gets `AVFrame.sample_aspect_ratio` value. func (frame *AVFrame) GetSampleAspectRatio() AVRational { return (AVRational)(frame.sample_aspect_ratio) } -// Custom: SetSampleAspectRatio sets `AVFrame.sample_aspect_ratio` value. +// SetSampleAspectRatio sets `AVFrame.sample_aspect_ratio` value. func (frame *AVFrame) SetSampleAspectRatio(v AVRational) { frame.sample_aspect_ratio = (C.struct_AVRational)(v) } -// Custom: GetSampleAspectRatioAddr gets `AVFrame.sample_aspect_ratio` address. +// GetSampleAspectRatioAddr gets `AVFrame.sample_aspect_ratio` address. func (frame *AVFrame) GetSampleAspectRatioAddr() *AVRational { return (*AVRational)(&frame.sample_aspect_ratio) } -// Custom: GetPts gets `AVFrame.pts` value. +// GetPts gets `AVFrame.pts` value. func (frame *AVFrame) GetPts() int64 { return (int64)(frame.pts) } -// Custom: SetPts sets `AVFrame.pts` value. +// SetPts sets `AVFrame.pts` value. func (frame *AVFrame) SetPts(v int64) { frame.pts = (C.int64_t)(v) } -// Custom: GetPtsAddr gets `AVFrame.pts` address. +// GetPtsAddr gets `AVFrame.pts` address. func (frame *AVFrame) GetPtsAddr() *int64 { return (*int64)(&frame.pts) } -// Custom: GetPktPts gets `AVFrame.pkt_pts` value. +// Deprecated: Use the pts field instead. +// +// GetPktPts gets `AVFrame.pkt_pts` value. func (frame *AVFrame) GetPktPts() int64 { return (int64)(frame.pkt_pts) } -// Custom: SetPktPts sets `AVFrame.pkt_pts` value. +// Deprecated: Use the pts field instead. +// +// SetPktPts sets `AVFrame.pkt_pts` value. func (frame *AVFrame) SetPktPts(v int64) { frame.pkt_pts = (C.int64_t)(v) } -// Custom: GetPktPtsAddr gets `AVFrame.pkt_pts` address. +// Deprecated: Use the pts field instead. +// +// GetPktPtsAddr gets `AVFrame.pkt_pts` address. func (frame *AVFrame) GetPktPtsAddr() *int64 { return (*int64)(&frame.pkt_pts) } -// Custom: GetPktDts gets `AVFrame.pkt_dts` value. +// GetPktDts gets `AVFrame.pkt_dts` value. func (frame *AVFrame) GetPktDts() int64 { return (int64)(frame.pkt_dts) } -// Custom: SetPktDts sets `AVFrame.pkt_dts` value. +// SetPktDts sets `AVFrame.pkt_dts` value. func (frame *AVFrame) SetPktDts(v int64) { frame.pkt_dts = (C.int64_t)(v) } -// Custom: GetPktDtsAddr gets `AVFrame.pkt_dts` address. +// GetPktDtsAddr gets `AVFrame.pkt_dts` address. func (frame *AVFrame) GetPktDtsAddr() *int64 { return (*int64)(&frame.pkt_dts) } -// Custom: GetCodedPictureNumber gets `AVFrame.coded_picture_number` value. +// GetCodedPictureNumber gets `AVFrame.coded_picture_number` value. func (frame *AVFrame) GetCodedPictureNumber() int32 { return (int32)(frame.coded_picture_number) } -// Custom: SetCodedPictureNumber sets `AVFrame.coded_picture_number` value. +// SetCodedPictureNumber sets `AVFrame.coded_picture_number` value. func (frame *AVFrame) SetCodedPictureNumber(v int32) { frame.coded_picture_number = (C.int)(v) } -// Custom: GetCodedPictureNumberAddr gets `AVFrame.coded_picture_number` address. +// GetCodedPictureNumberAddr gets `AVFrame.coded_picture_number` address. func (frame *AVFrame) GetCodedPictureNumberAddr() *int32 { return (*int32)(&frame.coded_picture_number) } -// Custom: GetDisplayPictureNumber gets `AVFrame.display_picture_number` value. +// GetDisplayPictureNumber gets `AVFrame.display_picture_number` value. func (frame *AVFrame) GetDisplayPictureNumber() int32 { return (int32)(frame.display_picture_number) } -// Custom: SetDisplayPictureNumber sets `AVFrame.display_picture_number` value. +// SetDisplayPictureNumber sets `AVFrame.display_picture_number` value. func (frame *AVFrame) SetDisplayPictureNumber(v int32) { frame.display_picture_number = (C.int)(v) } -// Custom: GetDisplayPictureNumberAddr gets `AVFrame.display_picture_number` address. +// GetDisplayPictureNumberAddr gets `AVFrame.display_picture_number` address. func (frame *AVFrame) GetDisplayPictureNumberAddr() *int32 { return (*int32)(&frame.display_picture_number) } -// Custom: GetQuality gets `AVFrame.quality` value. +// GetQuality gets `AVFrame.quality` value. func (frame *AVFrame) GetQuality() int32 { return (int32)(frame.quality) } -// Custom: SetQuality sets `AVFrame.quality` value. +// SetQuality sets `AVFrame.quality` value. func (frame *AVFrame) SetQuality(v int32) { frame.quality = (C.int)(v) } -// Custom: GetQualityAddr gets `AVFrame.quality` address. +// GetQualityAddr gets `AVFrame.quality` address. func (frame *AVFrame) GetQualityAddr() *int32 { return (*int32)(&frame.quality) } -// Custom: GetError gets `AVFrame.error` value. +// Deprecated: Unused. +// +// GetError gets `AVFrame.error` value. func (frame *AVFrame) GetError() []uint64 { return unsafe.Slice((*uint64)(&frame.error[0]), AV_NUM_DATA_POINTERS) } -// Custom: SetError sets `AVFrame.error` value. +// Deprecated: Unused. +// +// SetError sets `AVFrame.error` value. func (frame *AVFrame) SetError(v []uint64) { for i := 0; i < FFMIN(len(v), AV_NUM_DATA_POINTERS); i++ { frame.error[i] = (C.uint64_t)(v[i]) } } -// Custom: GetErrorAddr gets `AVFrame.error` address. +// Deprecated: Unused. +// +// GetErrorAddr gets `AVFrame.error` address. func (frame *AVFrame) GetErrorAddr() **uint64 { return (**uint64)(unsafe.Pointer(&frame.error)) } -// Custom: GetRepeatPict gets `AVFrame.repeat_pict` value. +// GetRepeatPict gets `AVFrame.repeat_pict` value. func (frame *AVFrame) GetRepeatPict() int32 { return (int32)(frame.repeat_pict) } -// Custom: SetRepeatPict sets `AVFrame.repeat_pict` value. +// SetRepeatPict sets `AVFrame.repeat_pict` value. func (frame *AVFrame) SetRepeatPict(v int32) { frame.repeat_pict = (C.int)(v) } -// Custom: GetRepeatPictAddr gets `AVFrame.repeat_pict` address. +// GetRepeatPictAddr gets `AVFrame.repeat_pict` address. func (frame *AVFrame) GetRepeatPictAddr() *int32 { return (*int32)(&frame.repeat_pict) } -// Custom: GetInterlacedFrame gets `AVFrame.interlaced_frame` value. +// GetInterlacedFrame gets `AVFrame.interlaced_frame` value. func (frame *AVFrame) GetInterlacedFrame() int32 { return (int32)(frame.interlaced_frame) } -// Custom: SetInterlacedFrame sets `AVFrame.interlaced_frame` value. +// SetInterlacedFrame sets `AVFrame.interlaced_frame` value. func (frame *AVFrame) SetInterlacedFrame(v int32) { frame.interlaced_frame = (C.int)(v) } -// Custom: GetInterlacedFrameAddr gets `AVFrame.interlaced_frame` address. +// GetInterlacedFrameAddr gets `AVFrame.interlaced_frame` address. func (frame *AVFrame) GetInterlacedFrameAddr() *int32 { return (*int32)(&frame.interlaced_frame) } -// Custom: GetTopFieldFirst gets `AVFrame.top_field_first` value. +// GetTopFieldFirst gets `AVFrame.top_field_first` value. func (frame *AVFrame) GetTopFieldFirst() int32 { return (int32)(frame.top_field_first) } -// Custom: SetTopFieldFirst sets `AVFrame.top_field_first` value. +// SetTopFieldFirst sets `AVFrame.top_field_first` value. func (frame *AVFrame) SetTopFieldFirst(v int32) { frame.top_field_first = (C.int)(v) } -// Custom: GetTopFieldFirstAddr gets `AVFrame.top_field_first` address. +// GetTopFieldFirstAddr gets `AVFrame.top_field_first` address. func (frame *AVFrame) GetTopFieldFirstAddr() *int32 { return (*int32)(&frame.top_field_first) } -// Custom: GetPaletteHasChanged gets `AVFrame.palette_has_changed` value. +// GetPaletteHasChanged gets `AVFrame.palette_has_changed` value. func (frame *AVFrame) GetPaletteHasChanged() int32 { return (int32)(frame.palette_has_changed) } -// Custom: SetPaletteHasChanged sets `AVFrame.palette_has_changed` value. +// SetPaletteHasChanged sets `AVFrame.palette_has_changed` value. func (frame *AVFrame) SetPaletteHasChanged(v int32) { frame.palette_has_changed = (C.int)(v) } -// Custom: GetPaletteHasChangedAddr gets `AVFrame.palette_has_changed` address. +// GetPaletteHasChangedAddr gets `AVFrame.palette_has_changed` address. func (frame *AVFrame) GetPaletteHasChangedAddr() *int32 { return (*int32)(&frame.palette_has_changed) } -// Custom: GetReorderedOpaque gets `AVFrame.reordered_opaque` value. +// GetReorderedOpaque gets `AVFrame.reordered_opaque` value. func (frame *AVFrame) GetReorderedOpaque() int64 { return (int64)(frame.reordered_opaque) } -// Custom: SetReorderedOpaque sets `AVFrame.reordered_opaque` value. +// SetReorderedOpaque sets `AVFrame.reordered_opaque` value. func (frame *AVFrame) SetReorderedOpaque(v int64) { frame.reordered_opaque = (C.int64_t)(v) } -// Custom: GetReorderedOpaqueAddr gets `AVFrame.reordered_opaque` address. +// GetReorderedOpaqueAddr gets `AVFrame.reordered_opaque` address. func (frame *AVFrame) GetReorderedOpaqueAddr() *int64 { return (*int64)(&frame.reordered_opaque) } -// Custom: GetSampleRate gets `AVFrame.sample_rate` value. +// GetSampleRate gets `AVFrame.sample_rate` value. func (frame *AVFrame) GetSampleRate() int32 { return (int32)(frame.sample_rate) } -// Custom: SetSampleRate sets `AVFrame.sample_rate` value. +// SetSampleRate sets `AVFrame.sample_rate` value. func (frame *AVFrame) SetSampleRate(v int32) { frame.sample_rate = (C.int)(v) } -// Custom: GetSampleRateAddr gets `AVFrame.sample_rate` address. +// GetSampleRateAddr gets `AVFrame.sample_rate` address. func (frame *AVFrame) GetSampleRateAddr() *int32 { return (*int32)(&frame.sample_rate) } -// Custom: GetChannelLayout gets `AVFrame.channel_layout` value. +// GetChannelLayout gets `AVFrame.channel_layout` value. func (frame *AVFrame) GetChannelLayout() uint64 { return (uint64)(frame.channel_layout) } -// Custom: SetChannelLayout sets `AVFrame.channel_layout` value. +// SetChannelLayout sets `AVFrame.channel_layout` value. func (frame *AVFrame) SetChannelLayout(v uint64) { frame.channel_layout = (C.uint64_t)(v) } -// Custom: GetChannelLayoutAddr gets `AVFrame.channel_layout` address. +// GetChannelLayoutAddr gets `AVFrame.channel_layout` address. func (frame *AVFrame) GetChannelLayoutAddr() *uint64 { return (*uint64)(&frame.channel_layout) } -// Custom: GetBuf gets `AVFrame.buf` value. +// GetBuf gets `AVFrame.buf` value. func (frame *AVFrame) GetBuf() []*AVBufferRef { return unsafe.Slice((**AVBufferRef)(unsafe.Pointer(&frame.buf[0])), AV_NUM_DATA_POINTERS) } -// Custom: SetBuf sets `AVFrame.buf` value. +// SetBuf sets `AVFrame.buf` value. func (frame *AVFrame) SetBuf(v []*AVBufferRef) { for i := 0; i < FFMIN(len(v), AV_NUM_DATA_POINTERS); i++ { frame.buf[i] = (*C.struct_AVBufferRef)(v[i]) } } -// Custom: GetBufAddr gets `AVFrame.buf` address. +// GetBufAddr gets `AVFrame.buf` address. func (frame *AVFrame) GetBufAddr() ***AVBufferRef { return (***AVBufferRef)(unsafe.Pointer(&frame.buf)) } -// Custom: GetExtendedBuf gets `AVFrame.extended_buf` value. +// GetExtendedBuf gets `AVFrame.extended_buf` value. func (frame *AVFrame) GetExtendedBuf() []*AVBufferRef { if frame.extended_buf == nil { return nil @@ -619,32 +631,32 @@ func (frame *AVFrame) GetExtendedBuf() []*AVBufferRef { frame.nb_extended_buf) } -// Custom: SetExtendedBuf sets `AVFrame.extended_buf` value. +// SetExtendedBuf sets `AVFrame.extended_buf` value. func (frame *AVFrame) SetExtendedBuf(v **AVBufferRef) { frame.extended_buf = (**C.struct_AVBufferRef)(unsafe.Pointer(v)) } -// Custom: GetExtendedBufAddr gets `AVFrame.extended_buf` address. +// GetExtendedBufAddr gets `AVFrame.extended_buf` address. func (frame *AVFrame) GetExtendedBufAddr() ***AVBufferRef { return (***AVBufferRef)(unsafe.Pointer(&frame.extended_buf)) } -// Custom: GetNbExtendedBuf gets `AVFrame.nb_extended_buf` value. +// GetNbExtendedBuf gets `AVFrame.nb_extended_buf` value. func (frame *AVFrame) GetNbExtendedBuf() int32 { return (int32)(frame.nb_extended_buf) } -// Custom: SetNbExtendedBuf sets `AVFrame.nb_extended_buf` value. +// SetNbExtendedBuf sets `AVFrame.nb_extended_buf` value. func (frame *AVFrame) SetNbExtendedBuf(v int32) { frame.nb_extended_buf = (C.int)(v) } -// Custom: GetNbExtendedBufAddr gets `AVFrame.nb_extended_buf` address. +// GetNbExtendedBufAddr gets `AVFrame.nb_extended_buf` address. func (frame *AVFrame) GetNbExtendedBufAddr() *int32 { return (*int32)(&frame.nb_extended_buf) } -// Custom: GetSideData gets `AVFrame.side_data` value. +// GetSideData gets `AVFrame.side_data` value. func (frame *AVFrame) GetSideData() []*AVFrameSideData { if frame.side_data == nil { return nil @@ -652,27 +664,27 @@ func (frame *AVFrame) GetSideData() []*AVFrameSideData { return unsafe.Slice((**AVFrameSideData)(unsafe.Pointer(frame.side_data)), frame.nb_side_data) } -// Custom: SetSideData sets `AVFrame.side_data` value. +// SetSideData sets `AVFrame.side_data` value. func (frame *AVFrame) SetSideData(v **AVFrameSideData) { frame.side_data = (**C.struct_AVFrameSideData)(unsafe.Pointer(v)) } -// Custom: GetSideDataAddr gets `AVFrame.side_data` address. +// GetSideDataAddr gets `AVFrame.side_data` address. func (frame *AVFrame) GetSideDataAddr() ***AVFrameSideData { return (***AVFrameSideData)(unsafe.Pointer(&frame.side_data)) } -// Custom: GetNbSideData gets `AVFrame.nb_side_data` value. +// GetNbSideData gets `AVFrame.nb_side_data` value. func (frame *AVFrame) GetNbSideData() int32 { return (int32)(frame.nb_side_data) } -// Custom: SetNbSideData sets `AVFrame.nb_side_data` value. +// SetNbSideData sets `AVFrame.nb_side_data` value. func (frame *AVFrame) SetNbSideData(v int32) { frame.nb_side_data = (C.int)(v) } -// Custom: GetNbSideDataAddr gets `AVFrame.nb_side_data` address. +// GetNbSideDataAddr gets `AVFrame.nb_side_data` address. func (frame *AVFrame) GetNbSideDataAddr() *int32 { return (*int32)(&frame.nb_side_data) } @@ -682,167 +694,167 @@ const ( AV_FRAME_FLAG_DISCARD = int32(C.AV_FRAME_FLAG_DISCARD) ) -// Custom: GetFlags gets `AVFrame.flags` value. +// GetFlags gets `AVFrame.flags` value. func (frame *AVFrame) GetFlags() int32 { return (int32)(frame.flags) } -// Custom: SetFlags sets `AVFrame.flags` value. +// SetFlags sets `AVFrame.flags` value. func (frame *AVFrame) SetFlags(v int32) { frame.flags = (C.int)(v) } -// Custom: GetFlagsAddr gets `AVFrame.flags` address. +// GetFlagsAddr gets `AVFrame.flags` address. func (frame *AVFrame) GetFlagsAddr() *int32 { return (*int32)(&frame.flags) } -// Custom: GetColorRange gets `AVFrame.colorrange` value. +// GetColorRange gets `AVFrame.colorrange` value. func (frame *AVFrame) GetColorRange() AVColorRange { return (AVColorRange)(frame.color_range) } -// Custom: SetColorRange sets `AVFrame.colorrange` value. +// SetColorRange sets `AVFrame.colorrange` value. func (frame *AVFrame) SetColorRange(v AVColorRange) { frame.color_range = (C.enum_AVColorRange)(v) } -// Custom: GetColorRangeAddr gets `AVFrame.colorrange` address. +// GetColorRangeAddr gets `AVFrame.colorrange` address. func (frame *AVFrame) GetColorRangeAddr() *AVColorRange { return (*AVColorRange)(unsafe.Pointer(&frame.color_range)) } -// Custom: GetColorPrimaries gets `AVFrame.color_primaries` value. +// GetColorPrimaries gets `AVFrame.color_primaries` value. func (frame *AVFrame) GetColorPrimaries() AVColorPrimaries { return (AVColorPrimaries)(frame.color_primaries) } -// Custom: SetColorPrimaries sets `AVFrame.color_primaries` value. +// SetColorPrimaries sets `AVFrame.color_primaries` value. func (frame *AVFrame) SetColorPrimaries(v AVColorPrimaries) { frame.color_primaries = (C.enum_AVColorPrimaries)(v) } -// Custom: GetColorPrimariesAddr gets `AVFrame.color_primaries` address. +// GetColorPrimariesAddr gets `AVFrame.color_primaries` address. func (frame *AVFrame) GetColorPrimariesAddr() *AVColorPrimaries { return (*AVColorPrimaries)(unsafe.Pointer(&frame.color_primaries)) } -// Custom: GetColorTrc gets `AVFrame.color_trc` value. +// GetColorTrc gets `AVFrame.color_trc` value. func (frame *AVFrame) GetColorTrc() AVColorTransferCharacteristic { return (AVColorTransferCharacteristic)(frame.color_trc) } -// Custom: SetColorTrc sets `AVFrame.color_trc` value. +// SetColorTrc sets `AVFrame.color_trc` value. func (frame *AVFrame) SetColorTrc(v AVColorTransferCharacteristic) { frame.color_trc = (C.enum_AVColorTransferCharacteristic)(v) } -// Custom: GetColorTrcAddr gets `AVFrame.color_trc` address. +// GetColorTrcAddr gets `AVFrame.color_trc` address. func (frame *AVFrame) GetColorTrcAddr() *AVColorTransferCharacteristic { return (*AVColorTransferCharacteristic)(unsafe.Pointer(&frame.color_trc)) } -// Custom: GetColorspace gets `AVFrame.colorspace` value. +// GetColorspace gets `AVFrame.colorspace` value. func (frame *AVFrame) GetColorspace() AVColorSpace { return (AVColorSpace)(frame.colorspace) } -// Custom: SetColorspace sets `AVFrame.colorspace` value. +// SetColorspace sets `AVFrame.colorspace` value. func (frame *AVFrame) SetColorspace(v AVColorSpace) { frame.colorspace = (C.enum_AVColorSpace)(v) } -// Custom: GetColorspaceAddr gets `AVFrame.colorspace` address. +// GetColorspaceAddr gets `AVFrame.colorspace` address. func (frame *AVFrame) GetColorspaceAddr() *AVColorSpace { return (*AVColorSpace)(unsafe.Pointer(&frame.colorspace)) } -// Custom: GetChromaLocation gets `AVFrame.chroma_location` value. +// GetChromaLocation gets `AVFrame.chroma_location` value. func (frame *AVFrame) GetChromaLocation() AVChromaLocation { return (AVChromaLocation)(frame.chroma_location) } -// Custom: SetChromaLocation sets `AVFrame.chroma_location` value. +// SetChromaLocation sets `AVFrame.chroma_location` value. func (frame *AVFrame) SetChromaLocation(v AVChromaLocation) { frame.chroma_location = (C.enum_AVChromaLocation)(v) } -// Custom: GetChromaLocationAddr gets `AVFrame.chroma_location` address. +// GetChromaLocationAddr gets `AVFrame.chroma_location` address. func (frame *AVFrame) GetChromaLocationAddr() *AVChromaLocation { return (*AVChromaLocation)(unsafe.Pointer(&frame.chroma_location)) } -// Custom: GetBestEffortTimestamp gets `AVFrame.best_effort_timestamp` value. +// GetBestEffortTimestamp gets `AVFrame.best_effort_timestamp` value. func (frame *AVFrame) GetBestEffortTimestamp() int64 { return (int64)(frame.best_effort_timestamp) } -// Custom: SetBestEffortTimestamp sets `AVFrame.best_effort_timestamp` value. +// SetBestEffortTimestamp sets `AVFrame.best_effort_timestamp` value. func (frame *AVFrame) SetBestEffortTimestamp(v int64) { frame.best_effort_timestamp = (C.int64_t)(v) } -// Custom: GetBestEffortTimestampAddr gets `AVFrame.best_effort_timestamp` address. +// GetBestEffortTimestampAddr gets `AVFrame.best_effort_timestamp` address. func (frame *AVFrame) GetBestEffortTimestampAddr() *int64 { return (*int64)(&frame.best_effort_timestamp) } -// Custom: GetPktPos gets `AVFrame.pkt_pos` value. +// GetPktPos gets `AVFrame.pkt_pos` value. func (frame *AVFrame) GetPktPos() int64 { return (int64)(frame.pkt_pos) } -// Custom: SetPktPos sets `AVFrame.pkt_pos` value. +// SetPktPos sets `AVFrame.pkt_pos` value. func (frame *AVFrame) SetPktPos(v int64) { frame.pkt_pos = (C.int64_t)(v) } -// Custom: GetPktPosAddr gets `AVFrame.pkt_pos` address. +// GetPktPosAddr gets `AVFrame.pkt_pos` address. func (frame *AVFrame) GetPktPosAddr() *int64 { return (*int64)(&frame.pkt_pos) } -// Custom: GetPktDuration gets `AVFrame.pkt_duration` value. +// GetPktDuration gets `AVFrame.pkt_duration` value. func (frame *AVFrame) GetPktDuration() int64 { return (int64)(frame.pkt_duration) } -// Custom: SetPktDuration sets `AVFrame.pkt_duration` value. +// SetPktDuration sets `AVFrame.pkt_duration` value. func (frame *AVFrame) SetPktDuration(v int64) { frame.pkt_duration = (C.int64_t)(v) } -// Custom: GetPktDurationAddr gets `AVFrame.pkt_duration` address. +// GetPktDurationAddr gets `AVFrame.pkt_duration` address. func (frame *AVFrame) GetPktDurationAddr() *int64 { return (*int64)(&frame.pkt_duration) } -// Custom: GetMetadata gets `AVFrame.metadata` value. +// GetMetadata gets `AVFrame.metadata` value. func (frame *AVFrame) GetMetadata() *AVDictionary { return (*AVDictionary)(frame.metadata) } -// Custom: SetMetadata sets `AVFrame.metadata` value. +// SetMetadata sets `AVFrame.metadata` value. func (frame *AVFrame) SetMetadata(v *AVDictionary) { frame.metadata = (*C.struct_AVDictionary)(v) } -// Custom: GetMetadataAddr gets `AVFrame.metadata` address. +// GetMetadataAddr gets `AVFrame.metadata` address. func (frame *AVFrame) GetMetadataAddr() **AVDictionary { return (**AVDictionary)(unsafe.Pointer(&frame.metadata)) } -// Custom: GetDecodeErrorFlags gets `AVFrame.decode_error_flags` value. +// GetDecodeErrorFlags gets `AVFrame.decode_error_flags` value. func (frame *AVFrame) GetDecodeErrorFlags() int32 { return (int32)(frame.decode_error_flags) } -// Custom: SetDecodeErrorFlags sets `AVFrame.decode_error_flags` value. +// SetDecodeErrorFlags sets `AVFrame.decode_error_flags` value. func (frame *AVFrame) SetDecodeErrorFlags(v int32) { frame.decode_error_flags = (C.int)(v) } -// Custom: GetDecodeErrorFlagsAddr gets `AVFrame.decode_error_flags` address. +// GetDecodeErrorFlagsAddr gets `AVFrame.decode_error_flags` address. func (frame *AVFrame) GetDecodeErrorFlagsAddr() *int32 { return (*int32)(&frame.decode_error_flags) } @@ -854,319 +866,391 @@ const ( FF_DECODE_ERROR_DECODE_SLICES = int32(C.FF_DECODE_ERROR_DECODE_SLICES) ) -// Custom: GetChannels gets `AVFrame.channels` value. +// GetChannels gets `AVFrame.channels` value. func (frame *AVFrame) GetChannels() int32 { return (int32)(frame.channels) } -// Custom: SetChannels sets `AVFrame.channels` value. +// SetChannels sets `AVFrame.channels` value. func (frame *AVFrame) SetChannels(v int32) { frame.channels = (C.int)(v) } -// Custom: GetChannelsAddr gets `AVFrame.channels` address. +// GetChannelsAddr gets `AVFrame.channels` address. func (frame *AVFrame) GetChannelsAddr() *int32 { return (*int32)(&frame.channels) } -// Custom: GetPktSize gets `AVFrame.pkt_size` value. +// GetPktSize gets `AVFrame.pkt_size` value. func (frame *AVFrame) GetPktSize() int32 { return (int32)(frame.pkt_size) } -// Custom: SetPktSize sets `AVFrame.pkt_size` value. +// SetPktSize sets `AVFrame.pkt_size` value. func (frame *AVFrame) SetPktSize(v int32) { frame.pkt_size = (C.int)(v) } -// Custom: GetPktSizeAddr gets `AVFrame.pkt_size` address. +// GetPktSizeAddr gets `AVFrame.pkt_size` address. func (frame *AVFrame) GetPktSizeAddr() *int32 { return (*int32)(&frame.pkt_size) } -// Custom: GetQscaleTable gets `AVFrame.qscale_table` value. +// Deprecated: No use. +// +// GetQscaleTable gets `AVFrame.qscale_table` value. func (frame *AVFrame) GetQscaleTable() *int8 { return (*int8)(frame.qscale_table) } -// Custom: SetQscaleTable sets `AVFrame.qscale_table` value. +// Deprecated: No use. +// +// SetQscaleTable sets `AVFrame.qscale_table` value. func (frame *AVFrame) SetQscaleTable(v *int8) { frame.qscale_table = (*C.int8_t)(v) } -// Custom: GetQscaleTableAddr gets `AVFrame.qscale_table` address. +// Deprecated: No use. +// +// GetQscaleTableAddr gets `AVFrame.qscale_table` address. func (frame *AVFrame) GetQscaleTableAddr() **int8 { return (**int8)(unsafe.Pointer(&frame.qscale_table)) } -// Custom: GetQstride gets `AVFrame.qstride` value. +// Deprecated: No use. +// +// GetQstride gets `AVFrame.qstride` value. func (frame *AVFrame) GetQstride() int32 { return (int32)(frame.qstride) } -// Custom: SetQstride sets `AVFrame.qstride` value. +// Deprecated: No use. +// +// SetQstride sets `AVFrame.qstride` value. func (frame *AVFrame) SetQstride(v int32) { frame.qstride = (C.int)(v) } -// Custom: GetQstrideAddr gets `AVFrame.qstride` address. +// Deprecated: No use. +// +// GetQstrideAddr gets `AVFrame.qstride` address. func (frame *AVFrame) GetQstrideAddr() *int32 { return (*int32)(&frame.qstride) } -// Custom: GetQscaleType gets `AVFrame.qscaletype` value. +// Deprecated: No use. +// +// GetQscaleType gets `AVFrame.qscaletype` value. func (frame *AVFrame) GetQscaleType() int32 { return (int32)(frame.qscale_type) } -// Custom: SetQscaleType sets `AVFrame.qscaletype` value. +// Deprecated: No use. +// +// SetQscaleType sets `AVFrame.qscaletype` value. func (frame *AVFrame) SetQscaleType(v int32) { frame.qscale_type = (C.int)(v) } -// Custom: GetQscaleTypeAddr gets `AVFrame.qscaletype` address. +// Deprecated: No use. +// +// GetQscaleTypeAddr gets `AVFrame.qscaletype` address. func (frame *AVFrame) GetQscaleTypeAddr() *int32 { return (*int32)(&frame.qscale_type) } -// Custom: GetQpTableBuf gets `AVFrame.qp_table_buf` value. +// Deprecated: No use. +// +// GetQpTableBuf gets `AVFrame.qp_table_buf` value. func (frame *AVFrame) GetQpTableBuf() *AVBufferRef { return (*AVBufferRef)(frame.qp_table_buf) } -// Custom: SetQpTableBuf sets `AVFrame.qp_table_buf` value. +// Deprecated: No use. +// +// SetQpTableBuf sets `AVFrame.qp_table_buf` value. func (frame *AVFrame) SetQpTableBuf(v *AVBufferRef) { frame.qp_table_buf = (*C.struct_AVBufferRef)(v) } -// Custom: GetQpTableBufAddr gets `AVFrame.qp_table_buf` address. +// Deprecated: No use. +// +// GetQpTableBufAddr gets `AVFrame.qp_table_buf` address. func (frame *AVFrame) GetQpTableBufAddr() **AVBufferRef { return (**AVBufferRef)(unsafe.Pointer(&frame.qp_table_buf)) } -// Custom: GetHwFramesCtx gets `AVFrame.hw_frames_ctx` value. +// GetHwFramesCtx gets `AVFrame.hw_frames_ctx` value. func (frame *AVFrame) GetHwFramesCtx() *AVBufferRef { return (*AVBufferRef)(frame.hw_frames_ctx) } -// Custom: SetHwFramesCtx sets `AVFrame.hw_frames_ctx` value. +// SetHwFramesCtx sets `AVFrame.hw_frames_ctx` value. func (frame *AVFrame) SetHwFramesCtx(v *AVBufferRef) { frame.hw_frames_ctx = (*C.struct_AVBufferRef)(v) } -// Custom: GetHwFramesCtxAddr gets `AVFrame.hw_frames_ctx` address. +// GetHwFramesCtxAddr gets `AVFrame.hw_frames_ctx` address. func (frame *AVFrame) GetHwFramesCtxAddr() **AVBufferRef { return (**AVBufferRef)(unsafe.Pointer(&frame.hw_frames_ctx)) } -// Custom: GetOpaqueRef gets `AVFrame.opaque_ref` value. +// GetOpaqueRef gets `AVFrame.opaque_ref` value. func (frame *AVFrame) GetOpaqueRef() *AVBufferRef { return (*AVBufferRef)(frame.opaque_ref) } -// Custom: SetOpaqueRef sets `AVFrame.opaque_ref` value. +// SetOpaqueRef sets `AVFrame.opaque_ref` value. func (frame *AVFrame) SetOpaqueRef(v *AVBufferRef) { frame.opaque_ref = (*C.AVBufferRef)(v) } -// Custom: GetOpaqueRefAddr gets `AVFrame.opaque_ref` address. +// GetOpaqueRefAddr gets `AVFrame.opaque_ref` address. func (frame *AVFrame) GetOpaqueRefAddr() **AVBufferRef { return (**AVBufferRef)(unsafe.Pointer(&frame.opaque_ref)) } -// Custom: GetCropTop gets `AVFrame.crop_top` value. +// GetCropTop gets `AVFrame.crop_top` value. func (frame *AVFrame) GetCropTop() uintptr { return (uintptr)(frame.crop_top) } -// Custom: SetCropTop sets `AVFrame.crop_top` value. +// SetCropTop sets `AVFrame.crop_top` value. func (frame *AVFrame) SetCropTop(v uintptr) { frame.crop_top = (C.size_t)(v) } -// Custom: GetCropTopAddr gets `AVFrame.crop_top` address. +// GetCropTopAddr gets `AVFrame.crop_top` address. func (frame *AVFrame) GetCropTopAddr() *uintptr { return (*uintptr)(unsafe.Pointer(&frame.crop_top)) } -// Custom: GetCropBottom gets `AVFrame.crop_bottom` value. +// GetCropBottom gets `AVFrame.crop_bottom` value. func (frame *AVFrame) GetCropBottom() uintptr { return (uintptr)(frame.crop_bottom) } -// Custom: SetCropBottom sets `AVFrame.crop_bottom` value. +// SetCropBottom sets `AVFrame.crop_bottom` value. func (frame *AVFrame) SetCropBottom(v uintptr) { frame.crop_bottom = (C.size_t)(v) } -// Custom: GetCropBottomAddr gets `AVFrame.crop_bottom` address. +// GetCropBottomAddr gets `AVFrame.crop_bottom` address. func (frame *AVFrame) GetCropBottomAddr() *uintptr { return (*uintptr)(unsafe.Pointer(&frame.crop_bottom)) } -// Custom: GetCropLeft gets `AVFrame.crop_left` value. +// GetCropLeft gets `AVFrame.crop_left` value. func (frame *AVFrame) GetCropLeft() uintptr { return (uintptr)(frame.crop_left) } -// Custom: SetCropLeft sets `AVFrame.crop_left` value. +// SetCropLeft sets `AVFrame.crop_left` value. func (frame *AVFrame) SetCropLeft(v uintptr) { frame.crop_left = (C.size_t)(v) } -// Custom: GetCropLeftAddr gets `AVFrame.crop_left` address. +// GetCropLeftAddr gets `AVFrame.crop_left` address. func (frame *AVFrame) GetCropLeftAddr() *uintptr { return (*uintptr)(unsafe.Pointer(&frame.crop_left)) } -// Custom: GetCropRight gets `AVFrame.crop_right` value. +// GetCropRight gets `AVFrame.crop_right` value. func (frame *AVFrame) GetCropRight() uintptr { return (uintptr)(frame.crop_right) } -// Custom: SetCropRight sets `AVFrame.crop_right` value. +// SetCropRight sets `AVFrame.crop_right` value. func (frame *AVFrame) SetCropRight(v uintptr) { frame.crop_right = (C.size_t)(v) } -// Custom: GetCropRightAddr gets `AVFrame.crop_right` address. +// GetCropRightAddr gets `AVFrame.crop_right` address. func (frame *AVFrame) GetCropRightAddr() *uintptr { return (*uintptr)(unsafe.Pointer(&frame.crop_right)) } -// Custom: GetPrivateRef gets `AVFrame.private_ref` value. +// GetPrivateRef gets `AVFrame.private_ref` value. func (frame *AVFrame) GetPrivateRef() *AVBufferRef { return (*AVBufferRef)(frame.private_ref) } -// Custom: SetPrivateRef sets `AVFrame.private_ref` value. +// SetPrivateRef sets `AVFrame.private_ref` value. func (frame *AVFrame) SetPrivateRef(v *AVBufferRef) { frame.private_ref = (*C.struct_AVBufferRef)(v) } -// Custom: GetPrivateRefAddr gets `AVFrame.private_ref` address. +// GetPrivateRefAddr gets `AVFrame.private_ref` address. func (frame *AVFrame) GetPrivateRefAddr() **AVBufferRef { return (**AVBufferRef)(unsafe.Pointer(&frame.private_ref)) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFrameGetBestEffortTimestamp func AvFrameGetBestEffortTimestamp(frame *AVFrame) int64 { return (int64)(C.av_frame_get_best_effort_timestamp((*C.struct_AVFrame)(frame))) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFrameSetBestEffortTimestamp func AvFrameSetBestEffortTimestamp(frame *AVFrame, val int64) { C.av_frame_set_best_effort_timestamp((*C.struct_AVFrame)(frame), (C.int64_t)(val)) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFrameGetPktDuration func AvFrameGetPktDuration(frame *AVFrame) int64 { return (int64)(C.av_frame_get_pkt_duration((*C.struct_AVFrame)(frame))) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFrameSetPktDuration func AvFrameSetPktDuration(frame *AVFrame, val int64) { C.av_frame_set_pkt_duration((*C.struct_AVFrame)(frame), (C.int64_t)(val)) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFrameGetPktPos func AvFrameGetPktPos(frame *AVFrame) int64 { return (int64)(C.av_frame_get_pkt_pos((*C.struct_AVFrame)(frame))) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFrameSetPktPos func AvFrameSetPktPos(frame *AVFrame, val int64) { C.av_frame_set_pkt_pos((*C.struct_AVFrame)(frame), (C.int64_t)(val)) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFrameGetChannelLayout func AvFrameGetChannelLayout(frame *AVFrame) int64 { return (int64)(C.av_frame_get_channel_layout((*C.struct_AVFrame)(frame))) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFrameSetChannelLayout func AvFrameSetChannelLayout(frame *AVFrame, val int64) { C.av_frame_set_channel_layout((*C.struct_AVFrame)(frame), (C.int64_t)(val)) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFrameGetChannels func AvFrameGetChannels(frame *AVFrame) int32 { return (int32)(C.av_frame_get_channels((*C.struct_AVFrame)(frame))) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFrameSetChannels func AvFrameSetChannels(frame *AVFrame, val int32) { C.av_frame_set_channels((*C.struct_AVFrame)(frame), (C.int)(val)) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFrameGetSampleRate func AvFrameGetSampleRate(frame *AVFrame) int32 { return (int32)(C.av_frame_get_sample_rate((*C.struct_AVFrame)(frame))) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFrameSetSampleRate func AvFrameSetSampleRate(frame *AVFrame, val int32) { C.av_frame_set_sample_rate((*C.struct_AVFrame)(frame), (C.int)(val)) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFrameGetMetadata func AvFrameGetMetadata(frame *AVFrame) *AVDictionary { return (*AVDictionary)(C.av_frame_get_metadata((*C.struct_AVFrame)(frame))) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFrameSetMetadata func AvFrameSetMetadata(frame *AVFrame, val *AVDictionary) { C.av_frame_set_metadata((*C.struct_AVFrame)(frame), (*C.struct_AVDictionary)(val)) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFrameGetDecodeErrorFlags func AvFrameGetDecodeErrorFlags(frame *AVFrame) int32 { return (int32)(C.av_frame_get_decode_error_flags((*C.struct_AVFrame)(frame))) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFrameSetDecodeErrorFlags func AvFrameSetDecodeErrorFlags(frame *AVFrame, val int32) { C.av_frame_set_decode_error_flags((*C.struct_AVFrame)(frame), (C.int)(val)) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFrameGetPktSize func AvFrameGetPktSize(frame *AVFrame) int32 { return (int32)(C.av_frame_get_pkt_size((*C.struct_AVFrame)(frame))) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFrameSetPktSize func AvFrameSetPktSize(frame *AVFrame, val int32) { C.av_frame_set_pkt_size((*C.struct_AVFrame)(frame), (C.int)(val)) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFrameGetQpTable func AvFrameGetQpTable(frame *AVFrame, stride, _type *int32) *int8 { return (*int8)(C.av_frame_get_qp_table((*C.struct_AVFrame)(frame), (*C.int)(stride), (*C.int)(_type))) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFrameSetQpTable func AvFrameSetQpTable(frame *AVFrame, buf *AVBufferRef, stride, _type int32) int32 { return (int32)(C.av_frame_set_qp_table((*C.struct_AVFrame)(frame), (*C.struct_AVBufferRef)(buf), (C.int)(stride), (C.int)(_type))) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFrameGetColorspace func AvFrameGetColorspace(frame *AVFrame) AVColorSpace { return (AVColorSpace)(C.av_frame_get_colorspace((*C.struct_AVFrame)(frame))) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFrameSetColorspace func AvFrameSetColorspace(frame *AVFrame, val AVColorSpace) { C.av_frame_set_colorspace((*C.struct_AVFrame)(frame), (C.enum_AVColorSpace)(val)) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFrameGetColorRange func AvFrameGetColorRange(frame *AVFrame) AVColorRange { return (AVColorRange)(C.av_frame_get_color_range((*C.struct_AVFrame)(frame))) } -// Deprecated: No use +// Deprecated: No use. +// +// AvFrameSetColorRange func AvFrameSetColorRange(frame *AVFrame, val AVColorRange) { C.av_frame_set_color_range((*C.struct_AVFrame)(frame), (C.enum_AVColorRange)(val)) } diff --git a/avutil_hdr_dynamic_metadata.go b/avutil_hdr_dynamic_metadata.go index ff56aa2..914a198 100644 --- a/avutil_hdr_dynamic_metadata.go +++ b/avutil_hdr_dynamic_metadata.go @@ -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)) } diff --git a/avutil_hwcontext.go b/avutil_hwcontext.go index 539c34d..124c76f 100644 --- a/avutil_hwcontext.go +++ b/avutil_hwcontext.go @@ -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) } diff --git a/avutil_log.go b/avutil_log.go index ca64600..2215fde 100644 --- a/avutil_log.go +++ b/avutil_log.go @@ -3,6 +3,12 @@ package ffmpeg /* #include +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 diff --git a/avutil_macros.go b/avutil_macros.go index d9997a8..77cf3e5 100644 --- a/avutil_macros.go +++ b/avutil_macros.go @@ -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) } diff --git a/avutil_mastering_display_metadata.go b/avutil_mastering_display_metadata.go index 16c0d0b..319252e 100644 --- a/avutil_mastering_display_metadata.go +++ b/avutil_mastering_display_metadata.go @@ -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) } diff --git a/avutil_mem.go b/avutil_mem.go index 2d76909..a503a13 100644 --- a/avutil_mem.go +++ b/avutil_mem.go @@ -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)) } diff --git a/avutil_motion_vector.go b/avutil_motion_vector.go index bf6d1b4..d41a8ed 100644 --- a/avutil_motion_vector.go +++ b/avutil_motion_vector.go @@ -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) } diff --git a/avutil_opt.go b/avutil_opt.go index a3af823..7f5e3da 100644 --- a/avutil_opt.go +++ b/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 diff --git a/avutil_pixdesc.go b/avutil_pixdesc.go index 69a0791..a991c36 100644 --- a/avutil_pixdesc.go +++ b/avutil_pixdesc.go @@ -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) } diff --git a/avutil_rational.go b/avutil_rational.go index b8d823e..e4d9d3d 100644 --- a/avutil_rational.go +++ b/avutil_rational.go @@ -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) } diff --git a/avutil_replaygain.go b/avutil_replaygain.go index a4470c5..f733d02 100644 --- a/avutil_replaygain.go +++ b/avutil_replaygain.go @@ -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) } diff --git a/avutil_spherical.go b/avutil_spherical.go index 3589578..c6cf290 100644 --- a/avutil_spherical.go +++ b/avutil_spherical.go @@ -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) } diff --git a/avutil_stereo3d.go b/avutil_stereo3d.go index 004f6d3..96d6675 100644 --- a/avutil_stereo3d.go +++ b/avutil_stereo3d.go @@ -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) } diff --git a/avutil_threadmessage.go b/avutil_threadmessage.go index c7871d6..778df7c 100644 --- a/avutil_threadmessage.go +++ b/avutil_threadmessage.go @@ -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))) } diff --git a/avutil_timecode.go b/avutil_timecode.go index c7975f5..312e3c9 100644 --- a/avutil_timecode.go +++ b/avutil_timecode.go @@ -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) } diff --git a/avutil_timestamp.go b/avutil_timestamp.go index 8e3182f..25d7d5d 100644 --- a/avutil_timestamp.go +++ b/avutil_timestamp.go @@ -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) } diff --git a/avutil_tx.go b/avutil_tx.go index 4ce0f4d..4e489d6 100644 --- a/avutil_tx.go +++ b/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) } diff --git a/avutil_video_enc_params.go b/avutil_video_enc_params.go index 8e28b41..e85acaa 100644 --- a/avutil_video_enc_params.go +++ b/avutil_video_enc_params.go @@ -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) } diff --git a/avutil_xtea.go b/avutil_xtea.go index cc1996e..07bf1a1 100644 --- a/avutil_xtea.go +++ b/avutil_xtea.go @@ -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)) } diff --git a/examples/demuxing-decoding/main.go b/examples/demuxing-decoding/main.go index 7905807..296ed92 100644 --- a/examples/demuxing-decoding/main.go +++ b/examples/demuxing-decoding/main.go @@ -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)) + } } diff --git a/examples/filtering-audio/main.go b/examples/filtering-audio/main.go index 7905807..74b165d 100644 --- a/examples/filtering-audio/main.go +++ b/examples/filtering-audio/main.go @@ -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) } diff --git a/examples/filtering-video/main.go b/examples/filtering-video/main.go index 7905807..9bcc459 100644 --- a/examples/filtering-video/main.go +++ b/examples/filtering-video/main.go @@ -1,5 +1,273 @@ package main -func main() { +/* +#include +#include +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) } diff --git a/ffmpeg_helper.go b/ffmpeg_helper.go index 3584005..ffbddd7 100644 --- a/ffmpeg_helper.go +++ b/ffmpeg_helper.go @@ -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 = "\\''\\" // 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 } diff --git a/swscale.go b/swscale.go index fdf0bf7..05ddc05 100644 --- a/swscale.go +++ b/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))