summaryrefslogtreecommitdiffstats
path: root/ext/hermes/yuv2rgb.c
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2003-12-11 10:49:15 +0000
committerDavid Schleef <ds@schleef.org>2003-12-11 10:49:15 +0000
commit2e1829686d5b0fb3c35d2787e181d3155608a1a5 (patch)
tree9724a298fa8b72dcfef1b5e112eda179e8ebb1a3 /ext/hermes/yuv2rgb.c
parent458a99e2dd99445720e5a7c3e027a609aaa921f9 (diff)
downloadgst-plugins-bad-2e1829686d5b0fb3c35d2787e181d3155608a1a5.tar.gz
gst-plugins-bad-2e1829686d5b0fb3c35d2787e181d3155608a1a5.tar.bz2
gst-plugins-bad-2e1829686d5b0fb3c35d2787e181d3155608a1a5.zip
Convert to new caps
Original commit message from CVS: Convert to new caps
Diffstat (limited to 'ext/hermes/yuv2rgb.c')
-rw-r--r--ext/hermes/yuv2rgb.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/ext/hermes/yuv2rgb.c b/ext/hermes/yuv2rgb.c
index a1669b25..512eb046 100644
--- a/ext/hermes/yuv2rgb.c
+++ b/ext/hermes/yuv2rgb.c
@@ -105,22 +105,26 @@ static GstColorSpaceYUVTables * gst_colorspace_init_yuv(long depth,
long red_mask, long green_mask, long blue_mask);
GstColorSpaceConverter*
-gst_colorspace_yuv2rgb_get_converter (GstCaps *from, GstCaps *to)
+gst_colorspace_yuv2rgb_get_converter (const GstCaps2 *from, const GstCaps2 *to)
{
guint32 from_space;
GstColorSpaceConverter *new;
gint to_bpp;
+ GstStructure *struct_from, *struct_to;
GST_DEBUG ("gst_colorspace_yuv2rgb_get_converter");
new = g_malloc (sizeof (GstColorSpaceConverter));
- gst_caps_get_int (from, "width", &new->width);
- gst_caps_get_int (from, "height", &new->height);
+ struct_from = gst_caps2_get_nth_cap (from, 0);
+ struct_to = gst_caps2_get_nth_cap (to, 0);
+
+ gst_structure_get_int (struct_from, "width", &new->width);
+ gst_structure_get_int (struct_from, "height", &new->height);
new->color_tables = NULL;
- gst_caps_get_fourcc_int (from, "format", &from_space);
- gst_caps_get_int (to, "bpp", &to_bpp);
+ gst_structure_get_fourcc (struct_from, "format", &from_space);
+ gst_structure_get_int (struct_to, "bpp", &to_bpp);
/* FIXME we leak new here. */
@@ -132,9 +136,9 @@ gst_colorspace_yuv2rgb_get_converter (GstCaps *from, GstCaps *to)
gint green_mask;
gint blue_mask;
- gst_caps_get_int (to, "red_mask", &red_mask);
- gst_caps_get_int (to, "green_mask", &green_mask);
- gst_caps_get_int (to, "blue_mask", &blue_mask);
+ gst_structure_get_int (struct_to, "red_mask", &red_mask);
+ gst_structure_get_int (struct_to, "green_mask", &green_mask);
+ gst_structure_get_int (struct_to, "blue_mask", &blue_mask);
GST_INFO ( "red_mask %08x", red_mask);
GST_INFO ( "green_mask %08x", green_mask);