Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
0ad9871b
Commit
0ad9871b
authored
Jan 23, 2010
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added sub-description to override a subtitle track description.
parent
114bcc9e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
modules/demux/subtitle.c
modules/demux/subtitle.c
+10
-0
No files found.
modules/demux/subtitle.c
View file @
0ad9871b
...
...
@@ -58,6 +58,8 @@ static void Close( vlc_object_t *p_this );
"\"sami\", \"dvdsubtitle\", \"mpl2\", \"aqt\", \"pjs\", "\
"\"mpsub\", \"jacosub\", \"psb\", \"realtext\", \"dks\", \"subviewer1\", " \
" and \"auto\" (meaning autodetection, this should always work).")
#define SUB_DESCRIPTION_LONGTEXT \
N_("Override the default track description.")
static
const
char
*
const
ppsz_sub_type
[]
=
{
...
...
@@ -82,6 +84,8 @@ vlc_module_begin ()
add_string
(
"sub-type"
,
"auto"
,
NULL
,
N_
(
"Subtitles format"
),
SUB_TYPE_LONGTEXT
,
true
)
change_string_list
(
ppsz_sub_type
,
NULL
,
NULL
)
add_string
(
"sub-description"
,
NULL
,
NULL
,
N_
(
"Subtitles description"
),
SUB_DESCRIPTION_LONGTEXT
,
true
)
set_callbacks
(
Open
,
Close
)
add_shortcut
(
"subtitle"
)
...
...
@@ -520,12 +524,18 @@ static int Open ( vlc_object_t *p_this )
{
es_format_Init
(
&
fmt
,
SPU_ES
,
VLC_CODEC_SUBT
);
}
char
*
psz_description
=
var_InheritString
(
p_demux
,
"sub-description"
);
if
(
psz_description
&&
*
psz_description
)
fmt
.
psz_description
=
psz_description
;
else
free
(
psz_description
);
if
(
p_sys
->
psz_header
!=
NULL
)
{
fmt
.
i_extra
=
strlen
(
p_sys
->
psz_header
)
+
1
;
fmt
.
p_extra
=
strdup
(
p_sys
->
psz_header
);
}
p_sys
->
es
=
es_out_Add
(
p_demux
->
out
,
&
fmt
);
es_format_Clean
(
&
fmt
);
return
VLC_SUCCESS
;
}
...
...
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