#define DEFAULT_NUM_BUFFERS -1
#define DEFAULT_TYPEFIND FALSE
#define DEFAULT_DO_TIMESTAMP FALSE
+#ifdef GST_TIZEN_TV
+#define DEFAULT_SEGMENT_TIME -1
+#endif
enum
{
PROP_NUM_BUFFERS,
PROP_TYPEFIND,
PROP_DO_TIMESTAMP
+#ifdef GST_TIZEN_TV
+ ,PROP_UPDATE_SEGMENT
+#endif
};
#define GST_BASE_SRC_GET_PRIVATE(obj) \
g_param_spec_boolean ("do-timestamp", "Do timestamp",
"Apply current stream time to buffers", DEFAULT_DO_TIMESTAMP,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+#ifdef GST_TIZEN_TV
+ g_object_class_install_property (gobject_class, PROP_UPDATE_SEGMENT,
+ g_param_spec_int64 ("update-segment", "Update Segment",
+ "Timestamp that application want to set (-1 unlimited)",
+ -1, G_MAXINT64, DEFAULT_SEGMENT_TIME,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+#endif
gstelement_class->change_state =
GST_DEBUG_FUNCPTR (gst_base_src_change_state);
GST_OBJECT_UNLOCK (src);
}
+#ifdef GST_TIZEN_TV
+/**
+*gst_base_src_update_segment:
+*@src: the source
+*@timestamp: timestamp to set
+*/
+void
+gst_base_src_update_segment (GstBaseSrc * src, gint64 timestamp)
+{
+ g_return_if_fail (GST_IS_BASE_SRC (src));
+
+ GST_OBJECT_LOCK (src);
+ if (timestamp != -1) {
+ GST_DEBUG_OBJECT (src,
+ "udpate the segment parameter for es player resume playback,%lld",
+ timestamp);
+ src->segment.start = timestamp;
+ src->segment.time = timestamp;
+ src->segment.position = timestamp;
+ }
+ GST_OBJECT_UNLOCK (src);
+ GST_DEBUG_OBJECT (src, "udpate the segment end");
+}
+#endif
+
/**
* gst_base_src_get_do_timestamp:
* @src: the source