[vlc-commits] libvlc: add media role option

Rémi Denis-Courmont git at videolan.org
Sun Jun 5 11:27:36 CEST 2016


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Jun  4 17:26:03 2016 +0300| [657c4b30ae80301f29648b38af3c2cf19dd8095d] | committer: Rémi Denis-Courmont

libvlc: add media role option

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=657c4b30ae80301f29648b38af3c2cf19dd8095d
---

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

diff --git a/src/libvlc-module.c b/src/libvlc-module.c
index 74fc7e5..9ba4980 100644
--- a/src/libvlc-module.c
+++ b/src/libvlc-module.c
@@ -124,10 +124,23 @@ static const char *const ppsz_snap_formats[] =
     "The default behavior is to automatically select the best method " \
     "available.")
 
+#define ROLE_TEXT N_("Media role")
+#define ROLE_LONGTEXT N_("Media (player) role for operating system policy.")
+
 #define AUDIO_TEXT N_("Enable audio")
 #define AUDIO_LONGTEXT N_( \
     "You can completely disable the audio output. The audio " \
     "decoding stage will not take place, thus saving some processing power.")
+static const char *ppsz_roles[] = {
+     "video", "music", "communication", "game",
+     "notification", "animation", "production",
+     "accessibility", "test",
+};
+static const char *ppsz_roles_text[] = {
+    N_("Video"), N_("Music"), N_("Communication"), N_("Game"),
+    N_("Notification"),  N_("Animation"), N_("Production"),
+    N_("Accessibility"), N_("Test"),
+};
 
 #define GAIN_TEXT N_("Audio gain")
 #define GAIN_LONGTEXT N_( \
@@ -1466,6 +1479,9 @@ vlc_module_begin ()
     add_module( "aout", "audio output", NULL, AOUT_TEXT, AOUT_LONGTEXT,
                 true )
         change_short('A')
+    add_string( "role", "video", ROLE_TEXT, ROLE_LONGTEXT, true )
+        change_string_list( ppsz_roles, ppsz_roles_text )
+
     set_subcategory( SUBCAT_AUDIO_AFILTER )
     add_module_list( "audio-filter", "audio filter", NULL,
                      AUDIO_FILTER_TEXT, AUDIO_FILTER_LONGTEXT, false )



More information about the vlc-commits mailing list