@@ -327,7 +327,7 @@ cdef extern from "libavcodec/avcodec.h" nogil:
327327 AVChannelLayout ch_layout
328328 int frame_size
329329
330- # : .. todo: : ``get_buffer`` is deprecated for get_buffer2 in newer versions of FFmpeg.
330+ # TODO : ``get_buffer`` is deprecated for get_buffer2 in newer versions of FFmpeg.
331331 int get_buffer(AVCodecContext * ctx, AVFrame * frame)
332332 void release_buffer(AVCodecContext * ctx, AVFrame * frame)
333333
@@ -446,56 +446,48 @@ cdef extern from "libavcodec/avcodec.h" nogil:
446446 uint8_t * data[4 ]
447447 int linesize[4 ]
448448 uint8_t ** extended_data
449-
450- int format # Should be AVPixelFormat or AVSampleFormat
451- AVPictureType pict_type
452-
453449 int width
454450 int height
455-
456- int nb_side_data
457- AVFrameSideData ** side_data
458-
459451 int nb_samples
460- int sample_rate
461-
462- AVChannelLayout ch_layout
452+ int format # -1 if unknown, AVPixelFormat or AVSampleFormat
453+ AVPictureType pict_type
463454
464455 int64_t pts
465456 int64_t pkt_dts
466-
467- int pkt_size
468-
469- uint8_t ** base
470457 void * opaque
471- AVBufferRef * opaque_ref
472- AVDictionary * metadata
458+ int sample_rate
459+ int nb_side_data
460+ AVFrameSideData ** side_data
473461 int flags
474- int decode_error_flags
475462 AVColorRange color_range
476463 AVColorPrimaries color_primaries
477464 AVColorTransferCharacteristic color_trc
478465 AVColorSpace colorspace
479466
467+ AVDictionary * metadata
468+ int decode_error_flags
469+
470+ AVBufferRef * opaque_ref
471+ AVChannelLayout ch_layout
480472 int64_t duration
481473
482474 cdef AVFrame* avcodec_alloc_frame()
483475
484476 cdef struct AVPacket:
477+ void * buf # ptr[AVBufferRef]
485478 int64_t pts
486479 int64_t dts
487480 uint8_t * data
488- AVRational time_base
489481 int size
490482 int stream_index
491483 int flags
492484 AVPacketSideData * side_data
493485 int side_data_elems
494- int duration
486+ int64_t duration
495487 int64_t pos
496488 void * opaque
497489 AVBufferRef * opaque_ref
498-
490+ AVRational time_base
499491
500492 cdef int avcodec_fill_audio_frame(
501493 AVFrame * frame,
@@ -556,15 +548,8 @@ cdef extern from "libavcodec/avcodec.h" nogil:
556548 )
557549
558550 cdef void avsubtitle_free(AVSubtitle* )
559-
560- cdef void avcodec_get_frame_defaults(AVFrame* frame)
561-
562551 cdef void avcodec_flush_buffers(AVCodecContext * ctx)
563552
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-
568553 # === New-style Transcoding
569554 cdef int avcodec_send_packet(AVCodecContext * avctx, AVPacket * packet)
570555 cdef int avcodec_receive_frame(AVCodecContext * avctx, AVFrame * frame)
@@ -576,8 +561,6 @@ cdef extern from "libavcodec/avcodec.h" nogil:
576561 cdef struct AVCodecParser:
577562 int codec_ids[5 ]
578563
579- cdef AVCodecParser* av_parser_next(AVCodecParser * c)
580-
581564 cdef struct AVCodecParserContext:
582565 pass
583566
0 commit comments