summaryrefslogtreecommitdiffstats
path: root/gst/goom
diff options
context:
space:
mode:
authorJan Schmidt <thaytan@mad.scientist.com>2005-11-23 14:22:18 +0000
committerJan Schmidt <thaytan@mad.scientist.com>2005-11-23 14:22:18 +0000
commit48520a455d828b4a6885fb37be48ebb720ae259b (patch)
treed21e343e86c582cd830da7f810023c021cfa4c89 /gst/goom
parent74dc53a9aefdfb8d601b84a14d2d42e89d2e5f27 (diff)
Fixes for API changes
Original commit message from CVS: * ext/aalib/gstaasink.c: (gst_aasink_fixate): * ext/cairo/gsttextoverlay.c: (gst_text_overlay_collected): * gst/goom/gstgoom.c: (gst_goom_init), (gst_goom_src_setcaps), (gst_goom_src_negotiate), (gst_goom_chain): * gst/matroska/matroska-mux.c: (gst_matroska_mux_video_pad_setcaps): * sys/osxvideo/osxvideosink.m: Fixes for API changes
Diffstat (limited to 'gst/goom')
-rw-r--r--gst/goom/gstgoom.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/gst/goom/gstgoom.c b/gst/goom/gstgoom.c
index 99173dab..e5a6618d 100644
--- a/gst/goom/gstgoom.c
+++ b/gst/goom/gstgoom.c
@@ -222,23 +222,17 @@ gst_goom_src_setcaps (GstPad * pad, GstCaps * caps)
{
GstGoom *goom;
GstStructure *structure;
- const GValue *fps;
goom = GST_GOOM (GST_PAD_PARENT (pad));
structure = gst_caps_get_structure (caps, 0);
if (!gst_structure_get_int (structure, "width", &goom->width) ||
- !gst_structure_get_int (structure, "height", &goom->height))
+ !gst_structure_get_int (structure, "height", &goom->height) ||
+ !gst_structure_get_fraction (structure, "framerate", &goom->fps_n,
+ &goom->fps_d))
return FALSE;
- fps = gst_structure_get_value (structure, "framerate");
- if (fps == NULL || !GST_VALUE_HOLDS_FRACTION (fps))
- return FALSE;
-
- goom->fps_n = gst_value_get_fraction_numerator (fps);
- goom->fps_d = gst_value_get_fraction_denominator (fps);
-
goom_set_resolution (goom->width, goom->height);
return TRUE;
@@ -250,7 +244,6 @@ gst_goom_src_negotiate (GstGoom * goom)
GstCaps *othercaps, *target, *intersect;
GstStructure *structure;
const GstCaps *templ;
- GValue fps = { 0 };
templ = gst_pad_get_pad_template_caps (goom->srcpad);
@@ -272,11 +265,7 @@ gst_goom_src_negotiate (GstGoom * goom)
structure = gst_caps_get_structure (target, 0);
gst_structure_fixate_field_nearest_int (structure, "width", 320);
gst_structure_fixate_field_nearest_int (structure, "height", 240);
-
- g_value_init (&fps, GST_TYPE_FRACTION);
- gst_value_set_fraction (&fps, 30, 1);
- gst_structure_fixate_field_nearest_fraction (structure, "framerate", &fps);
- g_value_unset (&fps);
+ gst_structure_fixate_field_nearest_fraction (structure, "framerate", 30, 1);
gst_pad_set_caps (goom->srcpad, target);
gst_caps_unref (target);
@@ -365,7 +354,7 @@ gst_goom_chain (GstPad * pad, GstBuffer * bufin)
GstClockTimeDiff frame_duration;
gint i;
- frame_duration = gst_util_clock_time_scale (GST_SECOND, goom->fps_d,
+ frame_duration = gst_util_uint64_scale_int (GST_SECOND, goom->fps_d,
goom->fps_n);
data = (const guint16 *) gst_adapter_peek (goom->adapter, bytesperread);