[FFmpeg-devel] [PATCH] Add protocol documentation on RTSP

Martin Storsjö martin
Mon Oct 4 09:09:58 CEST 2010


On Sun, 3 Oct 2010, Stefano Sabatini wrote:

> I double checked the doxy, and still can't understand what's the
> meaning of AVStream.discard.
> 
> From AVStream.discard doxy:
>     enum AVDiscard discard; ///< Selects which packets can be discarded at will and do not need to be demuxed.
> 
> From avcodec.h doxy:
> enum AVDiscard{
>     /* We leave some space between them for extensions (drop some
>      * keyframes for intra-only or drop just some bidir frames). */
>     AVDISCARD_NONE   =-16, ///< discard nothing
>     AVDISCARD_DEFAULT=  0, ///< discard useless packets like 0 size packets in avi
>     AVDISCARD_NONREF =  8, ///< discard all non reference
>     AVDISCARD_BIDIR  = 16, ///< discard all bidirectional frames
>     AVDISCARD_NONKEY = 32, ///< discard all frames except keyframes
>     AVDISCARD_ALL    = 48, ///< discard all
> };
> 
> So AVStream.discard seems to control which packets should be
> discarded, rather than to select the stream to playback, and still I
> have no idea how/if it is possible to set it via commandline.
> 
> So maybe, the sentence:
> the streams to receive are chosen according to the @var{discard} field in AVStream
> 
> should be replaced by
> the packets to discard are chosen according to the @var{discard} field in AVStream
> 
> That is, I can understand that it is possible to select one stream
> with a particular bitrate from a multi-bitrate streams set, but I
> still cannot understand what's the role of "discard" in this game.
> 
> If this is something related to options only settable programmatically
> I suppose we can simply "discard" them in the docs (but mentioning it
> in a more explicit way would be nicer).

Yes, this option is settable only programmatically - the -ast and -vst 
options change this field, but aren't mapped straight. (As others tried to 
explain - discard is set to "all" on all streams except for the ones 
chosen, where it is set to "none".) I left out that sentence from the docs 
for now.

> Rest of the patch looks good to me, regards.

Ok, applied.

// Martin



More information about the ffmpeg-devel mailing list