Commit 304641fd authored by Wim Taymans's avatar Wim Taymans

ext/ffmpeg/: Use codecid as extra parameter when getting caps.

Original commit message from CVS:
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
parent 421a02db
2007-01-09 Wim Taymans <wim@fluendo.com>
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_get_palette),
(gst_ffmpeg_set_palette), (gst_ff_vid_caps_new),
(gst_ff_aud_caps_new), (gst_ffmpeg_codecid_to_caps),
(gst_ffmpeg_pixfmt_to_caps), (gst_ffmpeg_smpfmt_to_caps),
(gst_ffmpeg_codectype_to_caps), (gst_ffmpeg_caps_to_pixfmt),
(gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_formatid_to_caps),
(gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_caps_to_codecid),
(gst_ffmpeg_init_pix_fmt_info), (gst_ffmpeg_avpicture_fill),
(gst_ffmpeg_img_convert):
* ext/ffmpeg/gstffmpegcodecmap.h:
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_getcaps),
(gst_ffmpegenc_register):
Use codecid as extra parameter when getting caps.
Restrict H263 caps to allowed sizes for better negotiation.
MP4/3gp can contain AMR-WB as well.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_register):
Indent.
2007-01-09 Wim Taymans <wim@fluendo.com>
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_open),
......
This diff is collapsed.
......@@ -44,7 +44,8 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
GstCaps *
gst_ffmpeg_codectype_to_caps (enum CodecType codec_type,
AVCodecContext *context);
AVCodecContext *context,
enum CodecID codec_id);
/*
* caps_to_codecid () transforms a GstCaps that belongs to
......
......@@ -1430,42 +1430,40 @@ gst_ffmpegdemux_register (GstPlugin * plugin)
!strcmp (in_plugin->name, "wav") ||
!strcmp (in_plugin->name, "au") ||
!strcmp (in_plugin->name, "tta") ||
!strcmp (in_plugin->name, "rm") ||
!strcmp (in_plugin->name, "amr"))
!strcmp (in_plugin->name, "rm") || !strcmp (in_plugin->name, "amr"))
register_typefind_func = FALSE;
/* Set the rank of demuxers know to work to MARGINAL.
* Set demuxers for which we already have another implementation to NONE
* Set All others to NONE*/
if (!strcmp (in_plugin->name, "flv") ||
!strcmp (in_plugin->name, "wsvqa") ||
!strcmp (in_plugin->name, "wsaud") ||
!strcmp (in_plugin->name, "wc3movie") ||
!strcmp (in_plugin->name, "voc") ||
!strcmp (in_plugin->name, "tta") ||
!strcmp (in_plugin->name, "swf") ||
!strcmp (in_plugin->name, "sol") ||
!strcmp (in_plugin->name, "smk") ||
!strcmp (in_plugin->name, "vmd") ||
!strcmp (in_plugin->name, "film_cpk") ||
!strcmp (in_plugin->name, "ingenient") ||
!strcmp (in_plugin->name, "psxstr") ||
!strcmp (in_plugin->name, "nuv") ||
!strcmp (in_plugin->name, "nut") ||
!strcmp (in_plugin->name, "nsv") ||
!strcmp (in_plugin->name, "mxf") ||
!strcmp (in_plugin->name, "mmf") ||
!strcmp (in_plugin->name, "mm") ||
!strcmp (in_plugin->name, "ipmovie") ||
!strcmp (in_plugin->name, "RoQ") ||
!strcmp (in_plugin->name, "idcin") ||
!strcmp (in_plugin->name, "gxf") ||
!strcmp (in_plugin->name, "ffm") ||
!strcmp (in_plugin->name, "ea") ||
!strcmp (in_plugin->name, "daud") ||
!strcmp (in_plugin->name, "avs") ||
!strcmp (in_plugin->name, "aiff") ||
!strcmp (in_plugin->name, "4xm"))
!strcmp (in_plugin->name, "wsvqa") ||
!strcmp (in_plugin->name, "wsaud") ||
!strcmp (in_plugin->name, "wc3movie") ||
!strcmp (in_plugin->name, "voc") ||
!strcmp (in_plugin->name, "tta") ||
!strcmp (in_plugin->name, "swf") ||
!strcmp (in_plugin->name, "sol") ||
!strcmp (in_plugin->name, "smk") ||
!strcmp (in_plugin->name, "vmd") ||
!strcmp (in_plugin->name, "film_cpk") ||
!strcmp (in_plugin->name, "ingenient") ||
!strcmp (in_plugin->name, "psxstr") ||
!strcmp (in_plugin->name, "nuv") ||
!strcmp (in_plugin->name, "nut") ||
!strcmp (in_plugin->name, "nsv") ||
!strcmp (in_plugin->name, "mxf") ||
!strcmp (in_plugin->name, "mmf") ||
!strcmp (in_plugin->name, "mm") ||
!strcmp (in_plugin->name, "ipmovie") ||
!strcmp (in_plugin->name, "RoQ") ||
!strcmp (in_plugin->name, "idcin") ||
!strcmp (in_plugin->name, "gxf") ||
!strcmp (in_plugin->name, "ffm") ||
!strcmp (in_plugin->name, "ea") ||
!strcmp (in_plugin->name, "daud") ||
!strcmp (in_plugin->name, "avs") ||
!strcmp (in_plugin->name, "aiff") || !strcmp (in_plugin->name, "4xm"))
rank = GST_RANK_MARGINAL;
else
rank = GST_RANK_NONE;
......
......@@ -332,7 +332,8 @@ gst_ffmpegenc_getcaps (GstPad * pad)
ctx->width = -1;
if (!caps)
caps = gst_caps_new_empty ();
tmpcaps = gst_ffmpeg_codectype_to_caps (oclass->in_plugin->type, ctx);
tmpcaps = gst_ffmpeg_codectype_to_caps (oclass->in_plugin->type, ctx,
oclass->in_plugin->id);
if (tmpcaps)
gst_caps_append (caps, tmpcaps);
else
......@@ -959,11 +960,11 @@ gst_ffmpegenc_register (GstPlugin * plugin)
/* 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
sinkcaps = gst_caps_from_string
("video/x-raw-rgb; video/x-raw-yuv; video/x-raw-gray");
} else {
sinkcaps = gst_ffmpeg_codectype_to_caps (in_plugin->type, NULL);
sinkcaps =
gst_ffmpeg_codectype_to_caps (in_plugin->type, NULL, in_plugin->id);
}
if (!sinkcaps || !srccaps)
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