[vlc-devel] [RFC PATCH 16/17] spdif: move option to codec module

Thomas Guillem thomas at gllm.fr
Mon Jul 25 17:24:05 CEST 2016


---
 modules/codec/spdif.c | 6 ++++++
 src/libvlc-module.c   | 6 ------
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/modules/codec/spdif.c b/modules/codec/spdif.c
index d0968c9..78e892a 100644
--- a/modules/codec/spdif.c
+++ b/modules/codec/spdif.c
@@ -29,12 +29,18 @@
 
 static int  OpenDecoder( vlc_object_t * );
 
+#define SPDIF_TEXT N_("Use S/PDIF when available")
+#define SPDIF_LONGTEXT N_( \
+    "S/PDIF can be used by default when " \
+    "your hardware supports it as well as the audio stream being played.")
+
 vlc_module_begin ()
     set_category( CAT_INPUT )
     set_subcategory( SUBCAT_INPUT_ACODEC )
     set_description( N_("S/PDIF pass-throught decoder") )
     set_capability( "decoder", 100 )
     set_callbacks( OpenDecoder, NULL )
+    add_bool( "spdif", false, SPDIF_TEXT, SPDIF_LONGTEXT, false )
 vlc_module_end ()
 
 static block_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
diff --git a/src/libvlc-module.c b/src/libvlc-module.c
index ee9566d..a278346 100644
--- a/src/libvlc-module.c
+++ b/src/libvlc-module.c
@@ -169,11 +169,6 @@ static const char *ppsz_roles_text[] = {
     "Sets the audio output channels mode that will be used by default " \
     "if your hardware and the audio stream are compatible.")
 
-#define SPDIF_TEXT N_("Use S/PDIF when available")
-#define SPDIF_LONGTEXT N_( \
-    "S/PDIF can be used by default when " \
-    "your hardware supports it as well as the audio stream being played.")
-
 #define FORCE_DOLBY_TEXT N_("Force detection of Dolby Surround")
 #define FORCE_DOLBY_LONGTEXT N_( \
     "Use this when you know your stream is (or is not) encoded with Dolby "\
@@ -1459,7 +1454,6 @@ vlc_module_begin ()
     add_bool( "volume-save", true, VOLUME_SAVE_TEXT, VOLUME_SAVE_TEXT, true )
     add_obsolete_integer( "aout-rate" ) /* since 2.0.0 */
     add_obsolete_bool( "hq-resampling" ) /* since 1.1.8 */
-    add_bool( "spdif", 0, SPDIF_TEXT, SPDIF_LONGTEXT, false )
     add_integer( "force-dolby-surround", 0, FORCE_DOLBY_TEXT,
                  FORCE_DOLBY_LONGTEXT, false )
         change_integer_list( pi_force_dolby_values, ppsz_force_dolby_descriptions )
-- 
2.8.1



More information about the vlc-devel mailing list