<font size=2 face="sans-serif">The problem with </font><tt><font size=2>av_codec_get_tag</font></tt><font size=2 face="sans-serif">
is, that it returns 0 if failed and also 0 in case of AV_CODEC_RAWVIDEO.</font>
<br><font size=2 face="sans-serif">What I want is a generic solution to
get a list of supported codecs for an arbitrary muxer.</font>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">Von:      
 </font><font size=1 face="sans-serif">wm4 <nfxjfg@googlemail.com></font>
<br><font size=1 color=#5f5f5f face="sans-serif">An:      
 </font><font size=1 face="sans-serif">libav-user@ffmpeg.org,
</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Datum:      
 </font><font size=1 face="sans-serif">26.05.2015 11:46</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Betreff:    
   </font><font size=1 face="sans-serif">Re: [Libav-user]
enumerating codec_tags</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Gesendet von:    
   </font><font size=1 face="sans-serif">libav-user-bounces@ffmpeg.org</font>
<br>
<hr noshade>
<br>
<br>
<br><tt><font size=2>On Fri, 22 May 2015 07:58:43 +0200<br>
Steffen.Roeber@hella.com wrote:<br>
<br>
> Hi,<br>
> is there any way to iterate through all codec_tags of an AVOutputFormat
<br>
> without using the private header internal.h? I need that header because
<br>
> AVCodecTag is there.<br>
> Currently I'm trying something like:<br>
> auto enumFormat = av_guess_format(nullptr, qPrintable(extension),
nullptr<br>
> );<br>
> for (uint32 i = 0; enumFormat->codec_tag && enumFormat->codec_tag[i];
++i)<br>
>         {<br>
>           auto tag = enumFormat->codec_tag[i];<br>
> <br>
>           while (tag->id != AV_CODEC_ID_NONE)<br>
>           {<br>
>             encoder = avcodec_find_encoder(tag->id);<br>
> <br>
>             if (encoder && encoder->type
== AVMEDIA_TYPE_VIDEO && <br>
> av_codec_is_encoder(encoder))<br>
>             {<br>
> //...<br>
>             }<br>
> <br>
>             ++tag;<br>
>           }<br>
>         }<br>
> What I need, are all codec that are supported by a AVOutputFormat.<br>
> <br>
> Kind regards<br>
> Steffen<br>
<br>
While AVCodecTag is private, you could probably check presence of<br>
support via av_codec_get_tag() and enumerating all codecs ffmpeg knows.<br>
(Roundabout, but might work.)<br>
_______________________________________________<br>
Libav-user mailing list<br>
Libav-user@ffmpeg.org<br>
</font></tt><a href="http://ffmpeg.org/mailman/listinfo/libav-user"><tt><font size=2>http://ffmpeg.org/mailman/listinfo/libav-user</font></tt></a><tt><font size=2><br>
</font></tt>
<br>