summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2016-11-11 08:44:59 +0100
committerEdward Hervey <bilboed@bilboed.com>2017-01-10 16:31:06 +0100
commit4f7e23fbeef45119858255bc5783674d4fda124a (patch)
tree0c03006f8da8492788a06ec0ca41774cf1290237
parentafa9c57a52ef1702cc1dc2165efd2e61b233986b (diff)
downloadgstreamer-plugins-bad-4f7e23fbeef45119858255bc5783674d4fda124a.tar.gz
adaptivedemux: Remove unneeded variables
We now have properly non-blocking download time calculation
-rw-r--r--gst-libs/gst/adaptivedemux/gstadaptivedemux.c12
-rw-r--r--gst-libs/gst/adaptivedemux/gstadaptivedemux.h2
2 files changed, 2 insertions, 12 deletions
diff --git a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c
index 4b52694ad..d6c3fb03f 100644
--- a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c
+++ b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c
@@ -2231,9 +2231,6 @@ _src_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
}
}
- stream->download_total_time +=
- GST_TIME_AS_USECONDS (gst_adaptive_demux_get_monotonic_time (demux)) -
- stream->download_chunk_start_time;
stream->download_total_bytes += gst_buffer_get_size (buffer);
GST_DEBUG_OBJECT (stream->pad, "Received buffer of size %" G_GSIZE_FORMAT,
@@ -2252,9 +2249,6 @@ _src_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
g_mutex_unlock (&stream->fragment_download_lock);
}
- stream->download_chunk_start_time =
- GST_TIME_AS_USECONDS (gst_adaptive_demux_get_monotonic_time (demux));
-
if (ret != GST_FLOW_OK) {
gboolean finished = FALSE;
@@ -2766,7 +2760,6 @@ gst_adaptive_demux_stream_download_uri (GstAdaptiveDemux * demux,
if (G_LIKELY (stream->last_ret == GST_FLOW_OK)) {
stream->download_start_time =
GST_TIME_AS_USECONDS (gst_adaptive_demux_get_monotonic_time (demux));
- stream->download_chunk_start_time = stream->download_start_time;
/* src element is in state READY. Before we start it, we reset
* download_finished
@@ -3725,8 +3718,7 @@ gst_adaptive_demux_stream_advance_fragment_unlocked (GstAdaptiveDemux * demux,
"fragment-stop-time", GST_TYPE_CLOCK_TIME,
gst_util_get_timestamp (), "fragment-size", G_TYPE_UINT64,
stream->download_total_bytes, "fragment-download-time",
- GST_TYPE_CLOCK_TIME,
- stream->download_total_time * GST_USECOND, NULL)));
+ GST_TYPE_CLOCK_TIME, stream->last_download_time, NULL)));
/* Don't update to the end of the segment if in reverse playback */
GST_ADAPTIVE_DEMUX_SEGMENT_LOCK (demux);
@@ -3754,7 +3746,7 @@ gst_adaptive_demux_stream_advance_fragment_unlocked (GstAdaptiveDemux * demux,
ret = GST_FLOW_EOS;
}
- stream->download_start_time = stream->download_chunk_start_time =
+ stream->download_start_time =
GST_TIME_AS_USECONDS (gst_adaptive_demux_get_monotonic_time (demux));
if (ret == GST_FLOW_OK) {
diff --git a/gst-libs/gst/adaptivedemux/gstadaptivedemux.h b/gst-libs/gst/adaptivedemux/gstadaptivedemux.h
index 9a1a1b7d1..5b39728e0 100644
--- a/gst-libs/gst/adaptivedemux/gstadaptivedemux.h
+++ b/gst-libs/gst/adaptivedemux/gstadaptivedemux.h
@@ -162,8 +162,6 @@ struct _GstAdaptiveDemuxStream
gboolean starting_fragment;
gboolean first_fragment_buffer;
gint64 download_start_time;
- gint64 download_chunk_start_time;
- gint64 download_total_time;
gint64 download_total_bytes;
guint64 current_download_rate;