use correct caps

Original commit message from CVS:
use correct caps
This commit is contained in:
Benjamin Otte 2003-11-25 23:45:41 +00:00
parent dddf7c2b3e
commit 47e31d379f
2 changed files with 24 additions and 17 deletions

View file

@ -220,6 +220,8 @@ fill_info (GdkPixbufFormat *info)
{ "RIFF AVI ", " xxxx ", 100 },
/* MPEG 1 */
{ "xx\001\272", "zz ", 100 },
/* MPEG 2 */
{ "xx\001\263", "zz ", 100 },
/* Quicktime */
{ " wide", "xxxx ", 80 },
{ " moov", "xxxx ", 80 },
@ -227,6 +229,8 @@ fill_info (GdkPixbufFormat *info)
{ " pnot", "xxxx ", 80 },
{ " PICT", "xxxx ", 80 },
{ " free", "xxxx ", 80 },
/* ASF */
{ "\060\046\262\165\216\146\317\021\246\331 \252 \142\316\154", " z z ", 100 },
{ NULL, NULL, 0 }
};
@ -234,6 +238,7 @@ fill_info (GdkPixbufFormat *info)
"video/avi", "video/x-avi", "video/x-msvideo",
"video/mpeg",
"video/quicktime",
"video/x-ms-asf",
NULL
};
@ -241,6 +246,7 @@ fill_info (GdkPixbufFormat *info)
"avi",
"mpeg", "mpe", "mpg",
"mov",
"asf", "wmv",
NULL
};

View file

@ -235,17 +235,22 @@ static gboolean
gst_gdk_animation_iter_create_pipeline (GstGdkAnimationIter *iter)
{
GstElement *src, *typefind, *autoplugger, *sink, *colorspace;
GstCaps *caps = GST_CAPS_NEW ("pixbuf_filter",
GstCaps *caps = GST_CAPS_NEW ("pixbuf_filter32",
"video/x-raw-rgb",
"endianness", GST_PROPS_INT (G_BIG_ENDIAN),
"bpp", GST_PROPS_LIST (
GST_PROPS_INT (32),
GST_PROPS_INT (24)
),
"red_mask", GST_PROPS_INT (0x00FF0000),
"green_mask", GST_PROPS_INT (0x0000FF00),
"blue_mask", GST_PROPS_INT (0x000000FF)
"bpp", GST_PROPS_INT (32),
"red_mask", GST_PROPS_INT (0xFF000000),
"green_mask", GST_PROPS_INT (0x00FF0000),
"blue_mask", GST_PROPS_INT (0x0000FF00)
);
gst_caps_append (caps, GST_CAPS_NEW ("pixbuf_filter24",
"video/x-raw-rgb",
"endianness", GST_PROPS_INT (G_BIG_ENDIAN),
"bpp", GST_PROPS_INT (24),
"red_mask", GST_PROPS_INT (0xFF0000),
"green_mask", GST_PROPS_INT (0x00FF00),
"blue_mask", GST_PROPS_INT (0x0000FF)
));
iter->pipeline = gst_element_factory_make ("pipeline", "main_pipeline");
if (iter->pipeline == NULL) return FALSE;
@ -276,15 +281,11 @@ gst_gdk_animation_iter_create_pipeline (GstGdkAnimationIter *iter)
if (!gst_element_link (typefind, autoplugger))
goto error;
/* add ffcolorspace if available so we get svq1, too */
if ((colorspace = gst_element_factory_make ("ffcolorspace", "ffcolorspace"))) {
gst_bin_add (GST_BIN (iter->pipeline), colorspace);
if (!gst_element_link (autoplugger, colorspace))
goto error;
autoplugger = colorspace;
}
if (!(colorspace = gst_element_factory_make ("colorspace", "colorspace")))
/* try ffcolorspace if available so we get svq1, too */
colorspace = gst_element_factory_make ("ffcolorspace", "ffcolorspace");
if (!colorspace)
colorspace = gst_element_factory_make ("colorspace", "colorspace");
if (!colorspace)
goto error;
gst_bin_add (GST_BIN (iter->pipeline), colorspace);
if (!gst_element_link (autoplugger, colorspace))