[vlc-commits] Added an option for DVD/BluRay menu language
Petri Hintukainen
git at videolan.org
Fri Aug 16 13:26:11 CEST 2013
vlc | branch: master | Petri Hintukainen <phintuka at users.sourceforge.net> | Mon Aug 12 10:19:49 2013 +0300| [5c805b82e6f67af567ea73ed740c567d07327a33] | committer: Rafaël Carré
Added an option for DVD/BluRay menu language
Signed-off-by: Rafaël Carré <funman at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5c805b82e6f67af567ea73ed740c567d07327a33
---
modules/access/dvdnav.c | 5 ++---
src/input/var.c | 2 ++
src/libvlc-module.c | 9 +++++++++
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/modules/access/dvdnav.c b/modules/access/dvdnav.c
index 13aaa3d..4c6eccf 100644
--- a/modules/access/dvdnav.c
+++ b/modules/access/dvdnav.c
@@ -282,9 +282,8 @@ static int Open( vlc_object_t *p_this )
msg_Warn( p_demux, "cannot set PGC positioning flag" );
}
- /* Set menu language
- * XXX A menu-language may be better than sub-language */
- psz_code = DemuxGetLanguageCode( p_demux, "sub-language" );
+ /* Set menu language */
+ psz_code = DemuxGetLanguageCode( p_demux, "menu-language" );
if( dvdnav_menu_language_select( p_sys->dvdnav, psz_code ) !=
DVDNAV_STATUS_OK )
{
diff --git a/src/input/var.c b/src/input/var.c
index 3e3d112..6ec28f0 100644
--- a/src/input/var.c
+++ b/src/input/var.c
@@ -429,6 +429,8 @@ void input_ConfigVarInit ( input_thread_t *p_input )
VLC_VAR_STRING|VLC_VAR_DOINHERIT );
var_Create( p_input, "sub-language",
VLC_VAR_STRING|VLC_VAR_DOINHERIT );
+ var_Create( p_input, "menu-language",
+ VLC_VAR_STRING|VLC_VAR_DOINHERIT );
var_Create( p_input, "audio-track-id",
VLC_VAR_INTEGER|VLC_VAR_DOINHERIT );
diff --git a/src/libvlc-module.c b/src/libvlc-module.c
index 94faf8e..691f1e3 100644
--- a/src/libvlc-module.c
+++ b/src/libvlc-module.c
@@ -595,6 +595,11 @@ static const char *const ppsz_clock_descriptions[] =
"Language of the subtitle track you want to use " \
"(comma separated, two or three letters country code, you may use 'any' as a fallback).")
+#define INPUT_MENUTRACK_LANG_TEXT N_("Menu language")
+#define INPUT_MENUTRACK_LANG_LONGTEXT N_( \
+ "Language of the menus you want to use with DVD/BluRay " \
+ "(comma separated, two or three letters country code, you may use 'any' as a fallback).")
+
/// \todo Document how to find it
#define INPUT_AUDIOTRACK_ID_TEXT N_("Audio track ID")
#define INPUT_AUDIOTRACK_ID_LONGTEXT N_( \
@@ -1688,6 +1693,10 @@ vlc_module_begin ()
INPUT_SUBTRACK_LANG_TEXT, INPUT_SUBTRACK_LANG_LONGTEXT,
false )
change_safe ()
+ add_string( "menu-language", "",
+ INPUT_MENUTRACK_LANG_TEXT, INPUT_MENUTRACK_LANG_LONGTEXT,
+ false )
+ change_safe ()
add_integer( "audio-track-id", -1, INPUT_AUDIOTRACK_ID_TEXT,
INPUT_AUDIOTRACK_ID_LONGTEXT, true )
change_safe ()
More information about the vlc-commits
mailing list