diff options
author | Luis de Bethencourt <luis.debethencourt@collabora.com> | 2011-07-12 12:36:05 +0200 |
---|---|---|
committer | Jens Georg <mail@jensge.org> | 2011-08-04 21:48:42 +0200 |
commit | 01850ecdcc3c085240377f3de1883766f1b114a9 (patch) | |
tree | d08bbf0c3efa1830d5a43990e6a75b4488f8e069 | |
parent | cef3f193a6e21356e5a977bc673fcc8adfbe9298 (diff) | |
download | rygel-01850ecdcc3c085240377f3de1883766f1b114a9.tar.gz |
core,doc: Make AAC_ISO_320 transcoder configurable
-rw-r--r-- | data/rygel.conf | 3 | ||||
-rw-r--r-- | doc/man/rygel.conf.xml | 10 | ||||
-rw-r--r-- | doc/man/rygel.xml | 19 | ||||
-rw-r--r-- | src/rygel/rygel-cmdline-config.vala | 11 | ||||
-rw-r--r-- | src/rygel/rygel-configuration.vala | 2 | ||||
-rw-r--r-- | src/rygel/rygel-environment-config.vala | 5 | ||||
-rw-r--r-- | src/rygel/rygel-meta-config.vala | 19 | ||||
-rw-r--r-- | src/rygel/rygel-transcode-manager.vala | 1 | ||||
-rw-r--r-- | src/rygel/rygel-user-config.vala | 5 |
9 files changed, 75 insertions, 0 deletions
diff --git a/data/rygel.conf b/data/rygel.conf index 91fa8621..77a70544 100644 --- a/data/rygel.conf +++ b/data/rygel.conf @@ -26,6 +26,9 @@ enable-mp2ts-transcoder=true # Set it to 'false' if you want to disable WMV transcoding support. enable-wmv-transcoder=true +# Set it to 'false' if you want to disable AAC_ISO_320 transcoding support. +enable-aac-transcoder=true + # Where video files should be saved if allow-upload is true. # Defaults to @VIDEOS@, the standard videos folder (typically ${HOME}/Videos). video-upload-folder=@VIDEOS@ diff --git a/doc/man/rygel.conf.xml b/doc/man/rygel.conf.xml index 1d702606..9036aae2 100644 --- a/doc/man/rygel.conf.xml +++ b/doc/man/rygel.conf.xml @@ -187,6 +187,16 @@ man(1), man(7), http://www.tldp.org/HOWTO/Man-Page/ </varlistentry> <varlistentry> <term> + <option>enable-aac-transcoder</option> + </term> + <listitem> + <para> + Set to <userinput>true</userinput> to enable transcoding to AAC. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> <option>log-level=<replaceable>DOMAIN</replaceable>:<replaceable>LEVEL</replaceable>[,<replaceable>DOMAIN</replaceable>:<replaceable>LEVEL</replaceable>,…]</option> </term> <listitem> diff --git a/doc/man/rygel.xml b/doc/man/rygel.xml index 12afd400..8d42ee9b 100644 --- a/doc/man/rygel.xml +++ b/doc/man/rygel.xml @@ -222,6 +222,17 @@ handling.</para> </varlistentry> <varlistentry> <term> + <option>-a</option> + </term> + <term> + <option>--disable-aac-transcoder</option> + </term> + <listitem> + <para>Disable transcoding to AAC.</para> + </listitem> + </varlistentry> + <varlistentry> + <term> <option>-U</option> </term> <term> @@ -430,6 +441,14 @@ handling.</para> </varlistentry> <varlistentry> <term> + <envar>RYGEL_DISABLE_AAC_TRANS</envar> + </term> + <listitem> + <para>Disable transcoding to AAC format.</para> + </listitem> + </varlistentry> + <varlistentry> + <term> <envar>RYGEL_LOG</envar> </term> <listitem> diff --git a/src/rygel/rygel-cmdline-config.vala b/src/rygel/rygel-cmdline-config.vala index 372c933d..67e0962f 100644 --- a/src/rygel/rygel-cmdline-config.vala +++ b/src/rygel/rygel-cmdline-config.vala @@ -41,6 +41,7 @@ internal class Rygel.CmdlineConfig : GLib.Object, Configuration { private static bool no_mp2ts_trans; private static bool no_lpcm_trans; private static bool no_wmv_trans; + private static bool no_aac_trans; private static bool disallow_upload; private static bool disallow_deletion; @@ -85,6 +86,8 @@ internal class Rygel.CmdlineConfig : GLib.Object, Configuration { "Disable Linear PCM transcoder", null }, { "disable-wmv-transcoder", 'w', 0, OptionArg.NONE, ref no_wmv_trans, "Disable WMV transcoder", null }, + { "disable-aac-transcoder", 'a', 0, OptionArg.NONE, ref no_aac_trans, + "Disable AAC_ISO_320 transcoder", null }, { "disallow-upload", 'U', 0, OptionArg.NONE, ref disallow_upload, "Disallow upload", null }, { "disallow-deletion", 'D', 0, OptionArg.NONE, @@ -209,6 +212,14 @@ internal class Rygel.CmdlineConfig : GLib.Object, Configuration { } } + public bool get_aac_transcoder () throws GLib.Error { + if (!no_aac_trans) { + throw new ConfigurationError.NO_VALUE_SET (_("No value available")); + } else { + return false; + } + } + public bool get_allow_upload () throws GLib.Error { if (!disallow_upload) { throw new ConfigurationError.NO_VALUE_SET (_("No value available")); diff --git a/src/rygel/rygel-configuration.vala b/src/rygel/rygel-configuration.vala index 9f59d7c9..45b45557 100644 --- a/src/rygel/rygel-configuration.vala +++ b/src/rygel/rygel-configuration.vala @@ -47,6 +47,8 @@ public interface Rygel.Configuration : GLib.Object { public abstract bool get_wmv_transcoder () throws GLib.Error; + public abstract bool get_aac_transcoder () throws GLib.Error; + public abstract bool get_allow_upload () throws GLib.Error; public abstract bool get_allow_deletion () throws GLib.Error; diff --git a/src/rygel/rygel-environment-config.vala b/src/rygel/rygel-environment-config.vala index e9695aaa..3f09ae8a 100644 --- a/src/rygel/rygel-environment-config.vala +++ b/src/rygel/rygel-environment-config.vala @@ -41,6 +41,7 @@ internal class Rygel.EnvironmentConfig : GLib.Object, Configuration { private static string MP2TS_TRANSCODING_ENV = DISABLE_PREFIX + "_MP2TS_TRANS"; private static string WMV_TRANSCODING_ENV = DISABLE_PREFIX + "_WMV_TRANS"; + private static string AAC_TRANSCODING_ENV = DISABLE_PREFIX + "_AAC_TRANS"; private static string DISALLOW_UPLOAD_ENV = DISABLE_PREFIX + "_UPLOAD"; private static string DISALLOW_DELETION_ENV = DISABLE_PREFIX + "_DELETION"; private static string LOG_LEVELS_ENV = RYGEL_PREFIX + "_LOG"; @@ -85,6 +86,10 @@ internal class Rygel.EnvironmentConfig : GLib.Object, Configuration { return !this.get_bool_variable (WMV_TRANSCODING_ENV); } + public bool get_aac_transcoder () throws GLib.Error { + return !this.get_bool_variable (AAC_TRANSCODING_ENV); + } + public bool get_lpcm_transcoder () throws GLib.Error { return !this.get_bool_variable (LPCM_TRANSCODING_ENV); } diff --git a/src/rygel/rygel-meta-config.vala b/src/rygel/rygel-meta-config.vala index 507f9d34..d509c633 100644 --- a/src/rygel/rygel-meta-config.vala +++ b/src/rygel/rygel-meta-config.vala @@ -219,6 +219,25 @@ public class Rygel.MetaConfig : GLib.Object, Configuration { return val; } + public bool get_aac_transcoder () throws GLib.Error { + bool val = true; + bool unavailable = true; + + foreach (var config in this.configs) { + try { + val = config.get_aac_transcoder (); + unavailable = false; + break; + } catch (GLib.Error err) {} + } + + if (unavailable) { + throw new ConfigurationError.NO_VALUE_SET (_("No value available")); + } + + return val; + } + public bool get_allow_upload () throws GLib.Error { bool val = true; bool unavailable = true; diff --git a/src/rygel/rygel-transcode-manager.vala b/src/rygel/rygel-transcode-manager.vala index 162ef7ab..29300f95 100644 --- a/src/rygel/rygel-transcode-manager.vala +++ b/src/rygel/rygel-transcode-manager.vala @@ -62,6 +62,7 @@ internal abstract class Rygel.TranscodeManager : GLib.Object { mp3_transcoder = config.get_mp3_transcoder (); mp2ts_transcoder = config.get_mp2ts_transcoder (); wmv_transcoder = config.get_wmv_transcoder (); + aac_transcoder = config.get_aac_transcoder (); } } catch (Error err) {} diff --git a/src/rygel/rygel-user-config.vala b/src/rygel/rygel-user-config.vala index 3829b917..df990445 100644 --- a/src/rygel/rygel-user-config.vala +++ b/src/rygel/rygel-user-config.vala @@ -39,6 +39,7 @@ public class Rygel.UserConfig : GLib.Object, Configuration { public static const string MP2TS_TRANSCODER_KEY = "enable-mp2ts-transcoder"; public static const string LPCM_TRANSCODER_KEY = "enable-lpcm-transcoder"; public static const string WMV_TRANSCODER_KEY = "enable-wmv-transcoder"; + public static const string AAC_TRANSCODER_KEY = "enable-aac-transcoder"; public static const string ALLOW_UPLOAD_KEY = "allow-upload"; public static const string ALLOW_DELETION_KEY = "allow-deletion"; public static const string LOG_LEVELS_KEY = "log-level"; @@ -89,6 +90,10 @@ public class Rygel.UserConfig : GLib.Object, Configuration { return this.get_bool ("general", WMV_TRANSCODER_KEY); } + public bool get_aac_transcoder () throws GLib.Error { + return this.get_bool ("general", AAC_TRANSCODER_KEY); + } + public bool get_allow_upload () throws GLib.Error { return this.get_bool ("general", ALLOW_UPLOAD_KEY); } |