[banshee] GStreamerSharp: Rework initialization to match the native backend
- From: Bertrand Lorentz <blorentz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] GStreamerSharp: Rework initialization to match the native backend
- Date: Mon, 30 Dec 2013 16:09:36 +0000 (UTC)
commit 4706cd9ae0f6965516c261656e30b40ab6f0c938
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date: Mon Dec 30 16:48:30 2013 +0100
GStreamerSharp: Rework initialization to match the native backend
The native C GStreamer backend builds the pipeline during the "delayed
initialization" phase, which allows other extensions to be notified when
it is done. So we move the corresponding part from the Gst# PlayerEngine
constructor to the Initialize method.
This fixes the "Equalizer" menu item to be enabled when an equalizer is
available, and maybe some other things.
.../Banshee.GStreamerSharp/PlayerEngine.cs | 17 +++++++----------
1 files changed, 7 insertions(+), 10 deletions(-)
---
diff --git a/src/Backends/Banshee.GStreamerSharp/Banshee.GStreamerSharp/PlayerEngine.cs
b/src/Backends/Banshee.GStreamerSharp/Banshee.GStreamerSharp/PlayerEngine.cs
index 253ed20..66acc7e 100644
--- a/src/Backends/Banshee.GStreamerSharp/Banshee.GStreamerSharp/PlayerEngine.cs
+++ b/src/Backends/Banshee.GStreamerSharp/Banshee.GStreamerSharp/PlayerEngine.cs
@@ -354,6 +354,12 @@ namespace Banshee.GStreamerSharp
}
Gst.Application.Init ();
+ }
+
+ protected override bool DelayedInitialize { get { return true; } }
+
+ protected override void Initialize ()
+ {
playbin = ElementFactory.Make ("playbin", "the playbin");
next_track_set = new ManualResetEvent (false);
@@ -381,18 +387,9 @@ namespace Banshee.GStreamerSharp
video_manager.Initialize ();
dvd_manager.FindNavigation (playbin);
- OnStateChanged (PlayerState.Ready);
- }
- protected override bool DelayedInitialize {
- get {
- return true;
- }
- }
+ OnStateChanged (PlayerState.Ready);
- protected override void Initialize ()
- {
- base.Initialize ();
InstallPreferences ();
audio_sink.ReplayGainEnabled = ReplayGainEnabledSchema.Get ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]