[rygel/config] Add transcoding options to Configuration



commit 4e5b664b1b26ec69916487f4af284e91f2d1262c
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Tue Apr 28 18:22:51 2009 +0300

    Add transcoding options to Configuration
---
 src/rygel/rygel-configuration.vala |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/src/rygel/rygel-configuration.vala b/src/rygel/rygel-configuration.vala
index fd01199..aca774f 100644
--- a/src/rygel/rygel-configuration.vala
+++ b/src/rygel/rygel-configuration.vala
@@ -36,6 +36,12 @@ public class Rygel.Configuration {
     protected static const string ENABLED_KEY = "enabled";
     protected static const string TITLE_KEY = "title";
     protected static const string UDN_KEY = "UDN";
+    protected static const string TRANSCODING_KEY = "enable-transcoding";
+    protected static const string MP3_TRANSCODER_KEY = "enable-mp3-transcoder";
+    protected static const string MP2TS_TRANSCODER_KEY =
+                                                    "enable-mp2ts-transcoder";
+    protected static const string LPCM_TRANSCODER_KEY =
+                                                    "enable-lpcm-transcoder";
 
     protected GConf.Client gconf;
 
@@ -43,6 +49,11 @@ public class Rygel.Configuration {
     public string host_ip;
     public int port;
 
+    public bool transcoding;
+    public bool mp3_transcoder;
+    public bool mp2ts_transcoder;
+    public bool lpcm_transcoder;
+
     public Configuration () {
         this.gconf = GConf.Client.get_default ();
 
@@ -53,6 +64,16 @@ public class Rygel.Configuration {
                                   uint16.MIN,
                                   uint16.MAX,
                                   0);
+        this.transcoding = this.get_bool ("general", TRANSCODING_KEY, true);
+        this.mp3_transcoder = this.get_bool ("general",
+                                             MP3_TRANSCODER_KEY,
+                                             true);
+        this.mp2ts_transcoder = this.get_bool ("general",
+                                               MP2TS_TRANSCODER_KEY,
+                                               true);
+        this.lpcm_transcoder = this.get_bool ("general",
+                                              LPCM_TRANSCODER_KEY,
+                                              true);
     }
 
     public bool get_enabled (string section) {



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