[banshee] [GStreamer.Service] use PlatformDetection



commit 48cdc51f5e1ec69c9912d3f7da42ac8a2594948e
Author: Aaron Bockover <abockover novell com>
Date:   Sun Feb 7 12:56:03 2010 -0500

    [GStreamer.Service] use PlatformDetection
    
    Fixed up to use PlatformDetection.IsWindows for building the
    registry. Cleaned up nasty looking code in this area.

 .../Banshee.GStreamer/Banshee.GStreamer/Service.cs |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/Backends/Banshee.GStreamer/Banshee.GStreamer/Service.cs b/src/Backends/Banshee.GStreamer/Banshee.GStreamer/Service.cs
index 4647426..11f79c3 100644
--- a/src/Backends/Banshee.GStreamer/Banshee.GStreamer/Service.cs
+++ b/src/Backends/Banshee.GStreamer/Banshee.GStreamer/Service.cs
@@ -4,7 +4,7 @@
 // Author:
 //   Aaron Bockover <abockover novell com>
 //
-// Copyright (C) 2006-2008 Novell, Inc.
+// Copyright 2006-2010 Novell, Inc.
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
@@ -59,24 +59,24 @@ namespace Banshee.GStreamer
             }
 
             // Setup the gst plugins/registry paths if running Windows
-            if (!Hyena.PlatformUtil.IsRunningUnix) {
-                string [] gst_paths = new String [] {
+            if (PlatformDetection.IsWindows) {
+                var gst_paths = new string [] {
                     "gst-plugins"
                 };
 
-                System.Environment.SetEnvironmentVariable ("GST_PLUGIN_PATH", String.Join (";", gst_paths));
-                System.Environment.SetEnvironmentVariable ("GST_PLUGIN_SYSTEM_PATH", "");
-                System.Environment.SetEnvironmentVariable ("GST_DEBUG", "1");
+                Environment.SetEnvironmentVariable ("GST_PLUGIN_PATH", String.Join (";", gst_paths));
+                Environment.SetEnvironmentVariable ("GST_PLUGIN_SYSTEM_PATH", "");
+                Environment.SetEnvironmentVariable ("GST_DEBUG", "1");
 
                 string registry = "registry.bin";
                 if (!System.IO.File.Exists (registry)) {
                     System.IO.File.Create (registry).Close ();
                 }
 
-                System.Environment.SetEnvironmentVariable ("GST_REGISTRY", registry);
+                Environment.SetEnvironmentVariable ("GST_REGISTRY", registry);
 
                 //System.Environment.SetEnvironmentVariable ("GST_REGISTRY_FORK", "no");
-                Console.WriteLine ("GST_PLUGIN_PATH = {0}", System.Environment.GetEnvironmentVariable ("GST_PLUGIN_PATH"));
+                Log.DebugFormat ("GST_PLUGIN_PATH = {0}", Environment.GetEnvironmentVariable ("GST_PLUGIN_PATH"));
             }
 
             gstreamer_initialize (debugging, native_log_handler);



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