[rygel/wip/phako/remove-warnings: 4/14] renderer-gst: Fix namespace warning



commit bbe8586612872dfe98980428da1225200017a124
Author: Jens Georg <mail jensge org>
Date:   Thu Feb 13 22:27:57 2020 +0100

    renderer-gst: Fix namespace warning

 .../rygel-playbin-player.vala                      | 22 +++++++++++-----------
 .../rygel-playbin-renderer.vala                    |  8 ++++----
 src/plugins/playbin/rygel-playbin-plugin.vala      |  4 ++--
 tests/rygel-playbin-renderer-test.vala             |  4 ++--
 4 files changed, 19 insertions(+), 19 deletions(-)
---
diff --git a/src/librygel-renderer-gst/rygel-playbin-player.vala 
b/src/librygel-renderer-gst/rygel-playbin-player.vala
index 96da6d27..14cef6f1 100644
--- a/src/librygel-renderer-gst/rygel-playbin-player.vala
+++ b/src/librygel-renderer-gst/rygel-playbin-player.vala
@@ -30,7 +30,7 @@
 using Gst;
 using GUPnP;
 
-public errordomain Rygel.Playbin.PlayerError {
+public errordomain Rygel.PlaybinPlayerError {
     NO_ELEMENT
 }
 
@@ -39,7 +39,7 @@ public errordomain Rygel.Playbin.PlayerError {
  *
  * This class is useful only when implementing Rygel plugins.
  */
-public class Rygel.Playbin.Player : GLib.Object, Rygel.MediaPlayer {
+public class Rygel.PlaybinPlayer : GLib.Object, Rygel.MediaPlayer {
     private const string TRANSFER_MODE_STREAMING = "Streaming";
     private const string TRANSFER_MODE_INTERACTIVE = "Interactive";
     private const string PROTOCOL_INFO_TEMPLATE = "http-get:%s:*:%s";
@@ -91,12 +91,12 @@ public class Rygel.Playbin.Player : GLib.Object, Rygel.MediaPlayer {
                                         "video/x-ms-asf",
                                         "video/x-xvid",
                                         "video/x-ms-wmv" };
-    private static Player player;
+    private static PlaybinPlayer player;
     private static bool has_dlna_src;
 
     static construct {
-        Player.has_dlna_src = Gst.URI.protocol_is_supported (URIType.SRC,
-                                                             "dlna+http");
+        PlaybinPlayer.has_dlna_src = Gst.URI.protocol_is_supported (URIType.SRC,
+                                                                    "dlna+http");
     }
 
     public dynamic Element playbin { get; private set; }
@@ -198,7 +198,7 @@ public class Rygel.Playbin.Player : GLib.Object, Rygel.MediaPlayer {
         set {
             this._uri = value;
             this.playbin.set_state (State.READY);
-            if (Player.has_dlna_src && value.has_prefix ("http")) {
+            if (PlaybinPlayer.has_dlna_src && value.has_prefix ("http")) {
                 debug ("Trying to use DLNA src element");
                 this.playbin.uri = "dlna+" + value;
             } else {
@@ -363,18 +363,18 @@ public class Rygel.Playbin.Player : GLib.Object, Rygel.MediaPlayer {
         }
     }
 
-    private Player () throws Error {
+    private PlaybinPlayer () throws Error {
         this.playbin = ElementFactory.make ("playbin3", null);
         if (this.playbin == null) {
-            throw new PlayerError.NO_ELEMENT (
-                _("Your GStreamer installation seems to be missing the “playbin” element. The Rygel 
GStreamer renderer implementation cannot work without it"));
+            throw new PlaybinPlayerError.NO_ELEMENT (
+                _("Your GStreamer installation seems to be missing the “playbin3” element. The Rygel 
GStreamer renderer implementation cannot work without it"));
         }
         this.setup_playbin ();
     }
 
-    public static Player instance () throws Error {
+    public static PlaybinPlayer instance () throws Error {
         if (player == null) {
-            player = new Player ();
+            player = new PlaybinPlayer ();
         }
 
         return player;
diff --git a/src/librygel-renderer-gst/rygel-playbin-renderer.vala 
b/src/librygel-renderer-gst/rygel-playbin-renderer.vala
index 45096bef..0173d247 100644
--- a/src/librygel-renderer-gst/rygel-playbin-renderer.vala
+++ b/src/librygel-renderer-gst/rygel-playbin-renderer.vala
@@ -40,7 +40,7 @@ using GUPnP;
  *
  * See the <link linkend="implementing-renderers-gst">Implementing GStreamer-based Renderers</link> section.
  */
-public class Rygel.Playbin.Renderer : Rygel.MediaRenderer {
+public class Rygel.PlaybinRenderer : Rygel.MediaRenderer {
     /**
      * Create a new instance of Renderer.
      *
@@ -49,10 +49,10 @@ public class Rygel.Playbin.Renderer : Rygel.MediaRenderer {
      *
      * @param title Friendly name of the new UPnP renderer on the network.
      */
-    public Renderer (string title) {
+    public PlaybinRenderer (string title) {
         try {
             Object (title: title,
-                    player: Player.instance ());
+                    player: PlaybinPlayer.instance ());
         } catch (Error error) {
             warning (error.message);
 
@@ -65,7 +65,7 @@ public class Rygel.Playbin.Renderer : Rygel.MediaRenderer {
      */
     public Gst.Element? get_playbin () {
         try {
-            var player = Rygel.Playbin.Player.instance ();
+            var player = Rygel.PlaybinPlayer.instance ();
 
             return player.playbin;
         } catch (Error error) {
diff --git a/src/plugins/playbin/rygel-playbin-plugin.vala b/src/plugins/playbin/rygel-playbin-plugin.vala
index 7e45d448..db8858bb 100644
--- a/src/plugins/playbin/rygel-playbin-plugin.vala
+++ b/src/plugins/playbin/rygel-playbin-plugin.vala
@@ -33,12 +33,12 @@ internal class Rygel.Playbin.Plugin : Rygel.MediaRendererPlugin {
 
     public Plugin () throws Error {
         base (Plugin.NAME, _("GStreamer Player"));
-        this.supported_profiles = Player.instance ().supported_profiles;
+        this.supported_profiles = PlaybinPlayer.instance ().supported_profiles;
     }
 
     public override MediaPlayer? get_player () {
         try {
-            return Playbin.Player.instance ();
+            return PlaybinPlayer.instance ();
         } catch (Error error) {
             warning (_("Could not create GStreamer player"));
 
diff --git a/tests/rygel-playbin-renderer-test.vala b/tests/rygel-playbin-renderer-test.vala
index ade4fc8b..95f960e6 100644
--- a/tests/rygel-playbin-renderer-test.vala
+++ b/tests/rygel-playbin-renderer-test.vala
@@ -35,10 +35,10 @@ private class Rygel.PlaybinRendererTest : GLib.Object {
     }
 
     public void test_with_default_gstplaybin() {
-        var renderer = new Rygel.Playbin.Renderer ("test playbin renderer");
+        var renderer = new Rygel.PlaybinRenderer ("test playbin renderer");
         assert (renderer != null);
         try {
-            var player = Rygel.Playbin.Player.instance ();
+            var player = Rygel.PlaybinPlayer.instance ();
             assert (player.playbin != null);
         } catch (Error error) {
             assert_not_reached ();


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