};
GType type;
AVCodec *in_plugin;
+ void *i = 0;
gint rank;
- in_plugin = av_codec_next (NULL);
-
GST_LOG ("Registering decoders");
- while (in_plugin) {
+ while ((in_plugin = (AVCodec *) av_codec_iterate (&i))) {
gchar *type_name;
/* only decoders */
if (!av_codec_is_decoder (in_plugin)
|| in_plugin->type != AVMEDIA_TYPE_AUDIO) {
- goto next;
+ continue;
}
/* no quasi codecs, please */
#else
in_plugin->id <= AV_CODEC_ID_PCM_S16BE_PLANAR)) {
#endif
- goto next;
+ continue;
}
/* No decoders depending on external libraries (we don't build them, but
GST_DEBUG
("Not using external library decoder %s. Use the gstreamer-native ones instead.",
in_plugin->name);
- goto next;
+ continue;
}
GST_DEBUG ("Trying plugin %s [%s]", in_plugin->name, in_plugin->long_name);
!strcmp (in_plugin->name, "dvdsub") ||
!strcmp (in_plugin->name, "dvbsub")) {
GST_LOG ("Ignoring decoder %s", in_plugin->name);
- goto next;
+ continue;
}
/* construct the type */
}
g_free (type_name);
-
- next:
- in_plugin = av_codec_next (in_plugin);
}
GST_LOG ("Finished Registering decoders");
};
GType type;
AVCodec *in_plugin;
+ void *i = 0;
GST_LOG ("Registering encoders");
- in_plugin = av_codec_next (NULL);
- while (in_plugin) {
+ while ((in_plugin = (AVCodec *) av_codec_iterate (&i))) {
gchar *type_name;
guint rank;
/* Skip non-AV codecs */
if (in_plugin->type != AVMEDIA_TYPE_AUDIO)
- goto next;
+ continue;
/* no quasi codecs, please */
if (in_plugin->id == AV_CODEC_ID_PCM_S16LE_PLANAR ||
#else
in_plugin->id <= AV_CODEC_ID_PCM_S16BE_PLANAR)) {
#endif
- goto next;
+ continue;
}
/* No encoders depending on external libraries (we don't build them, but
GST_DEBUG
("Not using external library encoder %s. Use the gstreamer-native ones instead.",
in_plugin->name);
- goto next;
+ continue;
}
/* only encoders */
if (!av_codec_is_encoder (in_plugin)) {
- goto next;
+ continue;
}
/* FIXME : We should have a method to know cheaply whether we have a mapping
if (!strcmp (in_plugin->name, "vorbis")
|| !strcmp (in_plugin->name, "flac")) {
GST_LOG ("Ignoring encoder %s", in_plugin->name);
- goto next;
+ continue;
}
/* construct the type */
}
g_free (type_name);
-
- next:
- in_plugin = av_codec_next (in_plugin);
}
GST_LOG ("Finished registering encoders");
GType type;
AVCodec *in_plugin;
gint rank;
-
- in_plugin = av_codec_next (NULL);
+ void *i = 0;
GST_LOG ("Registering decoders");
- while (in_plugin) {
+ while ((in_plugin = (AVCodec *) av_codec_iterate (&i))) {
gchar *type_name;
gchar *plugin_name;
/* only video decoders */
if (!av_codec_is_decoder (in_plugin)
|| in_plugin->type != AVMEDIA_TYPE_VIDEO)
- goto next;
+ continue;
/* no quasi codecs, please */
if (in_plugin->id == AV_CODEC_ID_RAWVIDEO ||
|| in_plugin->id == AV_CODEC_ID_WRAPPED_AVFRAME
#endif
|| in_plugin->id == AV_CODEC_ID_ZLIB) {
- goto next;
+ continue;
}
/* No decoders depending on external libraries (we don't build them, but
GST_DEBUG
("Not using external library decoder %s. Use the gstreamer-native ones instead.",
in_plugin->name);
- goto next;
+ continue;
}
/* No vdpau plugins until we can figure out how to properly use them
GST_DEBUG
("Ignoring VDPAU decoder %s. We can't handle this outside of ffmpeg",
in_plugin->name);
- goto next;
+ continue;
}
if (g_str_has_suffix (in_plugin->name, "_xvmc")) {
GST_DEBUG
("Ignoring XVMC decoder %s. We can't handle this outside of ffmpeg",
in_plugin->name);
- goto next;
+ continue;
}
if (strstr (in_plugin->name, "vaapi")) {
GST_DEBUG
("Ignoring VAAPI decoder %s. We can't handle this outside of ffmpeg",
in_plugin->name);
- goto next;
+ continue;
}
if (g_str_has_suffix (in_plugin->name, "_qsv")) {
GST_DEBUG
("Ignoring qsv decoder %s. We can't handle this outside of ffmpeg",
in_plugin->name);
- goto next;
+ continue;
}
if (g_str_has_suffix (in_plugin->name, "_cuvid")) {
GST_DEBUG
("Ignoring CUVID decoder %s. We can't handle this outside of ffmpeg",
in_plugin->name);
- goto next;
+ continue;
}
if (g_str_has_suffix (in_plugin->name, "_v4l2m2m")) {
GST_DEBUG
("Ignoring V4L2 mem-to-mem decoder %s. We can't handle this outside of ffmpeg",
in_plugin->name);
- goto next;
+ continue;
}
GST_DEBUG ("Trying plugin %s [%s]", in_plugin->name, in_plugin->long_name);
!strcmp (in_plugin->name, "dvdsub") ||
!strcmp (in_plugin->name, "dvbsub")) {
GST_LOG ("Ignoring decoder %s", in_plugin->name);
- goto next;
+ continue;
}
/* construct the type */
}
g_free (type_name);
-
- next:
- in_plugin = av_codec_next (in_plugin);
}
GST_LOG ("Finished Registering decoders");
};
GType type;
AVCodec *in_plugin;
+ void *i = 0;
GST_LOG ("Registering encoders");
/* build global ffmpeg param/property info */
gst_ffmpeg_cfg_init ();
- in_plugin = av_codec_next (NULL);
- while (in_plugin) {
+ while ((in_plugin = (AVCodec *) av_codec_iterate (&i))) {
gchar *type_name;
/* Skip non-AV codecs */
if (in_plugin->type != AVMEDIA_TYPE_VIDEO)
- goto next;
+ continue;
/* no quasi codecs, please */
if (in_plugin->id == AV_CODEC_ID_RAWVIDEO ||
|| in_plugin->id == AV_CODEC_ID_WRAPPED_AVFRAME
#endif
|| in_plugin->id == AV_CODEC_ID_ZLIB) {
- goto next;
+ continue;
}
/* No encoders depending on external libraries (we don't build them, but
GST_DEBUG
("Not using external library encoder %s. Use the gstreamer-native ones instead.",
in_plugin->name);
- goto next;
+ continue;
}
if (strstr (in_plugin->name, "vaapi")) {
GST_DEBUG
("Ignoring VAAPI encoder %s. We can't handle this outside of ffmpeg",
in_plugin->name);
- goto next;
+ continue;
}
if (strstr (in_plugin->name, "nvenc")) {
GST_DEBUG
("Ignoring nvenc encoder %s. We can't handle this outside of ffmpeg",
in_plugin->name);
- goto next;
+ continue;
}
if (g_str_has_suffix (in_plugin->name, "_qsv")) {
GST_DEBUG
("Ignoring qsv encoder %s. We can't handle this outside of ffmpeg",
in_plugin->name);
- goto next;
+ continue;
}
if (g_str_has_suffix (in_plugin->name, "_v4l2m2m")) {
GST_DEBUG
("Ignoring V4L2 mem-to-mem encoder %s. We can't handle this outside of ffmpeg",
in_plugin->name);
- goto next;
+ continue;
}
/* only video encoders */
if (!av_codec_is_encoder (in_plugin)
|| in_plugin->type != AVMEDIA_TYPE_VIDEO)
- goto next;
+ continue;
/* FIXME : We should have a method to know cheaply whether we have a mapping
* for the given plugin or not */
/* no codecs for which we're GUARANTEED to have better alternatives */
if (!strcmp (in_plugin->name, "gif")) {
GST_LOG ("Ignoring encoder %s", in_plugin->name);
- goto next;
+ continue;
}
/* construct the type */
}
g_free (type_name);
-
- next:
- in_plugin = av_codec_next (in_plugin);
}
GST_LOG ("Finished registering encoders");