2005-11-23 Jan Schmidt <thaytan@mad.scientist.com>
+ * ext/sdl/sdlvideosink.c: (gst_sdlvideosink_base_init),
+ (gst_sdlvideosink_get_times), (gst_sdlvideosink_init),
+ (gst_sdlvideosink_setcaps), (gst_sdlvideosink_change_state):
+ * ext/sdl/sdlvideosink.h:
+ Updates for fractional framerates and XOverlay interface changes
+
+2005-11-23 Jan Schmidt <thaytan@mad.scientist.com>
+
* gst/qtdemux/qtdemux.c: (gst_qtdemux_loop_header),
(gst_qtdemux_add_stream), (qtdemux_dump_mvhd),
(qtdemux_parse_trak):
"format", GST_TYPE_FOURCC, formats[i],
"width", GST_TYPE_INT_RANGE, 1, G_MAXINT,
"height", GST_TYPE_INT_RANGE, 1, G_MAXINT,
- "framerate", GST_TYPE_DOUBLE_RANGE, (gdouble) 1.0,
- (gdouble) 100.0, NULL));
+ "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, 100, 1, NULL));
}
sink_template = gst_pad_template_new ("sink",
if (GST_CLOCK_TIME_IS_VALID (duration)) {
*end = timestamp + duration;
} else {
- if (sdlvideosink->framerate > 0) {
- *end = timestamp + GST_SECOND / sdlvideosink->framerate;
+ if (sdlvideosink->framerate_n > 0) {
+ *end = timestamp +
+ gst_util_uint64_scale_int (GST_SECOND, sdlvideosink->framerate_d,
+ sdlvideosink->framerate_n);
}
}
}
sdlvideosink->width = -1;
sdlvideosink->height = -1;
- sdlvideosink->framerate = 0;
+ sdlvideosink->framerate_n = 0;
+ sdlvideosink->framerate_d = 1;
sdlvideosink->full_screen = FALSE;
sdlvideosink->overlay = NULL;
gst_sdlvideosink_get_sdl_from_fourcc (sdlvideosink, sdlvideosink->fourcc);
gst_structure_get_int (structure, "width", &sdlvideosink->width);
gst_structure_get_int (structure, "height", &sdlvideosink->height);
- gst_structure_get_double (structure, "framerate", &sdlvideosink->framerate);
+ gst_structure_get_fraction (structure, "framerate",
+ &sdlvideosink->framerate_n, &sdlvideosink->framerate_d);
if (!sdlvideosink->format || !gst_sdlvideosink_create (sdlvideosink))
return FALSE;
- gst_x_overlay_got_desired_size (GST_X_OVERLAY (sdlvideosink),
- sdlvideosink->width, sdlvideosink->height);
-
return TRUE;
}
switch (transition) {
case GST_STATE_CHANGE_PAUSED_TO_READY:
- sdlvideosink->framerate = 0;
+ sdlvideosink->framerate_n = 0;
+ sdlvideosink->framerate_d = 1;
gst_sdlvideosink_destroy (sdlvideosink);
break;
case GST_STATE_CHANGE_READY_TO_NULL: