[FFmpeg-devel] [PATCH] av_find_best_stream
Michael Niedermayer
michaelni
Thu Dec 23 16:25:03 CET 2010
On Wed, Dec 22, 2010 at 06:45:01PM +0100, Nicolas George wrote:
[...]
> diff --git a/libavformat/avformat.h b/libavformat/avformat.h
> index 3079b38..e4895fe 100644
> --- a/libavformat/avformat.h
> +++ b/libavformat/avformat.h
> @@ -1140,6 +1140,34 @@ AVFormatContext *avformat_alloc_context(void);
> int av_find_stream_info(AVFormatContext *ic);
>
> /**
> + * Find the "best" stream in the file.
> + * The best stream is determined according to various heuristics as the most
> + * likely to be what the user expects.
> + * If the decoder parameter is non-NULL, av_find_best_stream will find the
> + * default decoder for the stream's codec; streams for which no decoder can
> + * be found are ignored.
> + *
> + * @param ic media file handle
> + * @param type stream type: video, audio, subtitles, etc.
> + * @param wanted_stream_nb user-requested stream number,
> + * or -1 for automatic selection
> + * @param decoder_ret if non-NULL, returns the decoder for the
> + * selected stream
> + * @param flags flags; none are currently defined
> + * @return the non-negative stream number in case of success,
> + * AVERROR_STREAM_NOT_FOUND if no stream with the requested type
> + * could be found,
> + * AVERROR_DECODER_NOT_FOUND if streams were found but no decoder
> + * @note If av_find_best_stream returns successfully and decoder_ret is not
> + * NULL, then *decoder_ret is guaranteed to be set to a valid AVCodec.
> + */
> +int av_find_best_stream(AVFormatContext *ic,
> + enum AVMediaType type,
> + int user,
> + AVCodec **decoder_ret,
> + int flags);
This API doesnt work because we want streams from the same program not a video
stream from one channel and a audio stream from another.
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The real ebay dictionary, page 3
"Rare item" - "Common item with rare defect or maybe just a lie"
"Professional" - "'Toy' made in china, not functional except as doorstop"
"Experts will know" - "The seller hopes you are not an expert"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101223/6fada30d/attachment.pgp>
More information about the ffmpeg-devel
mailing list