[banshee] GStreamerSharp: fix DVD playback
- From: Andrés Aragoneses <aaragoneses src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] GStreamerSharp: fix DVD playback
- Date: Mon, 6 Jan 2014 17:26:39 +0000 (UTC)
commit 48bf8f23fb10de00380a7a2e7108de63bc6a6a6a
Author: Andrés G. Aragoneses <knocte gmail com>
Date: Mon Jan 6 18:26:30 2014 +0100
GStreamerSharp: fix DVD playback
DVD playback was throwing a NullReferenceException because the
navigation element found by Bin.GetByInterface() couldn't be
casted directly to INavigation, as NavigationAdapter.GetObject()
had to be used.
.../Banshee.GStreamerSharp/DvdManager.cs | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/Backends/Banshee.GStreamerSharp/Banshee.GStreamerSharp/DvdManager.cs
b/src/Backends/Banshee.GStreamerSharp/Banshee.GStreamerSharp/DvdManager.cs
index 3448e05..7237fb2 100644
--- a/src/Backends/Banshee.GStreamerSharp/Banshee.GStreamerSharp/DvdManager.cs
+++ b/src/Backends/Banshee.GStreamerSharp/Banshee.GStreamerSharp/DvdManager.cs
@@ -48,6 +48,9 @@ namespace Banshee.GStreamerSharp
INavigation Navigation {
get; set;
}
+ Element NavigationElement {
+ get; set;
+ }
public string Device {
get; set;
@@ -144,7 +147,7 @@ namespace Banshee.GStreamerSharp
if (Navigation == null) {
FindNavigation (playbin);
}
- if (!(((Element)Navigation).Query (query) && NavigationAdapter.ParseCommands (query, out cmds)))
{
+ if (!(NavigationElement.Query (query) && NavigationAdapter.ParseCommands (query, out cmds))) {
return;
}
foreach (NavigationCommand cmd in cmds) {
@@ -178,11 +181,10 @@ namespace Banshee.GStreamerSharp
}
}
- navigation = (video_sink is Bin)
+ NavigationElement = (video_sink is Bin)
? ((Bin)video_sink).GetByInterface (NavigationAdapter.GType)
: video_sink;
-
- Navigation = navigation as INavigation;
+ Navigation = NavigationAdapter.GetObject (navigation);
}
public void NotifyMouseMove (Element playbin, double x, double y)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]