gst/: Re-enable QoS after the release.

Original commit message from CVS:
* 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.
This commit is contained in:
Wim Taymans 2006-03-14 11:11:59 +00:00
parent 20a3ac3a07
commit 3150ac3b64
5 changed files with 28 additions and 13 deletions

View file

@ -1,3 +1,13 @@
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:

View file

@ -24,8 +24,11 @@
*
* <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>
*/
@ -95,4 +98,6 @@ gst_video_filter_init (GTypeInstance * instance, gpointer g_class)
GST_DEBUG_OBJECT (videofilter, "gst_video_filter_init");
videofilter->inited = FALSE;
/* enable QoS */
gst_base_transform_set_qos_enabled (GST_BASE_TRANSFORM (videofilter), TRUE);
}

View file

@ -104,7 +104,8 @@ gst_video_sink_init (GstVideoSink * videosink)
videosink->width = 0;
videosink->height = 0;
gst_base_sink_set_max_lateness (GST_BASE_SINK (videosink), -1);
/* 20ms is more than enough, 80-130ms is noticable */
gst_base_sink_set_max_lateness (GST_BASE_SINK (videosink), 20 * GST_MSECOND);
}
static void

View file

@ -371,6 +371,7 @@ gst_ffmpegcsp_class_init (GstFFMpegCspClass * klass)
static void
gst_ffmpegcsp_init (GstFFMpegCsp * space)
{
gst_base_transform_set_qos_enabled (GST_BASE_TRANSFORM (space), TRUE);
space->from_pixfmt = space->to_pixfmt = PIX_FMT_NB;
space->palette = NULL;
}

View file

@ -177,7 +177,7 @@ gst_video_scale_sink_template_factory (void)
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 */
@ -261,6 +261,7 @@ gst_video_scale_class_init (GstVideoScaleClass * klass)
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;
@ -270,10 +271,7 @@ gst_video_scale_class_init (GstVideoScaleClass * klass)
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;
}
@ -754,14 +752,14 @@ unknown_mode:
}
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));
@ -781,13 +779,13 @@ gst_video_scale_handle_src_event (GstPad * pad, GstEvent * 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;
}