[rygel] engine-gst: Fix resource duration handling
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] engine-gst: Fix resource duration handling
- Date: Sat, 25 Apr 2015 06:38:19 +0000 (UTC)
commit 391f2466b10192e5774d10e7c6087f46de98febb
Author: Jens Georg <mail jensge org>
Date: Sat Apr 25 08:33:45 2015 +0200
engine-gst: Fix resource duration handling
- Transfer resource from original data source to transcoding data source
- Seed HTTPTimeSeekResponse with time in micorseconds not seconds
Signed-off-by: Jens Georg <mail jensge org>
https://bugzilla.gnome.org/show_bug.cgi?id=748410
.../gstreamer/rygel-gst-data-source.vala | 4 +++-
.../gstreamer/rygel-gst-transcoder.vala | 6 +++++-
2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/media-engines/gstreamer/rygel-gst-data-source.vala
b/src/media-engines/gstreamer/rygel-gst-data-source.vala
index 30eec8e..f569480 100644
--- a/src/media-engines/gstreamer/rygel-gst-data-source.vala
+++ b/src/media-engines/gstreamer/rygel-gst-data-source.vala
@@ -84,7 +84,9 @@ internal class Rygel.GstDataSource : Rygel.DataSource, GLib.Object {
var time_seek = seek_request as HTTPTimeSeekRequest;
// Set the effective TimeSeekRange response range to the requested range
// TODO: Align this with actual time range being returned
- var seek_response = new HTTPTimeSeekResponse.from_request(time_seek, res.duration);
+ var seek_response = new HTTPTimeSeekResponse.from_request(time_seek,
+ res.duration
+ * TimeSpan.SECOND);
debug("Processing time seek request for %lldns-%lldns",
seek_response.start_time, seek_response.end_time);
response_list.add(seek_response);
diff --git a/src/media-engines/gstreamer/rygel-gst-transcoder.vala
b/src/media-engines/gstreamer/rygel-gst-transcoder.vala
index dd0bc02..521f32b 100644
--- a/src/media-engines/gstreamer/rygel-gst-transcoder.vala
+++ b/src/media-engines/gstreamer/rygel-gst-transcoder.vala
@@ -157,7 +157,11 @@ public abstract class Rygel.GstTranscoder : GLib.Object {
var ghost = new GhostPad (null, pad);
bin.add_pad (ghost);
- return new GstDataSource.from_element (bin);
+ // Hook up resource from original resource
+ var new_source = new GstDataSource.from_element (bin);
+ new_source.res = orig_source.res;
+
+ return new_source;
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]