gint64 start = 0, stop = 0;
gst_query_parse_nth_buffering_range(query, range, &start, &stop);
media::MediaPlayerTizen::TimeRanges b_range;
+
+#if GST_VERSION_MAJOR == 1
+ if ((start == 0 || is_end_reached_) &&
+ stop == GST_FORMAT_PERCENT_MAX)
+ StopBufferingUpdateTimer();
+
+ b_range.start = start * duration_;
+ b_range.end = stop * duration_;
+#else
// Stop the Timer on Buffer completion
if(start == 0 && stop == 100)
StopBufferingUpdateTimer();
+
// Parsed value is in percentage. Converted into time range
b_range.start = static_cast<double>(start) * duration_ / 100
* base::Time::kMicrosecondsPerSecond;
b_range.end = static_cast<double>(stop) * duration_ / 100
* base::Time::kMicrosecondsPerSecond;
+#endif
+
buffer_range.push_back(b_range);
}
manager()->OnBufferUpdate(GetPlayerId(), buffer_range);