[vlc-devel] [RFC PATCH 01/10] options: add codec-video-hw and codec-audio-hw boolean options

Thomas Guillem thomas at gllm.fr
Thu Apr 21 11:53:35 CEST 2016


---
 src/libvlc-module.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/src/libvlc-module.c b/src/libvlc-module.c
index 5c6a6e0..0bc670b 100644
--- a/src/libvlc-module.c
+++ b/src/libvlc-module.c
@@ -892,6 +892,16 @@ static const char *const ppsz_prefres[] = {
     "before trying the other ones. Only advanced users should " \
     "alter this option as it can break playback of all your streams." )
 
+#define CODEC_VIDEO_HW_TEXT N_("Enable hardware accelerated decoding for video")
+#define CODEC_VIDEO_HW_LONGTEXT N_( \
+    "Choose whether the video stream should be decoded with an hardware " \
+    "decoder (if available)." )
+
+#define CODEC_AUDIO_HW_TEXT N_("Enable hardware accelerated decoding for audio")
+#define CODEC_AUDIO_HW_LONGTEXT N_( \
+    "Choose whether the audio stream should be decoded with an hardware " \
+    "decoder (if available)." )
+
 #define ENCODER_TEXT N_("Preferred encoders list")
 #define ENCODER_LONGTEXT N_( \
     "This allows you to select a list of encoders that VLC will use in " \
@@ -1867,6 +1877,13 @@ vlc_module_begin ()
     add_string( "encoder",  NULL, ENCODER_TEXT,
                 ENCODER_LONGTEXT, true )
 
+    add_bool( "codec-video-hw", true, CODEC_VIDEO_HW_TEXT,
+              CODEC_VIDEO_HW_LONGTEXT, true )
+
+    set_subcategory( SUBCAT_INPUT_ACODEC )
+    add_bool( "codec-audio-hw", true, CODEC_AUDIO_HW_TEXT,
+              CODEC_AUDIO_HW_LONGTEXT, true )
+
     set_subcategory( SUBCAT_INPUT_ACCESS )
     add_category_hint( N_("Input"), INPUT_CAT_LONGTEXT , false )
     add_module( "access", "access", NULL, ACCESS_TEXT, ACCESS_LONGTEXT, true )
-- 
2.8.0.rc3



More information about the vlc-devel mailing list