From f5b18c7ba1717c12e7804d42b124fa859516e748 Mon Sep 17 00:00:00 2001 From: WyattBlue Date: Fri, 23 Jan 2026 14:51:30 -0500 Subject: [PATCH] Remove various unused bindings --- include/libavcodec/avcodec.pxd | 15 --------------- include/libavcodec/hwaccel.pxd | 8 +------- include/libavfilter/avfiltergraph.pxd | 13 ------------- include/libavfilter/buffersink.pxd | 6 +----- include/libavformat/avformat.pxd | 19 ------------------- include/libavutil/frame.pxd | 7 ------- include/libavutil/samplefmt.pxd | 27 --------------------------- include/libswscale/swscale.pxd | 13 ------------- 8 files changed, 2 insertions(+), 106 deletions(-) diff --git a/include/libavcodec/avcodec.pxd b/include/libavcodec/avcodec.pxd index 11cff34a1..d74906b98 100644 --- a/include/libavcodec/avcodec.pxd +++ b/include/libavcodec/avcodec.pxd @@ -1,9 +1,5 @@ from libc.stdint cimport int64_t, uint16_t, uint32_t, uint8_t -cdef extern from "libavcodec/codec.h": - struct AVCodecTag: - pass - cdef extern from "libavcodec/packet.h" nogil: const AVPacketSideData *av_packet_side_data_get(const AVPacketSideData *sd, int nb_sd, @@ -430,8 +426,6 @@ cdef extern from "libavcodec/avcodec.h" nogil: AVChannelLayout ch_layout int64_t duration - cdef AVFrame* avcodec_alloc_frame() - cdef struct AVPacket: void *buf # ptr[AVBufferRef] int64_t pts @@ -457,8 +451,6 @@ cdef extern from "libavcodec/avcodec.h" nogil: int align ) - cdef void avcodec_free_frame(AVFrame **frame) - cdef AVPacket* av_packet_alloc() cdef void av_packet_free(AVPacket **) cdef int av_new_packet(AVPacket*, int) @@ -532,13 +524,6 @@ cdef extern from "libavcodec/avcodec.h" nogil: int64_t pts, int64_t dts, int64_t pos ) - cdef int av_parser_change( - AVCodecParserContext *s, - AVCodecContext *avctx, - uint8_t **poutbuf, int *poutbuf_size, - const uint8_t *buf, int buf_size, - int keyframe - ) cdef void av_parser_close(AVCodecParserContext *s) cdef struct AVCodecParameters: diff --git a/include/libavcodec/hwaccel.pxd b/include/libavcodec/hwaccel.pxd index cb9ac41b6..2023efd64 100644 --- a/include/libavcodec/hwaccel.pxd +++ b/include/libavcodec/hwaccel.pxd @@ -9,11 +9,5 @@ cdef extern from "libavcodec/avcodec.h" nogil: int methods AVHWDeviceType device_type cdef const AVCodecHWConfig* avcodec_get_hw_config(const AVCodec *codec, int index) - cdef enum: - AV_HWACCEL_CODEC_CAP_EXPERIMENTAL cdef struct AVHWAccel: - char *name - AVMediaType type - AVCodecID id - AVPixelFormat pix_fmt - int capabilities + pass diff --git a/include/libavfilter/avfiltergraph.pxd b/include/libavfilter/avfiltergraph.pxd index b773063f9..f27dcbbcc 100644 --- a/include/libavfilter/avfiltergraph.pxd +++ b/include/libavfilter/avfiltergraph.pxd @@ -1,6 +1,4 @@ - cdef extern from "libavfilter/avfilter.h" nogil: - cdef struct AVFilterGraph: int nb_filters AVFilterContext **filters @@ -14,13 +12,6 @@ cdef extern from "libavfilter/avfilter.h" nogil: cdef AVFilterGraph* avfilter_graph_alloc() cdef void avfilter_graph_free(AVFilterGraph **ptr) - cdef int avfilter_graph_parse2( - AVFilterGraph *graph, - const char *filter_str, - AVFilterInOut **inputs, - AVFilterInOut **outputs - ) - cdef AVFilterContext* avfilter_graph_alloc_filter( AVFilterGraph *graph, const AVFilter *filter, @@ -44,7 +35,3 @@ cdef extern from "libavfilter/avfilter.h" nogil: ) cdef int avfilter_graph_config(AVFilterGraph *graph, void *logctx) - - cdef char* avfilter_graph_dump(AVFilterGraph *graph, const char *options) - - cdef void avfilter_inout_free(AVFilterInOut **inout_list) diff --git a/include/libavfilter/buffersink.pxd b/include/libavfilter/buffersink.pxd index 84ea56c68..ef843cb7a 100644 --- a/include/libavfilter/buffersink.pxd +++ b/include/libavfilter/buffersink.pxd @@ -1,6 +1,2 @@ cdef extern from "libavfilter/buffersink.h" nogil: - - int av_buffersink_get_frame( - AVFilterContext *ctx, - AVFrame *frame - ) + int av_buffersink_get_frame(AVFilterContext *ctx, AVFrame *frame) diff --git a/include/libavformat/avformat.pxd b/include/libavformat/avformat.pxd index 3a2218f06..c2e549533 100644 --- a/include/libavformat/avformat.pxd +++ b/include/libavformat/avformat.pxd @@ -93,16 +93,6 @@ cdef extern from "libavformat/avformat.h" nogil: # const AVCodecTag* const *codec_tag const AVClass *priv_class - cdef struct AVProbeData: - unsigned char *buf - int buf_size - const char *filename - - cdef AVInputFormat* av_probe_input_format( - AVProbeData *pd, - int is_opened - ) - # http://ffmpeg.org/doxygen/trunk/structAVOutputFormat.html cdef struct AVOutputFormat: const char *name @@ -153,15 +143,6 @@ cdef extern from "libavformat/avformat.h" nogil: AVFMT_FLAG_FAST_SEEK AVFMT_FLAG_AUTO_BSF - cdef int av_probe_input_buffer( - AVIOContext *pb, - AVInputFormat **fmt, - const char *filename, - void *logctx, - unsigned int offset, - unsigned int max_probe_size - ) - cdef int av_find_best_stream( AVFormatContext *ic, AVMediaType type, diff --git a/include/libavutil/frame.pxd b/include/libavutil/frame.pxd index aa8dc3a00..c7f60e93c 100644 --- a/include/libavutil/frame.pxd +++ b/include/libavutil/frame.pxd @@ -1,14 +1,7 @@ cdef extern from "libavutil/frame.h" nogil: - cdef AVFrame* av_frame_alloc() cdef void av_frame_free(AVFrame**) - cdef int av_frame_ref(AVFrame *dst, const AVFrame *src) - cdef AVFrame* av_frame_clone(const AVFrame *src) cdef void av_frame_unref(AVFrame *frame) - cdef void av_frame_move_ref(AVFrame *dst, AVFrame *src) - cdef int av_frame_get_buffer(AVFrame *frame, int align) - cdef int av_frame_is_writable(AVFrame *frame) cdef int av_frame_make_writable(AVFrame *frame) - cdef int av_frame_copy(AVFrame *dst, const AVFrame *src) cdef int av_frame_copy_props(AVFrame *dst, const AVFrame *src) cdef AVFrameSideData* av_frame_get_side_data(AVFrame *frame, AVFrameSideDataType type) diff --git a/include/libavutil/samplefmt.pxd b/include/libavutil/samplefmt.pxd index a26c6ecfd..c70272936 100644 --- a/include/libavutil/samplefmt.pxd +++ b/include/libavutil/samplefmt.pxd @@ -26,15 +26,6 @@ cdef extern from "libavutil/samplefmt.h" nogil: cdef AVSampleFormat av_get_packed_sample_fmt(AVSampleFormat sample_fmt) cdef AVSampleFormat av_get_planar_sample_fmt(AVSampleFormat sample_fmt) - cdef int av_samples_alloc( - uint8_t** audio_data, - int* linesize, - int nb_channels, - int nb_samples, - AVSampleFormat sample_fmt, - int align - ) - cdef int av_samples_get_buffer_size( int *linesize, int nb_channels, @@ -42,21 +33,3 @@ cdef extern from "libavutil/samplefmt.h" nogil: AVSampleFormat sample_fmt, int align ) - - cdef int av_samples_fill_arrays( - uint8_t **audio_data, - int *linesize, - const uint8_t *buf, - int nb_channels, - int nb_samples, - AVSampleFormat sample_fmt, - int align - ) - - cdef int av_samples_set_silence( - uint8_t **audio_data, - int offset, - int nb_samples, - int nb_channels, - AVSampleFormat sample_fmt - ) diff --git a/include/libswscale/swscale.pxd b/include/libswscale/swscale.pxd index a9698ecb3..2d855d95a 100644 --- a/include/libswscale/swscale.pxd +++ b/include/libswscale/swscale.pxd @@ -34,19 +34,6 @@ cdef extern from "libswscale/swscale.h" nogil: cdef int SWS_CS_SMPTE240M cdef int SWS_CS_DEFAULT - cdef SwsContext* sws_getContext( - int src_width, - int src_height, - AVPixelFormat src_format, - int dst_width, - int dst_height, - AVPixelFormat dst_format, - int flags, - SwsFilter *src_filter, - SwsFilter *dst_filter, - double *param, - ) - cdef int sws_scale( SwsContext *ctx, const unsigned char *const *src_slice,