From 3fa160e1c8346aba42be8beb4fd621241b44b60a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Olivier=20Cr=C3=AAte?= Date: Fri, 23 Mar 2012 13:06:12 -0400 Subject: [PATCH] shmsink: Make buffer-time signed to deal with backward jumps in timestamps --- sys/shm/gstshmsink.c | 8 ++++---- sys/shm/gstshmsink.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/shm/gstshmsink.c b/sys/shm/gstshmsink.c index e8355fe..d37c28d 100644 --- a/sys/shm/gstshmsink.c +++ b/sys/shm/gstshmsink.c @@ -149,10 +149,10 @@ gst_shm_sink_class_init (GstShmSinkClass * klass) G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_BUFFER_TIME, - g_param_spec_uint64 ("buffer-time", + g_param_spec_int64 ("buffer-time", "Buffer Time of the shm buffer", "Maximum Size of the shm buffer in nanoseconds (-1 to disable)", - 0, G_MAXUINT64, GST_CLOCK_TIME_NONE, + -1, G_MAXINT64, -1, G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); signals[SIGNAL_CLIENT_CONNECTED] = g_signal_new ("client-connected", @@ -233,7 +233,7 @@ gst_shm_sink_set_property (GObject * object, guint prop_id, break; case PROP_BUFFER_TIME: GST_OBJECT_LOCK (object); - self->buffer_time = g_value_get_uint64 (value); + self->buffer_time = g_value_get_int64 (value); GST_OBJECT_UNLOCK (object); g_cond_broadcast (self->cond); break; @@ -272,7 +272,7 @@ gst_shm_sink_get_property (GObject * object, guint prop_id, g_value_set_boolean (value, self->wait_for_connection); break; case PROP_BUFFER_TIME: - g_value_set_uint64 (value, self->buffer_time); + g_value_set_int64 (value, self->buffer_time); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); diff --git a/sys/shm/gstshmsink.h b/sys/shm/gstshmsink.h index 83dad39..d0db530 100644 --- a/sys/shm/gstshmsink.h +++ b/sys/shm/gstshmsink.h @@ -61,7 +61,7 @@ struct _GstShmSink gboolean wait_for_connection; gboolean stop; gboolean unlock; - GstClockTime buffer_time; + GstClockTimeDiff buffer_time; GCond *cond; }; -- 2.7.4