[FFmpeg-devel] [PATCH] Pass VBV delay to the calling application via ctx

Måns Rullgård mans
Fri Feb 11 15:28:34 CET 2011


Michael Niedermayer <michaelni at gmx.at> writes:

> On Thu, Feb 10, 2011 at 04:38:03PM +0100, Christophe Massiot wrote:
>> VBV delay is useful for T-STD compliance in some TS muxers. It is
>> certainly possible to retrieve it by parsing the output of FFmpeg, but
>> getting it from the context makes it simpler and less error-prone.
>> 
>> This version exports a uint64_t based on the periods of a 27 MHz clock.
>> ---
>>  doc/APIchanges             |    3 +++
>>  libavcodec/avcodec.h       |    7 +++++++
>>  libavcodec/mpegvideo_enc.c |    1 +
>>  3 files changed, 11 insertions(+), 0 deletions(-)
>> 
>> diff --git a/doc/APIchanges b/doc/APIchanges
>> index e7cd1c1..7a4957c 100644
>> --- a/doc/APIchanges
>> +++ b/doc/APIchanges
>> @@ -13,6 +13,9 @@ libavutil:   2009-03-08
>>  
>>  API changes, most recent first:
>>  
>> +2011-02-10 - xxxxxxx - lavc 52.110.0 - vbv_delay
>> +  Add vbv_delay field to AVCodecContext
>> +
>>  2011-02-08 - xxxxxxx - lavf 52.98.0 - av_probe_input_buffer
>>    Add av_probe_input_buffer() to avformat.h for probing format from a
>>    ByteIOContext.
>> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
>> index 09f0a12..5b33427 100644
>> --- a/libavcodec/avcodec.h
>> +++ b/libavcodec/avcodec.h
>> @@ -2845,6 +2845,13 @@ typedef struct AVCodecContext {
>>      int64_t pts_correction_last_pts;       /// PTS of the last frame
>>      int64_t pts_correction_last_dts;       /// DTS of the last frame
>>  
>> +    /**
>> +     * VBV delay coded in the last frame (in periods of a 27 MHz clock).
>> +     * Used for compliant TS muxing.
>> +     * - encoding: Set by libavcodec.
>> +     * - decoding: unused.
>> +     */
>> +    uint64_t vbv_delay;
>>  } AVCodecContext;
>
> This is missing an entry in libavcodec/options.c

Setting it manually doesn't make sense.

-- 
M?ns Rullg?rd
mans at mansr.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110211/7422e76f/attachment.pgp>



More information about the ffmpeg-devel mailing list