[rygel] core,doc: Make AAC_ISO_320 transcoder configurable
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] core,doc: Make AAC_ISO_320 transcoder configurable
- Date: Thu, 4 Aug 2011 19:59:56 +0000 (UTC)
commit 01850ecdcc3c085240377f3de1883766f1b114a9
Author: Luis de Bethencourt <luis debethencourt collabora com>
Date: Tue Jul 12 12:36:05 2011 +0200
core,doc: Make AAC_ISO_320 transcoder configurable
data/rygel.conf | 3 +++
doc/man/rygel.conf.xml | 10 ++++++++++
doc/man/rygel.xml | 19 +++++++++++++++++++
src/rygel/rygel-cmdline-config.vala | 11 +++++++++++
src/rygel/rygel-configuration.vala | 2 ++
src/rygel/rygel-environment-config.vala | 5 +++++
src/rygel/rygel-meta-config.vala | 19 +++++++++++++++++++
src/rygel/rygel-transcode-manager.vala | 1 +
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 91fa862..77a7054 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 1d70260..9036aae 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 12afd40..8d42ee9 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 372c933..67e0962 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 9f59d7c..45b4555 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 e9695aa..3f09ae8 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 507f9d3..d509c63 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 162ef7a..29300f9 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 3829b91..df99044 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]