diff options
-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 77a70544..3b9fa65c 100644 --- a/data/rygel.conf +++ b/data/rygel.conf @@ -29,6 +29,9 @@ enable-wmv-transcoder=true # Set it to 'false' if you want to disable AAC_ISO_320 transcoding support. enable-aac-transcoder=true +# Set it to 'false' if you want to disable AVC_MP4 transcoding support. +enable-avc-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 9036aae2..a5c33942 100644 --- a/doc/man/rygel.conf.xml +++ b/doc/man/rygel.conf.xml @@ -197,6 +197,16 @@ man(1), man(7), http://www.tldp.org/HOWTO/Man-Page/ </varlistentry> <varlistentry> <term> + <option>enable-avc-transcoder</option> + </term> + <listitem> + <para> + Set to <userinput>true</userinput> to enable transcoding to AVC. + </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 8d42ee9b..a37e8002 100644 --- a/doc/man/rygel.xml +++ b/doc/man/rygel.xml @@ -233,6 +233,17 @@ handling.</para> </varlistentry> <varlistentry> <term> + <option>-z</option> + </term> + <term> + <option>--disable-avc-transcoder</option> + </term> + <listitem> + <para>Disable transcoding to AVC.</para> + </listitem> + </varlistentry> + <varlistentry> + <term> <option>-U</option> </term> <term> @@ -449,6 +460,14 @@ handling.</para> </varlistentry> <varlistentry> <term> + <envar>RYGEL_DISABLE_AVC_TRANS</envar> + </term> + <listitem> + <para>Disable transcoding to AVC 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 67e0962f..ba53c734 100644 --- a/src/rygel/rygel-cmdline-config.vala +++ b/src/rygel/rygel-cmdline-config.vala @@ -42,6 +42,7 @@ internal class Rygel.CmdlineConfig : GLib.Object, Configuration { private static bool no_lpcm_trans; private static bool no_wmv_trans; private static bool no_aac_trans; + private static bool no_avc_trans; private static bool disallow_upload; private static bool disallow_deletion; @@ -88,6 +89,8 @@ internal class Rygel.CmdlineConfig : GLib.Object, Configuration { "Disable WMV transcoder", null }, { "disable-aac-transcoder", 'a', 0, OptionArg.NONE, ref no_aac_trans, "Disable AAC_ISO_320 transcoder", null }, + { "disable-avc-transcoder", 'z', 0, OptionArg.NONE, ref no_avc_trans, + "Disable AVC_MP4 transcoder", null }, { "disallow-upload", 'U', 0, OptionArg.NONE, ref disallow_upload, "Disallow upload", null }, { "disallow-deletion", 'D', 0, OptionArg.NONE, @@ -220,6 +223,14 @@ internal class Rygel.CmdlineConfig : GLib.Object, Configuration { } } + public bool get_avc_transcoder () throws GLib.Error { + if (!no_avc_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 45b45557..ca112658 100644 --- a/src/rygel/rygel-configuration.vala +++ b/src/rygel/rygel-configuration.vala @@ -49,6 +49,8 @@ public interface Rygel.Configuration : GLib.Object { public abstract bool get_aac_transcoder () throws GLib.Error; + public abstract bool get_avc_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 3f09ae8a..c2c8bffa 100644 --- a/src/rygel/rygel-environment-config.vala +++ b/src/rygel/rygel-environment-config.vala @@ -42,6 +42,7 @@ internal class Rygel.EnvironmentConfig : GLib.Object, Configuration { "_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 AVC_TRANSCODING_ENV = DISABLE_PREFIX + "_AVC_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"; @@ -90,6 +91,10 @@ internal class Rygel.EnvironmentConfig : GLib.Object, Configuration { return !this.get_bool_variable (AAC_TRANSCODING_ENV); } + public bool get_avc_transcoder () throws GLib.Error { + return !this.get_bool_variable (AVC_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 d509c633..762c036a 100644 --- a/src/rygel/rygel-meta-config.vala +++ b/src/rygel/rygel-meta-config.vala @@ -238,6 +238,25 @@ public class Rygel.MetaConfig : GLib.Object, Configuration { return val; } + public bool get_avc_transcoder () throws GLib.Error { + bool val = true; + bool unavailable = true; + + foreach (var config in this.configs) { + try { + val = config.get_avc_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 29300f95..47ac9e6c 100644 --- a/src/rygel/rygel-transcode-manager.vala +++ b/src/rygel/rygel-transcode-manager.vala @@ -63,6 +63,7 @@ internal abstract class Rygel.TranscodeManager : GLib.Object { mp2ts_transcoder = config.get_mp2ts_transcoder (); wmv_transcoder = config.get_wmv_transcoder (); aac_transcoder = config.get_aac_transcoder (); + avc_transcoder = config.get_avc_transcoder (); } } catch (Error err) {} diff --git a/src/rygel/rygel-user-config.vala b/src/rygel/rygel-user-config.vala index df990445..e7e867c8 100644 --- a/src/rygel/rygel-user-config.vala +++ b/src/rygel/rygel-user-config.vala @@ -40,6 +40,7 @@ public class Rygel.UserConfig : GLib.Object, Configuration { 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 AVC_TRANSCODER_KEY = "enable-avc-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"; @@ -94,6 +95,10 @@ public class Rygel.UserConfig : GLib.Object, Configuration { return this.get_bool ("general", AAC_TRANSCODER_KEY); } + public bool get_avc_transcoder () throws GLib.Error { + return this.get_bool ("general", AVC_TRANSCODER_KEY); + } + public bool get_allow_upload () throws GLib.Error { return this.get_bool ("general", ALLOW_UPLOAD_KEY); } |