[rygel] Revert "engine-gst: Use GES for time seeking during transcoding"



commit 0ea6ce0a5fdd7ab7ce46b7b1c3dc4828e22d26c4
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Mon May 4 13:00:23 2020 +0000

    Revert "engine-gst: Use GES for time seeking during transcoding"
    
    This reverts commit 0c932b68f5f9930f5773a76e5266279d883f59e5

 meson.build                                        |  3 +-
 .../gstreamer/rygel-gst-data-source.vala           |  8 ++--
 .../gstreamer/rygel-gst-media-engine.vala          |  1 -
 .../rygel-gst-transcoding-data-source.vala         | 46 ++++++----------------
 4 files changed, 16 insertions(+), 42 deletions(-)
---
diff --git a/meson.build b/meson.build
index 5a3f8867..007eda1b 100644
--- a/meson.build
+++ b/meson.build
@@ -93,7 +93,6 @@ gstreamer_base = dependency('gstreamer-base-1.0', version : '>= 1.0', disabler:
 gstreamer_audio = dependency('gstreamer-audio-1.0', version : '>= 1.0', disabler: true, required: 
get_option('gstreamer'))
 gstreamer_video = dependency('gstreamer-video-1.0', version : '>= 1.0', disabler: true, required: 
get_option('gstreamer'))
 gstreamer_tag = dependency('gstreamer-tag-1.0', version : '>= 1.0', disabler: true, required: 
get_option('gstreamer'))
-gstreamer_es = dependency('gst-editing-services-1.0', version : '>= 1.16', disabler: true, required : 
get_option('gstreamer'))
 gupnp_dlna_gst = dependency('gupnp-dlna-gst-2.0', version: '>= 0.9.4', disabler: true, required: 
get_option('gstreamer'))
 
 gdk_pixbuf = dependency('gdk-pixbuf-2.0')
@@ -122,7 +121,7 @@ renderer_gst_deps = common_deps + [gstreamer, gstreamer_audio]
 server_deps = common_deps + [gssdp, gupnp_av, soup, mediaart, gmodule, libxml]
 db_deps = common_deps + [gupnp_av, gio, sqlite, unistring]
 media_engine_gst_dep = [gee, gupnp_av, libxml, gio, gstreamer, gstreamer_pbu,
-                        gstreamer_base, gupnp_dlna, math, gstreamer_es]
+                        gstreamer_base, gupnp_dlna, math]
 ruih_deps = common_deps
 rygel_deps = common_deps
 
diff --git a/src/media-engines/gstreamer/rygel-gst-data-source.vala 
b/src/media-engines/gstreamer/rygel-gst-data-source.vala
index ca177173..b16562d2 100644
--- a/src/media-engines/gstreamer/rygel-gst-data-source.vala
+++ b/src/media-engines/gstreamer/rygel-gst-data-source.vala
@@ -36,10 +36,8 @@ internal class Rygel.GstDataSource : Rygel.DataSource, GLib.Object {
     private HTTPSeekRequest seek = null;
     private GstSink sink;
     private uint bus_watch_id;
-    string uri = null;
 
     public GstDataSource (string uri, MediaResource ? resource) throws Error {
-        this.uri = uri;
         this.res = resource;
         this.src = GstUtils.create_source_for_uri (uri);
         if (this.src == null) {
@@ -63,8 +61,8 @@ internal class Rygel.GstDataSource : Rygel.DataSource, GLib.Object {
         this.src = element;
     }
 
-    public string get_uri () {
-        return this.uri;
+    public HTTPSeekRequest? get_seek_request () {
+        return this.seek;
     }
 
     public virtual Gee.List<HTTPResponseElement>? preroll
@@ -286,7 +284,7 @@ internal class Rygel.GstDataSource : Rygel.DataSource, GLib.Object {
         return ret;
     }
 
-    public virtual bool perform_seek () {
+    private bool perform_seek () {
         var stop_type = Gst.SeekType.NONE;
         Format format;
         var flags = SeekFlags.FLUSH;
diff --git a/src/media-engines/gstreamer/rygel-gst-media-engine.vala 
b/src/media-engines/gstreamer/rygel-gst-media-engine.vala
index 4883c642..f21fa5fb 100644
--- a/src/media-engines/gstreamer/rygel-gst-media-engine.vala
+++ b/src/media-engines/gstreamer/rygel-gst-media-engine.vala
@@ -35,7 +35,6 @@ public class Rygel.GstMediaEngine : Rygel.MediaEngine {
         unowned string[] args = null;
 
         Gst.init (ref args);
-        GES.init ();
         Gst.preset_set_app_dir (BuildConfig.PRESET_DIR);
 
         /* Get the possible DLNA profiles
diff --git a/src/media-engines/gstreamer/rygel-gst-transcoding-data-source.vala 
b/src/media-engines/gstreamer/rygel-gst-transcoding-data-source.vala
index 8bd21927..bd9451d5 100644
--- a/src/media-engines/gstreamer/rygel-gst-transcoding-data-source.vala
+++ b/src/media-engines/gstreamer/rygel-gst-transcoding-data-source.vala
@@ -43,42 +43,20 @@ internal class Rygel.TranscodingGstDataSource : Rygel.GstDataSource {
                                          throws Error {
         var bin = (Gst.Bin) this.src;
 
-        if (seek_request == null || seek_request is HTTPByteSeekRequest) {
-            this.decoder = GstUtils.create_element (DECODE_BIN, DECODE_BIN);
-            debug ("%s using the following encoding profile:",
-                    this.get_class ().get_type ().name ());
-                    GstUtils.dump_encoding_profile (encoder.profile);
-
-            bin.add_many (orig_source.src, decoder);
-            orig_source.src.link (decoder);
-            orig_source.src.sync_state_with_parent ();
-            decoder.sync_state_with_parent ();
-
-            decoder.autoplug_continue.connect (this.on_decode_autoplug_continue);
-            decoder.pad_added.connect (this.on_decoder_pad_added);
-            decoder.no_more_pads.connect (this.on_no_more_pads);
-        } else {
-            var time_seek = (HTTPTimeSeekRequest) seek_request;
-
-            var timeline = new GES.Timeline.audio_video ();
-            var layer = timeline.append_layer ();
-            var clip = new GES.UriClip (this.orig_source.get_uri ());
-            clip.in_point = time_seek.start_time * Gst.USECOND;
-            clip.duration = time_seek.range_duration * Gst.USECOND;
-            layer.add_clip (clip);
-            timeline.commit ();
-            var gessrc = GstUtils.create_element ("gessrc", "gessrc");
-            bin.add (gessrc);
-            gessrc.pad_added.connect (this.on_decoder_pad_added);
-            gessrc.no_more_pads.connect (this.on_no_more_pads);
-            gessrc.set ("timeline", timeline, null);
-        }
+        this.decoder = GstUtils.create_element (DECODE_BIN, DECODE_BIN);
+        debug ("%s using the following encoding profile:",
+                this.get_class ().get_type ().name ());
+                GstUtils.dump_encoding_profile (encoder.profile);
 
-        return base.preroll (seek_request, playspeed_request);
-    }
+        bin.add_many (orig_source.src, decoder);
 
-    public override bool perform_seek () {
-        return true;
+        orig_source.src.link (decoder);
+
+        decoder.autoplug_continue.connect (this.on_decode_autoplug_continue);
+        decoder.pad_added.connect (this.on_decoder_pad_added);
+        decoder.no_more_pads.connect (this.on_no_more_pads);
+
+        return base.preroll (seek_request, playspeed_request);
     }
 
     private Gst.Pad? get_compatible_sink_pad (Pad pad, Caps caps) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]