/* for throttling and QoS */
GstClockTime earliest_in_time;
GstClockTime throttle_time;
-
- gboolean reset_time;
};
#define DO_RUNNING_AVG(avg,val,size) (((val) + ((size)-1) * (avg)) / (size))
*/
g_object_class_install_property (gobject_class, PROP_THROTTLE_TIME,
g_param_spec_uint64 ("throttle-time", "Throttle time",
- "The time to keep between rendered buffers (unused)", 0, G_MAXUINT64,
+ "The time to keep between rendered buffers", 0, G_MAXUINT64,
DEFAULT_THROTTLE_TIME, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
gstelement_class->change_state =
gboolean post_paused = FALSE;
gboolean post_async_done = FALSE;
gboolean post_playing = FALSE;
- gboolean reset_time;
/* we are certainly not playing async anymore now */
basesink->playing_async = FALSE;
next = GST_STATE_NEXT (basesink);
pending = GST_STATE_PENDING (basesink);
post_pending = pending;
- reset_time = basesink->priv->reset_time;
- basesink->priv->reset_time = FALSE;
switch (pending) {
case GST_STATE_PLAYING:
if (post_async_done) {
GST_DEBUG_OBJECT (basesink, "posting async-done message");
gst_element_post_message (GST_ELEMENT_CAST (basesink),
- gst_message_new_async_done (GST_OBJECT_CAST (basesink), reset_time));
+ gst_message_new_async_done (GST_OBJECT_CAST (basesink), FALSE));
}
if (post_playing) {
GST_DEBUG_OBJECT (basesink, "posting PLAYING state change message");
/* FIXME: Casting to GstClockEntry only works because the types
* are the same */
if (G_LIKELY (sink->priv->cached_clock_id != NULL
- && GST_CLOCK_ENTRY_CLOCK ((GstClockEntry *) sink->
- priv->cached_clock_id) == clock)) {
+ && GST_CLOCK_ENTRY_CLOCK ((GstClockEntry *) sink->priv->
+ cached_clock_id) == clock)) {
if (!gst_clock_single_shot_id_reinit (clock, sink->priv->cached_clock_id,
time)) {
gst_clock_id_unref (sink->priv->cached_clock_id);
gst_segment_init (&basesink->segment, GST_FORMAT_UNDEFINED);
}
}
- basesink->priv->reset_time = reset_time;
GST_OBJECT_UNLOCK (basesink);
+
+ if (reset_time) {
+ GST_DEBUG_OBJECT (basesink, "posting reset-time message");
+ gst_element_post_message (GST_ELEMENT_CAST (basesink),
+ gst_message_new_reset_time (GST_OBJECT_CAST (basesink), 0));
+ }
}
static GstFlowReturn
GST_DEBUG_OBJECT (basesink, "fixated to: %" GST_PTR_FORMAT, caps);
if (gst_caps_is_fixed (caps)) {
- if (!gst_pad_send_event (GST_BASE_SINK_PAD (basesink),
- gst_event_new_caps (caps)))
+ if (!gst_pad_set_caps (GST_BASE_SINK_PAD (basesink), caps))
goto could_not_set_caps;
result = TRUE;
priv->step_unlock = FALSE;
basesink->need_preroll = TRUE;
basesink->playing_async = TRUE;
- basesink->priv->reset_time = FALSE;
priv->current_sstart = GST_CLOCK_TIME_NONE;
priv->current_sstop = GST_CLOCK_TIME_NONE;
priv->eos_rtime = GST_CLOCK_TIME_NONE;