Commit e3509265 authored by Bertrand Lorentz's avatar Bertrand Lorentz

GStreamerSharp: Update to build with the latest gstreamer-sharp git

This is mainly to take into account namespace re-organization.
parent 2a0c111b
...@@ -141,7 +141,7 @@ namespace Banshee.GStreamerSharp ...@@ -141,7 +141,7 @@ namespace Banshee.GStreamerSharp
InDvdMenu = false; InDvdMenu = false;
// Get available command to know if player is in menu // Get available command to know if player is in menu
// FIXME: GlobalVideo should be Gst.Video.Global // FIXME: GlobalVideo should be Gst.Video.Global
Gst.Query query = GlobalVideo.NavigationQueryNewCommands (); Gst.Query query = Gst.Video.Global.NavigationQueryNewCommands ();
NavigationCommand[] cmds; NavigationCommand[] cmds;
if (Navigation == null) { if (Navigation == null) {
......
...@@ -39,6 +39,7 @@ using Mono.Unix; ...@@ -39,6 +39,7 @@ using Mono.Unix;
using Gst; using Gst;
using Gst.PbUtils; using Gst.PbUtils;
using Gst.Video;
using Hyena; using Hyena;
using Banshee.Collection; using Banshee.Collection;
...@@ -47,7 +48,6 @@ using Banshee.MediaEngine; ...@@ -47,7 +48,6 @@ using Banshee.MediaEngine;
using Banshee.ServiceStack; using Banshee.ServiceStack;
using Banshee.Configuration; using Banshee.Configuration;
using Banshee.Preferences; using Banshee.Preferences;
using Gst.Video;
namespace Banshee.GStreamerSharp namespace Banshee.GStreamerSharp
{ {
...@@ -464,7 +464,7 @@ namespace Banshee.GStreamerSharp ...@@ -464,7 +464,7 @@ namespace Banshee.GStreamerSharp
if (accurate_seek) { if (accurate_seek) {
seek_flags |= SeekFlags.Accurate; seek_flags |= SeekFlags.Accurate;
} }
playbin.SeekSimple (Format.Time, seek_flags, (((long)position) * Constants.MSECOND)); playbin.SeekSimple (Format.Time, seek_flags, (((long)position) * Gst.Constants.MSECOND));
OnEventChanged (PlayerEvent.Seek); OnEventChanged (PlayerEvent.Seek);
} }
...@@ -534,8 +534,8 @@ namespace Banshee.GStreamerSharp ...@@ -534,8 +534,8 @@ namespace Banshee.GStreamerSharp
case MessageType.Element: case MessageType.Element:
if (GlobalPbUtil.IsMissingPluginMessage (msg)) { if (Gst.PbUtils.Global.IsMissingPluginMessage (msg)) {
string detail = GlobalPbUtil.MissingPluginMessageGetInstallerDetail (msg); string detail = Gst.PbUtils.Global.MissingPluginMessageGetInstallerDetail (msg);
if (detail == null) if (detail == null)
return false; return false;
...@@ -548,10 +548,10 @@ namespace Banshee.GStreamerSharp ...@@ -548,10 +548,10 @@ namespace Banshee.GStreamerSharp
Log.DebugFormat ("Saving missing element details ('{0}')", detail); Log.DebugFormat ("Saving missing element details ('{0}')", detail);
missing_details.Add (detail); missing_details.Add (detail);
Log.Error ("Missing GStreamer Plugin", GlobalPbUtil.MissingPluginMessageGetDescription (msg), true); Log.Error ("Missing GStreamer Plugin", Gst.PbUtils.Global.MissingPluginMessageGetDescription (msg), true);
InstallPluginsContext install_context = new InstallPluginsContext (); InstallPluginsContext install_context = new InstallPluginsContext ();
GlobalPbUtil.InstallPluginsAsync (missing_details.ToArray (), install_context, OnInstallPluginsReturn); Gst.PbUtils.Global.InstallPluginsAsync (missing_details.ToArray (), install_context, OnInstallPluginsReturn);
} else if (NavigationAdapter.MessageGetType (msg) == NavigationMessageType.CommandsChanged) { } else if (NavigationAdapter.MessageGetType (msg) == NavigationMessageType.CommandsChanged) {
dvd_manager.HandleCommandsChanged (playbin); dvd_manager.HandleCommandsChanged (playbin);
} }
...@@ -611,7 +611,7 @@ namespace Banshee.GStreamerSharp ...@@ -611,7 +611,7 @@ namespace Banshee.GStreamerSharp
var error_message = String.IsNullOrEmpty (ex.Message) ? Catalog.GetString ("Unknown Error") : ex.Message; var error_message = String.IsNullOrEmpty (ex.Message) ? Catalog.GetString ("Unknown Error") : ex.Message;
if (ex.Domain == Global.ResourceErrorQuark ()) { if (ex.Domain == Gst.Global.ResourceErrorQuark ()) {
ResourceError domain_code = (ResourceError)ex.Code; ResourceError domain_code = (ResourceError)ex.Code;
if (failed_track != null) { if (failed_track != null) {
switch (domain_code) { switch (domain_code) {
...@@ -623,7 +623,7 @@ namespace Banshee.GStreamerSharp ...@@ -623,7 +623,7 @@ namespace Banshee.GStreamerSharp
} }
} }
Log.Error (String.Format ("GStreamer resource error: {0}", domain_code), false); Log.Error (String.Format ("GStreamer resource error: {0}", domain_code), false);
} else if (ex.Domain == Global.StreamErrorQuark ()) { } else if (ex.Domain == Gst.Global.StreamErrorQuark ()) {
StreamError domain_code = (StreamError)ex.Code; StreamError domain_code = (StreamError)ex.Code;
if (failed_track != null) { if (failed_track != null) {
switch (domain_code) { switch (domain_code) {
...@@ -636,7 +636,7 @@ namespace Banshee.GStreamerSharp ...@@ -636,7 +636,7 @@ namespace Banshee.GStreamerSharp
} }
Log.Error (String.Format ("GStreamer stream error: {0}", domain_code), false); Log.Error (String.Format ("GStreamer stream error: {0}", domain_code), false);
} else if (ex.Domain == Global.CoreErrorQuark ()) { } else if (ex.Domain == Gst.Global.CoreErrorQuark ()) {
CoreError domain_code = (CoreError)ex.Code; CoreError domain_code = (CoreError)ex.Code;
if (failed_track != null) { if (failed_track != null) {
switch (domain_code) { switch (domain_code) {
...@@ -651,7 +651,7 @@ namespace Banshee.GStreamerSharp ...@@ -651,7 +651,7 @@ namespace Banshee.GStreamerSharp
if (domain_code != CoreError.MissingPlugin) { if (domain_code != CoreError.MissingPlugin) {
Log.Error (String.Format ("GStreamer core error: {0}", domain_code), false); Log.Error (String.Format ("GStreamer core error: {0}", domain_code), false);
} }
} else if (ex.Domain == Global.LibraryErrorQuark ()) { } else if (ex.Domain == Gst.Global.LibraryErrorQuark ()) {
Log.Error (String.Format ("GStreamer library error: {0}", ex.Code), false); Log.Error (String.Format ("GStreamer library error: {0}", ex.Code), false);
} }
...@@ -796,10 +796,10 @@ namespace Banshee.GStreamerSharp ...@@ -796,10 +796,10 @@ namespace Banshee.GStreamerSharp
return String.Empty; return String.Empty;
string code; string code;
if (!list.GetString (Constants.TAG_LANGUAGE_CODE, out code)) if (!list.GetString (Gst.Constants.TAG_LANGUAGE_CODE, out code))
return String.Empty; return String.Empty;
var name = Gst.Tags.GlobalTag.TagGetLanguageName (code); var name = Tag.GetLanguageName (code);
Log.Debug ("Subtitle language code " + code + " resolved to " + name); Log.Debug ("Subtitle language code " + code + " resolved to " + name);
return name; return name;
...@@ -843,7 +843,7 @@ namespace Banshee.GStreamerSharp ...@@ -843,7 +843,7 @@ namespace Banshee.GStreamerSharp
get { get {
long pos; long pos;
playbin.QueryPosition (query_format, out pos); playbin.QueryPosition (query_format, out pos);
return (uint) ((ulong)pos / Constants.MSECOND); return (uint) ((ulong)pos / Gst.Constants.MSECOND);
} }
set { Seek (value); } set { Seek (value); }
} }
...@@ -852,7 +852,7 @@ namespace Banshee.GStreamerSharp ...@@ -852,7 +852,7 @@ namespace Banshee.GStreamerSharp
get { get {
long duration; long duration;
playbin.QueryDuration (query_format, out duration); playbin.QueryDuration (query_format, out duration);
return (uint) ((ulong)duration / Constants.MSECOND); return (uint) ((ulong)duration / Gst.Constants.MSECOND);
} }
} }
......
...@@ -114,7 +114,7 @@ namespace Banshee.GStreamerSharp ...@@ -114,7 +114,7 @@ namespace Banshee.GStreamerSharp
return; return;
} }
if (!GlobalVideo.IsVideoOverlayPrepareWindowHandleMessage (message)) { if (!Gst.Video.Global.IsVideoOverlayPrepareWindowHandleMessage (message)) {
return; return;
} }
......
...@@ -99,7 +99,7 @@ namespace Banshee.GStreamerSharp ...@@ -99,7 +99,7 @@ namespace Banshee.GStreamerSharp
audiosinkqueue ["leaky"] = GST_QUEUE_LEAK_DOWNSTREAM; audiosinkqueue ["leaky"] = GST_QUEUE_LEAK_DOWNSTREAM;
audiosinkqueue ["max-size-buffers"] = 0; audiosinkqueue ["max-size-buffers"] = 0;
audiosinkqueue ["max-size-bytes"] = 0; audiosinkqueue ["max-size-bytes"] = 0;
audiosinkqueue ["max-size-time"] = ((long)Constants.SECOND) * 5L; audiosinkqueue ["max-size-time"] = ((long)Gst.Constants.SECOND) * 5L;
fakesink.Connect ("handoff", PCMHandoff); fakesink.Connect ("handoff", PCMHandoff);
...@@ -109,11 +109,11 @@ namespace Banshee.GStreamerSharp ...@@ -109,11 +109,11 @@ namespace Banshee.GStreamerSharp
fakesink ["sync"] = true; fakesink ["sync"] = true;
// Drop buffers if they come in too late. This is mainly used when // Drop buffers if they come in too late. This is mainly used when
// thawing the vis pipeline. // thawing the vis pipeline.
fakesink ["max-lateness"] = ((long)Constants.SECOND / 120L); fakesink ["max-lateness"] = ((long)Gst.Constants.SECOND / 120L);
// Deliver buffers one frame early. This allows for rendering // Deliver buffers one frame early. This allows for rendering
// time. (TODO: It would be great to calculate this on-the-fly so // time. (TODO: It would be great to calculate this on-the-fly so
// we match the rendering time. // we match the rendering time.
fakesink ["ts-offset"] = -((long)Constants.SECOND / 60L); fakesink ["ts-offset"] = -((long)Gst.Constants.SECOND / 60L);
// Don't go to PAUSED when we freeze the pipeline. // Don't go to PAUSED when we freeze the pipeline.
fakesink ["async"] = false; fakesink ["async"] = false;
...@@ -147,7 +147,7 @@ namespace Banshee.GStreamerSharp ...@@ -147,7 +147,7 @@ namespace Banshee.GStreamerSharp
private Caps caps = Caps.FromString ( private Caps caps = Caps.FromString (
"audio/x-raw, " + "audio/x-raw, " +
//FIXME: is this correct way to port this? https://github.com/GNOME/banshee/commit/e40923df1bc55129832dff5ca2c782f5040b412f#diff-7c442526ef990528be03ffbca9921ec3R38 //FIXME: is this correct way to port this? https://github.com/GNOME/banshee/commit/e40923df1bc55129832dff5ca2c782f5040b412f#diff-7c442526ef990528be03ffbca9921ec3R38
"format = (string) " + Gst.Audio.GlobalAudio.AudioFormatToString (Gst.Audio.AudioFormat.F32) + ", " + "format = (string) " + Gst.Audio.Global.AudioFormatToString (Gst.Audio.AudioFormat.F32) + ", " +
"rate = (int) 44100, " + "rate = (int) 44100, " +
"channels = (int) 2"); "channels = (int) 2");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment