+2006-03-14 Wim Taymans <wim@fluendo.com>
+
+ * gst-libs/gst/video/gstvideofilter.c: (gst_video_filter_init):
+ * gst-libs/gst/video/gstvideosink.c: (gst_video_sink_init):
+ * gst/ffmpegcolorspace/gstffmpegcolorspace.c: (gst_ffmpegcsp_init):
+ * gst/videoscale/gstvideoscale.c: (gst_video_scale_class_init),
+ (gst_video_scale_init), (gst_video_scale_src_event):
+ Re-enable QoS after the release.
+ Rework videoscale to use the base class src_event handler.
+
2006-03-14 Tim-Philipp Müller <tim at centricular dot net>
* configure.ac:
*
* <refsect2>
* <para>
- * Provides useful functions and a base class for video filters. Right now it's
- * mostly used as a place holder for adding common code later on.
+ * Provides useful functions and a base class for video filters.
+ * </para>
+ * <para>
+ * The videofilter will by default enable QoS on the parent GstBaseTransform
+ * to implement frame dropping.
* </para>
* </refsect2>
*/
GST_DEBUG_OBJECT (videofilter, "gst_video_filter_init");
videofilter->inited = FALSE;
+ /* enable QoS */
+ gst_base_transform_set_qos_enabled (GST_BASE_TRANSFORM (videofilter), TRUE);
}
static void gst_video_scale_base_init (gpointer g_class);
static void gst_video_scale_class_init (GstVideoScaleClass * klass);
static void gst_video_scale_init (GstVideoScale * videoscale);
-static gboolean gst_video_scale_handle_src_event (GstPad * pad,
+static gboolean gst_video_scale_src_event (GstBaseTransform * trans,
GstEvent * event);
/* base transform vmethods */
GST_DEBUG_FUNCPTR (gst_video_scale_get_unit_size);
trans_class->transform = GST_DEBUG_FUNCPTR (gst_video_scale_transform);
trans_class->fixate_caps = GST_DEBUG_FUNCPTR (gst_video_scale_fixate_caps);
+ trans_class->src_event = GST_DEBUG_FUNCPTR (gst_video_scale_src_event);
trans_class->passthrough_on_same_caps = TRUE;
static void
gst_video_scale_init (GstVideoScale * videoscale)
{
- GstBaseTransform *trans = GST_BASE_TRANSFORM (videoscale);
-
- gst_pad_set_event_function (trans->srcpad, gst_video_scale_handle_src_event);
-
+ gst_base_transform_set_qos_enabled (GST_BASE_TRANSFORM (videoscale), TRUE);
videoscale->tmp_buf = NULL;
videoscale->method = DEFAULT_PROP_METHOD;
}
}
static gboolean
-gst_video_scale_handle_src_event (GstPad * pad, GstEvent * event)
+gst_video_scale_src_event (GstBaseTransform * trans, GstEvent * event)
{
GstVideoScale *videoscale;
gboolean ret;
double a;
GstStructure *structure;
- videoscale = GST_VIDEO_SCALE (gst_pad_get_parent (pad));
+ videoscale = GST_VIDEO_SCALE (trans);
GST_DEBUG_OBJECT (videoscale, "handling %s event",
GST_EVENT_TYPE_NAME (event));
a * videoscale->from_height / videoscale->to_height, NULL);
}
break;
+ case GST_EVENT_QOS:
+ break;
default:
break;
}
- ret = gst_pad_event_default (pad, event);
-
- gst_object_unref (videoscale);
+ ret = GST_BASE_TRANSFORM_CLASS (parent_class)->src_event (trans, event);
return ret;
}