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

Michael Niedermayer michael at niedermayer.cc
Mon May 9 19:05:20 CEST 2016

On Mon, May 09, 2016 at 01:44:54PM +0100, Derek Buitenhuis wrote:
> On 5/9/2016 1:29 PM, Michael Niedermayer wrote:
> > Also theres a deeper problem,
> > User want, benefit from and sometimes need, "every single piece of
> > information a decoder might output.", well not "every" of course
> > but its hard to draw lines what may be needed and what not.
> They can decode a frame like the rest of us. This does not belong
> in a demuxing library IMO.

The problem (or rather one problem, there might be more) that this
is about is a user application selecting which stream to play
like users might prefer higher quality streams or lossless streams

For width/height/sample rate the information is straight available
for quality a user app has to setup a array of packet buffers decode
frames until the quality parameter is filled in
and have logic to detect containers and codecs which do never fill it
thresholds to stop, also to recover from error conditions liek EOF and
still be able to play a stream which at the same time maybe isnt
and on top of that user apps would have to do that even though
libavformat does exactly the same already to fill other information
in cases where it is needed

basically in the past user apps had the full set of information
available to select which stream to present to the user or to present
the user with a list of choices.
after codec par
user apps only have a subset of this information available and if they
want more they need to more or less reimplement av_find_stream_info()

Its that reimplementation need that really feels wrong to me.
There should be some API in some lib that does this so not every app
needs to reimplement it for obtaining information like losslessness

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I know you won't believe me, but the highest form of Human Excellence is
to question oneself and others. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160509/d8adb8e7/attachment.sig>

More information about the ffmpeg-devel mailing list