Skip to content

Commit 69c3404

Browse files
committed
Remove unused C defs
1 parent 5e9cc00 commit 69c3404

1 file changed

Lines changed: 46 additions & 86 deletions

File tree

include/libavcodec/avcodec.pxd

Lines changed: 46 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -257,84 +257,63 @@ cdef extern from "libavcodec/avcodec.h" nogil:
257257
AVClass *av_class
258258

259259
AVMediaType codec_type
260-
char codec_name[32]
261-
unsigned int codec_tag
260+
AVCodec *codec
262261
AVCodecID codec_id
263-
264-
int flags
265-
int flags2
266-
int thread_count
267-
int thread_type
268-
269-
int profile
270-
AVDiscard skip_frame
271-
272-
AVFrame* coded_frame
262+
unsigned int codec_tag
273263

274264
void* opaque
275265

276266
int bit_rate
277-
int bit_rate_tolerance
278-
int mb_decision
279-
280-
int bits_per_coded_sample
281-
int global_quality
282-
int compression_level
283-
284-
int qmin
285-
int qmax
286-
int rc_max_rate
287-
int rc_min_rate
288-
int rc_buffer_size
289-
float rc_max_available_vbv_use
290-
float rc_min_vbv_overflow_use
291-
292-
AVRational framerate
293-
AVRational pkt_timebase
294-
AVRational time_base
295-
296-
int extradata_size
267+
int flags
268+
int flags2
297269
uint8_t *extradata
298-
299-
# Subtitle header (ASS/SSA format for text subtitles)
300-
uint8_t *subtitle_header
301-
int subtitle_header_size
302-
270+
int extradata_size
271+
AVRational time_base
272+
AVRational pkt_timebase
273+
AVRational framerate
303274
int delay
304-
305-
AVCodec *codec
306-
307-
# Video.
308275
int width
309276
int height
310277
int coded_width
311278
int coded_height
312-
279+
AVRational sample_aspect_ratio
313280
AVPixelFormat pix_fmt
314281
AVPixelFormat sw_pix_fmt
315-
AVRational sample_aspect_ratio
316-
int gop_size # The number of pictures in a group of pictures, or 0 for intra_only.
317-
int max_b_frames
318-
int has_b_frames
319-
AVColorRange color_range
320282
AVColorPrimaries color_primaries
321283
AVColorTransferCharacteristic color_trc
322284
AVColorSpace colorspace
285+
AVColorRange color_range
323286

324-
# Audio.
325-
AVSampleFormat sample_fmt
287+
int has_b_frames
288+
AVPixelFormat (*get_format)(AVCodecContext *s, const AVPixelFormat *fmt)
289+
int max_b_frames
290+
int mb_decision
291+
int gop_size
326292
int sample_rate
293+
AVSampleFormat sample_fmt
327294
AVChannelLayout ch_layout
328295
int frame_size
329296

330-
#: .. todo:: ``get_buffer`` is deprecated for get_buffer2 in newer versions of FFmpeg.
331-
int get_buffer(AVCodecContext *ctx, AVFrame *frame)
332-
void release_buffer(AVCodecContext *ctx, AVFrame *frame)
297+
int bit_rate_tolerance
298+
int global_quality
299+
int compression_level
300+
int qmin
301+
int qmax
302+
int rc_buffer_size
303+
int rc_max_rate
304+
int rc_min_rate
333305

334-
# Hardware acceleration
335306
AVHWAccel *hwaccel
336307
AVBufferRef *hw_device_ctx
337-
AVPixelFormat (*get_format)(AVCodecContext *s, const AVPixelFormat *fmt)
308+
309+
int thread_count
310+
int thread_type
311+
int bits_per_coded_sample
312+
int profile
313+
AVDiscard skip_frame
314+
315+
int subtitle_header_size
316+
uint8_t *subtitle_header
338317

339318

340319
cdef AVCodecContext* avcodec_alloc_context3(AVCodec *codec)
@@ -355,8 +334,6 @@ cdef extern from "libavcodec/avcodec.h" nogil:
355334

356335
cdef char* avcodec_get_name(AVCodecID id)
357336

358-
cdef char* av_get_profile_name(AVCodec *codec, int profile)
359-
360337
cdef int avcodec_open2(
361338
AVCodecContext *ctx,
362339
AVCodec *codec,
@@ -446,56 +423,48 @@ cdef extern from "libavcodec/avcodec.h" nogil:
446423
uint8_t *data[4]
447424
int linesize[4]
448425
uint8_t **extended_data
449-
450-
int format # Should be AVPixelFormat or AVSampleFormat
451-
AVPictureType pict_type
452-
453426
int width
454427
int height
455-
456-
int nb_side_data
457-
AVFrameSideData **side_data
458-
459428
int nb_samples
460-
int sample_rate
461-
462-
AVChannelLayout ch_layout
429+
int format # -1 if unknown, AVPixelFormat or AVSampleFormat
430+
AVPictureType pict_type
463431

464432
int64_t pts
465433
int64_t pkt_dts
466-
467-
int pkt_size
468-
469-
uint8_t **base
470434
void *opaque
471-
AVBufferRef *opaque_ref
472-
AVDictionary *metadata
435+
int sample_rate
436+
int nb_side_data
437+
AVFrameSideData **side_data
473438
int flags
474-
int decode_error_flags
475439
AVColorRange color_range
476440
AVColorPrimaries color_primaries
477441
AVColorTransferCharacteristic color_trc
478442
AVColorSpace colorspace
479443

444+
AVDictionary *metadata
445+
int decode_error_flags
446+
447+
AVBufferRef *opaque_ref
448+
AVChannelLayout ch_layout
480449
int64_t duration
481450

482451
cdef AVFrame* avcodec_alloc_frame()
483452

484453
cdef struct AVPacket:
454+
void *buf # ptr[AVBufferRef]
485455
int64_t pts
486456
int64_t dts
487457
uint8_t *data
488-
AVRational time_base
489458
int size
490459
int stream_index
491460
int flags
492461
AVPacketSideData *side_data
493462
int side_data_elems
494-
int duration
463+
int64_t duration
495464
int64_t pos
496465
void *opaque
497466
AVBufferRef *opaque_ref
498-
467+
AVRational time_base
499468

500469
cdef int avcodec_fill_audio_frame(
501470
AVFrame *frame,
@@ -556,15 +525,8 @@ cdef extern from "libavcodec/avcodec.h" nogil:
556525
)
557526

558527
cdef void avsubtitle_free(AVSubtitle*)
559-
560-
cdef void avcodec_get_frame_defaults(AVFrame* frame)
561-
562528
cdef void avcodec_flush_buffers(AVCodecContext *ctx)
563529

564-
# TODO: avcodec_default_get_buffer is deprecated for avcodec_default_get_buffer2 in newer versions of FFmpeg
565-
cdef int avcodec_default_get_buffer(AVCodecContext *ctx, AVFrame *frame)
566-
cdef void avcodec_default_release_buffer(AVCodecContext *ctx, AVFrame *frame)
567-
568530
# === New-style Transcoding
569531
cdef int avcodec_send_packet(AVCodecContext *avctx, AVPacket *packet)
570532
cdef int avcodec_receive_frame(AVCodecContext *avctx, AVFrame *frame)
@@ -576,8 +538,6 @@ cdef extern from "libavcodec/avcodec.h" nogil:
576538
cdef struct AVCodecParser:
577539
int codec_ids[5]
578540

579-
cdef AVCodecParser* av_parser_next(AVCodecParser *c)
580-
581541
cdef struct AVCodecParserContext:
582542
pass
583543

0 commit comments

Comments
 (0)