Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
cdc9281c
Commit
cdc9281c
authored
Feb 14, 2010
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Default to any for --audio-language.
parent
4396c68b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
8 deletions
+14
-8
src/input/es_out.c
src/input/es_out.c
+12
-6
src/libvlc-module.c
src/libvlc-module.c
+2
-2
No files found.
src/input/es_out.c
View file @
cdc9281c
...
@@ -190,7 +190,7 @@ static void EsOutDecodersStopBuffering( es_out_t *out, bool b_forced );
...
@@ -190,7 +190,7 @@ static void EsOutDecodersStopBuffering( es_out_t *out, bool b_forced );
static
char
*
LanguageGetName
(
const
char
*
psz_code
);
static
char
*
LanguageGetName
(
const
char
*
psz_code
);
static
char
*
LanguageGetCode
(
const
char
*
psz_lang
);
static
char
*
LanguageGetCode
(
const
char
*
psz_lang
);
static
char
**
LanguageSplit
(
const
char
*
psz_langs
);
static
char
**
LanguageSplit
(
const
char
*
psz_langs
,
bool
b_default_any
);
static
int
LanguageArrayIndex
(
char
**
ppsz_langs
,
char
*
psz_lang
);
static
int
LanguageArrayIndex
(
char
**
ppsz_langs
,
char
*
psz_lang
);
static
char
*
EsOutProgramGetMetaName
(
es_out_pgrm_t
*
p_pgrm
);
static
char
*
EsOutProgramGetMetaName
(
es_out_pgrm_t
*
p_pgrm
);
...
@@ -269,7 +269,7 @@ es_out_t *input_EsOutNew( input_thread_t *p_input, int i_rate )
...
@@ -269,7 +269,7 @@ es_out_t *input_EsOutNew( input_thread_t *p_input, int i_rate )
char
*
psz_string
;
char
*
psz_string
;
psz_string
=
var_GetString
(
p_input
,
"audio-language"
);
psz_string
=
var_GetString
(
p_input
,
"audio-language"
);
p_sys
->
ppsz_audio_language
=
LanguageSplit
(
psz_string
);
p_sys
->
ppsz_audio_language
=
LanguageSplit
(
psz_string
,
true
);
if
(
p_sys
->
ppsz_audio_language
)
if
(
p_sys
->
ppsz_audio_language
)
{
{
for
(
int
i
=
0
;
p_sys
->
ppsz_audio_language
[
i
];
i
++
)
for
(
int
i
=
0
;
p_sys
->
ppsz_audio_language
[
i
];
i
++
)
...
@@ -279,7 +279,7 @@ es_out_t *input_EsOutNew( input_thread_t *p_input, int i_rate )
...
@@ -279,7 +279,7 @@ es_out_t *input_EsOutNew( input_thread_t *p_input, int i_rate )
free
(
psz_string
);
free
(
psz_string
);
psz_string
=
var_GetString
(
p_input
,
"sub-language"
);
psz_string
=
var_GetString
(
p_input
,
"sub-language"
);
p_sys
->
ppsz_sub_language
=
LanguageSplit
(
psz_string
);
p_sys
->
ppsz_sub_language
=
LanguageSplit
(
psz_string
,
false
);
if
(
p_sys
->
ppsz_sub_language
)
if
(
p_sys
->
ppsz_sub_language
)
{
{
for
(
int
i
=
0
;
p_sys
->
ppsz_sub_language
[
i
];
i
++
)
for
(
int
i
=
0
;
p_sys
->
ppsz_sub_language
[
i
];
i
++
)
...
@@ -2728,7 +2728,7 @@ static char *LanguageGetCode( const char *psz_lang )
...
@@ -2728,7 +2728,7 @@ static char *LanguageGetCode( const char *psz_lang )
return
strdup
(
"??"
);
return
strdup
(
"??"
);
}
}
static
char
**
LanguageSplit
(
const
char
*
psz_langs
)
static
char
**
LanguageSplit
(
const
char
*
psz_langs
,
bool
b_default_any
)
{
{
char
*
psz_dup
;
char
*
psz_dup
;
char
*
psz_parser
;
char
*
psz_parser
;
...
@@ -2751,6 +2751,10 @@ static char **LanguageSplit( const char *psz_langs )
...
@@ -2751,6 +2751,10 @@ static char **LanguageSplit( const char *psz_langs )
{
{
TAB_APPEND
(
i_psz
,
ppsz
,
strdup
(
"any"
)
);
TAB_APPEND
(
i_psz
,
ppsz
,
strdup
(
"any"
)
);
}
}
else
if
(
!
strcmp
(
psz_parser
,
"none"
)
)
{
TAB_APPEND
(
i_psz
,
ppsz
,
strdup
(
"none"
)
);
}
else
else
{
{
psz_code
=
LanguageGetCode
(
psz_parser
);
psz_code
=
LanguageGetCode
(
psz_parser
);
...
@@ -2769,6 +2773,8 @@ static char **LanguageSplit( const char *psz_langs )
...
@@ -2769,6 +2773,8 @@ static char **LanguageSplit( const char *psz_langs )
if
(
i_psz
)
if
(
i_psz
)
{
{
if
(
b_default_any
&&
strcmp
(
ppsz
[
i_psz
-
1
],
"none"
)
)
TAB_APPEND
(
i_psz
,
ppsz
,
strdup
(
"any"
)
);
TAB_APPEND
(
i_psz
,
ppsz
,
NULL
);
TAB_APPEND
(
i_psz
,
ppsz
,
NULL
);
}
}
...
@@ -2786,9 +2792,9 @@ static int LanguageArrayIndex( char **ppsz_langs, char *psz_lang )
...
@@ -2786,9 +2792,9 @@ static int LanguageArrayIndex( char **ppsz_langs, char *psz_lang )
{
{
if
(
!
strcasecmp
(
ppsz_langs
[
i
],
psz_lang
)
||
if
(
!
strcasecmp
(
ppsz_langs
[
i
],
psz_lang
)
||
!
strcasecmp
(
ppsz_langs
[
i
],
"any"
)
)
!
strcasecmp
(
ppsz_langs
[
i
],
"any"
)
)
{
return
i
;
return
i
;
}
if
(
!
strcasecmp
(
ppsz_langs
[
i
],
"none"
)
)
break
;
}
}
return
-
1
;
return
-
1
;
...
...
src/libvlc-module.c
View file @
cdc9281c
...
@@ -701,12 +701,12 @@ static const char *const ppsz_clock_descriptions[] =
...
@@ -701,12 +701,12 @@ static const char *const ppsz_clock_descriptions[] =
#define INPUT_AUDIOTRACK_LANG_TEXT N_("Audio language")
#define INPUT_AUDIOTRACK_LANG_TEXT N_("Audio language")
#define INPUT_AUDIOTRACK_LANG_LONGTEXT N_( \
#define INPUT_AUDIOTRACK_LANG_LONGTEXT N_( \
"Language of the audio track you want to use " \
"Language of the audio track you want to use " \
"(comma separated, two or three letter country code).")
"(comma separated, two or three letter country code
, you may use 'none' to avoid a fallback to another language
).")
#define INPUT_SUBTRACK_LANG_TEXT N_("Subtitle language")
#define INPUT_SUBTRACK_LANG_TEXT N_("Subtitle language")
#define INPUT_SUBTRACK_LANG_LONGTEXT N_( \
#define INPUT_SUBTRACK_LANG_LONGTEXT N_( \
"Language of the subtitle track you want to use " \
"Language of the subtitle track you want to use " \
"(comma separated, two or three letters country code).")
"(comma separated, two or three letters country code
, you may use 'any' as a fallback
).")
/// \todo Document how to find it
/// \todo Document how to find it
#define INPUT_AUDIOTRACK_ID_TEXT N_("Audio track ID")
#define INPUT_AUDIOTRACK_ID_TEXT N_("Audio track ID")
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment