summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
Diffstat (limited to 'gst')
-rw-r--r--gst/switch/gstswitch.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/gst/switch/gstswitch.c b/gst/switch/gstswitch.c
index 687dac3e..e7456dce 100644
--- a/gst/switch/gstswitch.c
+++ b/gst/switch/gstswitch.c
@@ -55,7 +55,8 @@ GST_STATIC_PAD_TEMPLATE ("src",
enum
{
- PROP_ACTIVE_PAD = 1
+ PROP_ACTIVE_PAD = 1,
+ PROP_LAST_STOP_TIME
};
enum
@@ -443,6 +444,10 @@ gst_stream_selector_class_init (GstStreamSelectorClass * klass)
g_object_class_install_property (gobject_class, PROP_ACTIVE_PAD,
g_param_spec_string ("active-pad", "Active pad",
"Name of the currently" " active sink pad", NULL, G_PARAM_READWRITE));
+ g_object_class_install_property (gobject_class, PROP_LAST_STOP_TIME,
+ g_param_spec_uint64 ("last-stop-time", "Last stop time",
+ "Last stop time on active pad", 0, G_MAXUINT64, GST_CLOCK_TIME_NONE,
+ G_PARAM_READABLE));
gobject_class->dispose = gst_stream_selector_dispose;
gstelement_class->request_new_pad = gst_stream_selector_request_new_pad;
gstelement_class->release_pad = gst_stream_selector_release_pad;
@@ -592,6 +597,18 @@ gst_stream_selector_get_property (GObject * object, guint prop_id,
GST_OBJECT_UNLOCK (object);
break;
}
+ case PROP_LAST_STOP_TIME:{
+ GstSelectorPad *spad;
+
+ GST_OBJECT_LOCK (object);
+ spad = GST_SELECTOR_PAD_CAST (sel->active_sinkpad);
+ if (spad && spad->active)
+ g_value_set_uint64 (value, spad->segment.last_stop);
+ else
+ g_value_set_uint64 (value, GST_CLOCK_TIME_NONE);
+ GST_OBJECT_UNLOCK (object);
+ break;
+ }
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;