Commit 1df167a9 authored by Edward Hervey's avatar Edward Hervey 🤘

ext/ffmpeg/: FFMpeg now provides proper long_name for AVCodec, remove our...

ext/ffmpeg/: FFMpeg now provides proper long_name for AVCodec, remove our internal mapping and directly use upstream ...

Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_get_codecid_longname):
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_base_init),
(gst_ffmpegdec_register):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_base_init),
(gst_ffmpegenc_register):
* ext/ffmpeg/gstffmpegmux.c: (gst_ffmpegmux_register):
FFMpeg now provides proper long_name for AVCodec, remove our
internal mapping and directly use upstream naming.
Improve debugging messages.
Remove g_warning() which isn't really needed.
parent 63d2aa24
2008-06-13 Edward Hervey <edward.hervey@collabora.co.uk>
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_get_codecid_longname):
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_base_init),
(gst_ffmpegdec_register):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_base_init),
(gst_ffmpegenc_register):
* ext/ffmpeg/gstffmpegmux.c: (gst_ffmpegmux_register):
FFMpeg now provides proper long_name for AVCodec, remove our
internal mapping and directly use upstream naming.
Improve debugging messages.
Remove g_warning() which isn't really needed.
2008-06-13 Edward Hervey <edward.hervey@collabora.co.uk>
* ext/ffmpeg/Makefile.am:
......
This diff is collapsed.
......@@ -244,7 +244,7 @@ gst_ffmpegdec_base_init (GstFFMpegDecClass * klass)
/* construct the element details struct */
details.longname = g_strdup_printf ("FFMPEG %s decoder",
gst_ffmpeg_get_codecid_longname (params->in_plugin->id));
params->in_plugin->long_name);
details.klass = g_strdup_printf ("Codec/Decoder/%s",
(params->in_plugin->type == CODEC_TYPE_VIDEO) ? "Video" : "Audio");
details.description = g_strdup_printf ("FFMPEG %s decoder",
......@@ -2445,6 +2445,9 @@ gst_ffmpegdec_register (GstPlugin * plugin)
goto next;
}
GST_DEBUG ("Trying plugin %s [%s]", in_plugin->name,
in_plugin->long_name);
/* no codecs for which we're GUARANTEED to have better alternatives */
/* MPEG1VIDEO : the mpeg2video decoder is preferred */
/* MP2 : Use MP3 for decoding */
......@@ -2459,17 +2462,11 @@ gst_ffmpegdec_register (GstPlugin * plugin)
goto next;
}
/* name */
if (!gst_ffmpeg_get_codecid_longname (in_plugin->id)) {
GST_WARNING ("Add a longname mapping for decoder %s (%d) please",
in_plugin->name, in_plugin->id);
goto next;
}
/* first make sure we've got a supported type */
sinkcaps = gst_ffmpeg_codecid_to_caps (in_plugin->id, NULL, FALSE);
if (!sinkcaps) {
GST_WARNING ("Couldn't get input caps for decoder '%s'", in_plugin->name);
GST_WARNING ("Couldn't get sink caps for decoder '%s'", in_plugin->name);
goto next;
}
if (in_plugin->type == CODEC_TYPE_VIDEO) {
srccaps = gst_caps_from_string ("video/x-raw-rgb; video/x-raw-yuv");
......@@ -2477,8 +2474,8 @@ gst_ffmpegdec_register (GstPlugin * plugin)
srccaps =
gst_ffmpeg_codectype_to_caps (in_plugin->type, NULL, in_plugin->id);
}
if (!sinkcaps || !srccaps) {
GST_WARNING ("Couldn't get source or sink caps for decoder %s",
if (!srccaps) {
GST_WARNING ("Couldn't get source caps for decoder %s",
in_plugin->name);
goto next;
}
......
......@@ -132,7 +132,7 @@ gst_ffmpegenc_base_init (GstFFMpegEncClass * klass)
/* construct the element details struct */
details.longname = g_strdup_printf ("FFMPEG %s encoder",
gst_ffmpeg_get_codecid_longname (params->in_plugin->id));
params->in_plugin->long_name);
details.klass = g_strdup_printf ("Codec/Encoder/%s",
(params->in_plugin->type == CODEC_TYPE_VIDEO) ? "Video" : "Audio");
details.description = g_strdup_printf ("FFMPEG %s encoder",
......@@ -983,6 +983,9 @@ gst_ffmpegenc_register (GstPlugin * plugin)
goto next;
}
GST_DEBUG ("Trying plugin %s [%s]", in_plugin->name,
in_plugin->long_name);
/* no codecs for which we're GUARANTEED to have better alternatives */
if (!strcmp (in_plugin->name, "vorbis") ||
!strcmp (in_plugin->name, "gif") || !strcmp (in_plugin->name, "flac")) {
......@@ -990,15 +993,12 @@ gst_ffmpegenc_register (GstPlugin * plugin)
goto next;
}
/* name */
if (!gst_ffmpeg_get_codecid_longname (in_plugin->id)) {
GST_WARNING ("Add a longname mapping for encoder %s (%d) please",
in_plugin->name, in_plugin->id);
/* first make sure we've got a supported type */
if (!(srccaps = gst_ffmpeg_codecid_to_caps (in_plugin->id, NULL, TRUE))) {
GST_WARNING ("Couldn't get source caps for encoder %s", in_plugin->name);
goto next;
}
/* first make sure we've got a supported type */
srccaps = gst_ffmpeg_codecid_to_caps (in_plugin->id, NULL, TRUE);
if (in_plugin->type == CODEC_TYPE_VIDEO) {
sinkcaps = gst_caps_from_string
("video/x-raw-rgb; video/x-raw-yuv; video/x-raw-gray");
......@@ -1006,8 +1006,8 @@ gst_ffmpegenc_register (GstPlugin * plugin)
sinkcaps =
gst_ffmpeg_codectype_to_caps (in_plugin->type, NULL, in_plugin->id);
}
if (!sinkcaps || !srccaps) {
GST_WARNING ("Couldn't get either source/sink caps for encoder %s",
if (!sinkcaps) {
GST_WARNING ("Couldn't get sink caps for encoder %s",
in_plugin->name);
goto next;
}
......
......@@ -716,7 +716,7 @@ gst_ffmpegmux_register (GstPlugin * plugin)
&video_ids, &audio_ids)) {
gst_caps_unref (srccaps);
GST_WARNING
("Couldn't get sink caps for muxer %s, mapping maybe missing ?",
("Couldn't get sink caps for muxer %s. Most likely because no input format mapping exists.",
in_plugin->name);
goto next;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment