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
This commit is contained in:
Jan Schmidt 2005-11-23 14:22:18 +00:00
parent 74dc53a9ae
commit 48520a455d
5 changed files with 19 additions and 24 deletions

View file

@ -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),

View file

@ -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

View file

@ -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

View file

@ -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);

View file

@ -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));