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
16d88109
Commit
16d88109
authored
Nov 11, 2009
by
Jean-Philippe André
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lua: new function vlc.input.add_subtitle
Load a subtitles stream given its URI
parent
72be12b3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
modules/misc/lua/libs/input.c
modules/misc/lua/libs/input.c
+14
-0
No files found.
modules/misc/lua/libs/input.c
View file @
16d88109
...
...
@@ -137,6 +137,19 @@ static int vlclua_input_stats( lua_State *L )
return
1
;
}
static
int
vlclua_input_add_subtitle
(
lua_State
*
L
)
{
input_thread_t
*
p_input
=
vlclua_get_input_internal
(
L
);
if
(
!
p_input
)
return
luaL_error
(
L
,
"can't add subtitle: no current input"
);
if
(
!
lua_isstring
(
L
,
1
)
)
return
luaL_error
(
L
,
"vlc.input.add_subtitle() usage: (url)"
);
const
char
*
psz_url
=
luaL_checkstring
(
L
,
1
);
input_AddSubtitle
(
p_input
,
psz_url
,
false
);
vlc_object_release
(
p_input
);
return
1
;
}
/*****************************************************************************
*
*****************************************************************************/
...
...
@@ -145,6 +158,7 @@ static const luaL_Reg vlclua_input_reg[] = {
{
"is_playing"
,
vlclua_is_playing
},
{
"get_title"
,
vlclua_get_title
},
{
"stats"
,
vlclua_input_stats
},
{
"add_subtitle"
,
vlclua_input_add_subtitle
},
{
NULL
,
NULL
}
};
...
...
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