[FFmpeg-devel] [PATCH] avcodec: add properties for lossless to AVCodecParameters

James Almer jamrial at gmail.com
Mon May 16 04:43:12 CEST 2016


On 5/8/2016 12:18 PM, Hendrik Leppkes wrote:
> On Sun, May 8, 2016 at 12:10 PM, Michael Niedermayer
> <michael at niedermayer.cc> wrote:
>> Fixes Ticket5467
>>
>> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
>> ---
>>  libavcodec/avcodec.h |    4 ++++
>>  libavcodec/utils.c   |    2 ++
>>  2 files changed, 6 insertions(+)
>>
>> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
>> index 3813a0a..1db2e0f 100644
>> --- a/libavcodec/avcodec.h
>> +++ b/libavcodec/avcodec.h
>> @@ -4050,6 +4050,10 @@ typedef struct AVCodecParameters {
>>       * Audio only. Number of samples to skip after a discontinuity.
>>       */
>>      int seek_preroll;
>> +
>> +    /** Properties, like FF_CODEC_PROPERTY_LOSSLESS.
>> +     */
>> +    int properties;
>>  } AVCodecParameters;
>>
> 
> There properties are not part of any container we support and therefor
> not really fitting into this structure.
> 
> - Hendrik

Guess i'm late to the party, but we support the DTS-HD container and it has a
field that reports if the stream is lossless or not.
See http://atsc.org/wp-content/uploads/2015/03/Non-Real-Time-Content-Delivery.pdf
section E.2.8 and table E.12, Bitw_Aupres_Metadata field.

For that matter I'll submit a patch soon to read some fields from this header to
get stream duration and bitrate since libavformat currently reports neither.
Assuming this properties field is added to AVCodecParameters it could be used to
report the losslessness of the stream as well.


More information about the ffmpeg-devel mailing list