[banshee/gst#] [gst#] use cdda manager in playerengine



commit 7f0b14130993de1ec27a6916b53234c7c967d397
Author: Olivier Dufour <olivier duff gmail com>
Date:   Tue May 24 21:49:18 2011 +0200

    [gst#] use cdda manager in playerengine

 .../Banshee.GStreamerSharp/PlayerEngine.cs         |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/Backends/Banshee.GStreamerSharp/Banshee.GStreamerSharp/PlayerEngine.cs b/src/Backends/Banshee.GStreamerSharp/Banshee.GStreamerSharp/PlayerEngine.cs
index c3b3926..01185e2 100644
--- a/src/Backends/Banshee.GStreamerSharp/Banshee.GStreamerSharp/PlayerEngine.cs
+++ b/src/Backends/Banshee.GStreamerSharp/Banshee.GStreamerSharp/PlayerEngine.cs
@@ -281,6 +281,7 @@ namespace Banshee.GStreamerSharp
         uint iterate_timeout_id = 0;
         List<string> missing_details = new List<string> ();
         ManualResetEvent next_track_set;
+        CddaManager cddaManager;
 
         public PlayerEngine ()
         {
@@ -323,6 +324,7 @@ namespace Banshee.GStreamerSharp
             playbin.Bus.AddWatch (OnBusMessage);
             playbin.AboutToFinish += OnAboutToFinish;
 
+            cddaManager = new CddaManager (playbin);
             OnStateChanged (PlayerState.Ready);
         }
 
@@ -585,6 +587,12 @@ namespace Banshee.GStreamerSharp
 
         protected override void OpenUri (SafeUri uri, bool maybeVideo)
         {
+            if (cddaManager.HandleURI (playbin, uri.AbsoluteUri)) {
+                return;
+            } else if (playbin == null) {
+                throw new ApplicationException ("Could not open resource");
+            }
+
             if (playbin.CurrentState == State.Playing || playbin.CurrentState == State.Paused) {
                 playbin.SetState (Gst.State.Ready);
             }



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