#ifdef TIZEN_FEATURE_SUBPARSE_MODIFICATION
GstMessage *m = NULL;
#endif
+#ifdef TIZEN_FEATURE_HLS_WEBVTT
+ GstClockTime reference_time = GST_CLOCK_TIME_NONE;
+#endif
if (self->first_buffer) {
GstMapInfo map;
self->state.fps_d = self->fps_d;
}
+#ifdef TIZEN_FEATURE_HLS_WEBVTT
+ if (GST_BUFFER_IS_DISCONT (buf) && GST_BUFFER_PTS_IS_VALID (buf))
+ reference_time = GST_BUFFER_PTS (buf);
+#endif
+
feed_textbuf (self, buf);
/* make sure we know the format */
GST_BUFFER_TIMESTAMP (buf) = self->state.start_time;
GST_BUFFER_DURATION (buf) = self->state.duration;
+#ifdef TIZEN_FEATURE_HLS_WEBVTT
+ if ((self->parser_type == GST_SUB_PARSE_FORMAT_VTT)
+ && GST_CLOCK_TIME_IS_VALID (reference_time)) {
+ GstCaps *sink_caps = gst_pad_get_current_caps (self->sinkpad);
+ if (sink_caps) {
+ gst_buffer_add_reference_timestamp_meta (buf, sink_caps,
+ reference_time, GST_CLOCK_TIME_NONE);
+ gst_caps_unref (sink_caps);
+ }
+ }
+#endif
/* in some cases (e.g. tmplayer) we can only determine the duration
* of a text chunk from the timestamp of the next text chunk; in those
* cases, we probably want to limit the duration to something