av_find_best_stream

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 related_stream try to find a stream related (eg. in the same program) to this one, or -1 if none @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.

extern (C) @nogc nothrow
int
av_find_best_stream

Meta