public DvdManager (PlayBin2 playbin) { if (playbin != null) { playbin.AddNotification ("source", OnSourceChanged); } }
public PlayerEngine () { Log.InformationFormat ("GStreamer# {0} Initializing; {1}.{2}", typeof (Gst.Version).Assembly.GetName ().Version, Gst.Version.Description, Gst.Version.Nano); // Setup the gst plugins/registry paths if running Windows if (PlatformDetection.IsWindows) { var gst_paths = new string [] { Hyena.Paths.Combine (Hyena.Paths.InstalledApplicationPrefix, "gst-plugins") }; Environment.SetEnvironmentVariable ("GST_PLUGIN_PATH", String.Join (";", gst_paths)); Environment.SetEnvironmentVariable ("GST_PLUGIN_SYSTEM_PATH", ""); Environment.SetEnvironmentVariable ("GST_DEBUG", "1"); string registry = Hyena.Paths.Combine (Hyena.Paths.ApplicationData, "registry.bin"); if (!System.IO.File.Exists (registry)) { System.IO.File.Create (registry).Close (); } Environment.SetEnvironmentVariable ("GST_REGISTRY", registry); //System.Environment.SetEnvironmentVariable ("GST_REGISTRY_FORK", "no"); Log.DebugFormat ("GST_PLUGIN_PATH = {0}", Environment.GetEnvironmentVariable ("GST_PLUGIN_PATH")); } Gst.Application.Init (); playbin = new PlayBin2 (); next_track_set = new ManualResetEvent (false); audio_sink = new AudioSinkBin ("audiobin"); playbin["audio-sink"] = audio_sink; if (audio_sink.VolumeNeedsSaving) { // Remember the volume from last time Volume = (ushort)PlayerEngineService.VolumeSchema.Get (); } Pad teepad = audio_sink.RequestTeePad (); visualization = new Visualization (audio_sink, teepad); playbin.AddNotification ("volume", OnVolumeChanged); playbin.Bus.AddWatch (OnBusMessage); playbin.AboutToFinish += OnAboutToFinish; cdda_manager = new CddaManager (playbin); dvd_manager = new DvdManager (playbin); // FIXME: Disable video stuff until GLib# 3 is used instead of the sopy bundled in GStreamerSharp //video_manager = new VideoManager (playbin); //video_manager.PrepareWindow += OnVideoPrepareWindow; //video_manager.Initialize (); dvd_manager.FindNavigation (playbin); OnStateChanged (PlayerState.Ready); }
public PlayerEngine () { Log.InformationFormat ("GStreamer# {0} Initializing; {1}.{2}", typeof (Gst.Version).Assembly.GetName ().Version, Gst.Version.Description, Gst.Version.Nano); // Setup the gst plugins/registry paths if running Windows if (PlatformDetection.IsWindows) { var gst_paths = new string [] { Hyena.Paths.Combine (Hyena.Paths.InstalledApplicationPrefix, "gst-plugins") }; Environment.SetEnvironmentVariable ("GST_PLUGIN_PATH", String.Join (";", gst_paths)); Environment.SetEnvironmentVariable ("GST_PLUGIN_SYSTEM_PATH", ""); Environment.SetEnvironmentVariable ("GST_DEBUG", "1"); string registry = Hyena.Paths.Combine (Hyena.Paths.ApplicationData, "registry.bin"); if (!System.IO.File.Exists (registry)) { System.IO.File.Create (registry).Close (); } Environment.SetEnvironmentVariable ("GST_REGISTRY", registry); //System.Environment.SetEnvironmentVariable ("GST_REGISTRY_FORK", "no"); Log.DebugFormat ("GST_PLUGIN_PATH = {0}", Environment.GetEnvironmentVariable ("GST_PLUGIN_PATH")); } Gst.Application.Init (); pipeline = new Pipeline (); playbin = new PlayBin2 (); pipeline.Add (playbin); // Remember the volume from last time Volume = (ushort)PlayerEngineService.VolumeSchema.Get (); playbin.AddNotification ("volume", OnVolumeChanged); pipeline.Bus.AddWatch (OnBusMessage); OnStateChanged (PlayerState.Ready); }