summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--ext/aalib/gstaasink.c7
-rw-r--r--ext/cairo/gsttextoverlay.c2
-rw-r--r--gst/goom/gstgoom.c21
-rw-r--r--gst/matroska/matroska-mux.c2
5 files changed, 19 insertions, 24 deletions
diff --git a/ChangeLog b/ChangeLog
index 9fd54957..953ffad0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2005-11-23 Jan Schmidt <thaytan@mad.scientist.com>
+
+ * 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
+
2005-11-23 Michael Smith <msmith@fluendo.com>
* ext/jpeg/gstjpegdec.c: (gst_jpeg_dec_setcaps),
diff --git a/ext/aalib/gstaasink.c b/ext/aalib/gstaasink.c
index 42ac0233..90249684 100644
--- a/ext/aalib/gstaasink.c
+++ b/ext/aalib/gstaasink.c
@@ -236,17 +236,12 @@ static void
gst_aasink_fixate (GstPad * pad, GstCaps * caps)
{
GstStructure *structure;
- GValue fps = { 0 };
structure = gst_caps_get_structure (caps, 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);
}
static gboolean
diff --git a/ext/cairo/gsttextoverlay.c b/ext/cairo/gsttextoverlay.c
index b8bf1c87..1ef6b7dd 100644
--- a/ext/cairo/gsttextoverlay.c
+++ b/ext/cairo/gsttextoverlay.c
@@ -785,7 +785,7 @@ gst_text_overlay_collected (GstCollectPads * pads, gpointer data)
if (GST_BUFFER_DURATION (video_frame) != GST_CLOCK_TIME_NONE) {
frame_end = now + GST_BUFFER_DURATION (video_frame);
} else if (overlay->fps_n > 0) {
- frame_end = now + gst_util_clock_time_scale (GST_SECOND,
+ frame_end = now + gst_util_uint64_scale_int (GST_SECOND,
overlay->fps_d, overlay->fps_n);
} else {
/* magic value, does not really matter since texts
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);
diff --git a/gst/matroska/matroska-mux.c b/gst/matroska/matroska-mux.c
index 10309357..45333f1f 100644
--- a/gst/matroska/matroska-mux.c
+++ b/gst/matroska/matroska-mux.c
@@ -450,7 +450,7 @@ gst_matroska_mux_video_pad_setcaps (GstPad * pad, GstCaps * caps)
videocontext->pixel_width = width;
videocontext->pixel_height = height;
- context->default_duration = gst_util_clock_time_scale (GST_SECOND,
+ context->default_duration = gst_util_uint64_scale_int (GST_SECOND,
gst_value_get_fraction_numerator (framerate),
gst_value_get_fraction_denominator (framerate));