[vlc-devel] [PATCH] dshow: mark some options as safe

Rémi Denis-Courmont remi at remlab.net
Sun Mar 20 19:25:52 CET 2011


Contrary to V4L2, dshow does not extract options from the MRL. So there
i effectively no way to set anything via playlist. This allows the
options that more-or-less correspond to MRL options in V4L2.

Parsing the MRL might make more sense than marking options as safe.
---
 modules/access/dshow/dshow.cpp |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/modules/access/dshow/dshow.cpp b/modules/access/dshow/dshow.cpp
index e024078..604fba5 100644
--- a/modules/access/dshow/dshow.cpp
+++ b/modules/access/dshow/dshow.cpp
@@ -242,12 +242,16 @@ vlc_module_begin ()
         change_action_add( ConfigDevicesCallback, N_("Configure") )
 
     add_string( CFG_PREFIX "size", NULL, SIZE_TEXT, SIZE_LONGTEXT, false)
+        change_safe()
 
     add_string( CFG_PREFIX "aspect-ratio", "4:3", ASPECT_TEXT, ASPECT_LONGTEXT, false)
+        change_safe()
 
     add_string( CFG_PREFIX "chroma", NULL, CHROMA_TEXT, CHROMA_LONGTEXT, true )
+        change_safe()
 
     add_float( CFG_PREFIX "fps", 0.0f, FPS_TEXT, FPS_LONGTEXT, true )
+        change_safe()
 
     add_bool( CFG_PREFIX "config", false, CONFIG_TEXT, CONFIG_LONGTEXT, true )
 
@@ -255,9 +259,11 @@ vlc_module_begin ()
 
     add_integer( CFG_PREFIX "tuner-channel", 0, CHANNEL_TEXT, CHANNEL_LONGTEXT,
                 true )
+        change_safe()
 
     add_integer( CFG_PREFIX "tuner-frequency", 0, TVFREQ_TEXT, TVFREQ_LONGTEXT,
                 true )
+        change_safe()
 
     add_integer( CFG_PREFIX "tuner-country", 0, COUNTRY_TEXT, COUNTRY_LONGTEXT,
                 true )
@@ -265,19 +271,23 @@ vlc_module_begin ()
     add_integer( CFG_PREFIX "tuner-standard", 0, STANDARD_TEXT, STANDARD_LONGTEXT,
                 false )
         change_integer_list( i_standards_list, ppsz_standards_list_text )
+        change_safe()
 
     add_integer( CFG_PREFIX "tuner-input", 0, TUNER_INPUT_TEXT,
                  TUNER_INPUT_LONGTEXT, true )
         change_integer_list( pi_tuner_input, ppsz_tuner_input_text )
+        change_safe()
 
     add_integer( CFG_PREFIX "video-input",  -1, VIDEO_IN_TEXT,
                  VIDEO_IN_LONGTEXT, true )
+        change_safe()
 
     add_integer( CFG_PREFIX "video-output", -1, VIDEO_OUT_TEXT,
                  VIDEO_OUT_LONGTEXT, true )
 
     add_integer( CFG_PREFIX "audio-input",  -1, AUDIO_IN_TEXT,
                  AUDIO_IN_LONGTEXT, true )
+        change_safe()
 
     add_integer( CFG_PREFIX "audio-output", -1, AUDIO_OUT_TEXT,
                  AUDIO_OUT_LONGTEXT, true )
@@ -285,6 +295,7 @@ vlc_module_begin ()
     add_integer( CFG_PREFIX "amtuner-mode", AMTUNER_MODE_TV,
                 AMTUNER_MODE_TEXT, AMTUNER_MODE_LONGTEXT, false)
         change_integer_list( pi_amtuner_mode, ppsz_amtuner_mode_text )
+        change_safe()
 
     add_integer( CFG_PREFIX "audio-channels", 0, AUDIO_CHANNELS_TEXT,
                  AUDIO_CHANNELS_LONGTEXT, true )
-- 
1.7.4.1




More information about the vlc-devel mailing list