Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
e8e17989
Commit
e8e17989
authored
Jan 19, 2009
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use config chain in lua intf module.
parent
b7ccccfb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
modules/misc/lua/intf.c
modules/misc/lua/intf.c
+6
-3
share/lua/intf/dummy.lua
share/lua/intf/dummy.lua
+2
-2
No files found.
modules/misc/lua/intf.c
View file @
e8e17989
...
@@ -52,6 +52,8 @@
...
@@ -52,6 +52,8 @@
*****************************************************************************/
*****************************************************************************/
static
void
*
Run
(
void
*
);
static
void
*
Run
(
void
*
);
static
const
char
*
const
ppsz_intf_options
[]
=
{
"intf"
,
"config"
,
NULL
};
/*****************************************************************************
/*****************************************************************************
*
*
*****************************************************************************/
*****************************************************************************/
...
@@ -126,9 +128,9 @@ static char *GetModuleName( intf_thread_t *p_intf )
...
@@ -126,9 +128,9 @@ static char *GetModuleName( intf_thread_t *p_intf )
{
{
int
i
;
int
i
;
const
char
*
psz_intf
;
const
char
*
psz_intf
;
if
(
*
p_intf
->
psz_intf
==
'$'
)
/*
if( *p_intf->psz_intf == '$' )
psz_intf = var_GetString( p_intf, p_intf->psz_intf+1 );
psz_intf = var_GetString( p_intf, p_intf->psz_intf+1 );
else
else
*/
psz_intf
=
p_intf
->
psz_intf
;
psz_intf
=
p_intf
->
psz_intf
;
for
(
i
=
0
;
pp_shortcuts
[
i
].
psz_name
;
i
++
)
for
(
i
=
0
;
pp_shortcuts
[
i
].
psz_name
;
i
++
)
{
{
...
@@ -136,7 +138,7 @@ static char *GetModuleName( intf_thread_t *p_intf )
...
@@ -136,7 +138,7 @@ static char *GetModuleName( intf_thread_t *p_intf )
return
strdup
(
pp_shortcuts
[
i
].
psz_name
);
return
strdup
(
pp_shortcuts
[
i
].
psz_name
);
}
}
return
config_GetPsz
(
p_intf
,
"lua-intf"
);
return
var_GetString
(
p_intf
,
"lua-intf"
);
}
}
static
const
luaL_Reg
p_reg
[]
=
{
{
NULL
,
NULL
}
};
static
const
luaL_Reg
p_reg
[]
=
{
{
NULL
,
NULL
}
};
...
@@ -147,6 +149,7 @@ int Open_LuaIntf( vlc_object_t *p_this )
...
@@ -147,6 +149,7 @@ int Open_LuaIntf( vlc_object_t *p_this )
intf_sys_t
*
p_sys
;
intf_sys_t
*
p_sys
;
lua_State
*
L
;
lua_State
*
L
;
config_ChainParse
(
p_intf
,
"lua-"
,
ppsz_intf_options
,
p_intf
->
p_cfg
);
char
*
psz_name
=
GetModuleName
(
p_intf
);
char
*
psz_name
=
GetModuleName
(
p_intf
);
const
char
*
psz_config
;
const
char
*
psz_config
;
bool
b_config_set
=
false
;
bool
b_config_set
=
false
;
...
...
share/lua/intf/dummy.lua
View file @
e8e17989
...
@@ -4,8 +4,8 @@ msg = [[
...
@@ -4,8 +4,8 @@ msg = [[
This is the `dummy' VLC Lua interface module.
This is the `dummy' VLC Lua interface module.
Please specify a VLC Lua interface to load with the --lua-intf option.
Please specify a VLC Lua interface to load with the --lua-intf option.
VLC Lua interface modules include: `rc', `telnet' and `http'.
VLC Lua interface modules include: `rc', `telnet' and `http'.
For example: vlc -I lua --lua-intf rc
]]
For example: vlc -I lua --lua-intf rc
--
You can also use the alternate syntax: vlc -I "lua{intf=rc}"]]
You can also use the alternate syntax: vlc -I "lua{intf=rc}"]]
for
line
in
string.gmatch
(
msg
,
"([^\n]+)\n*"
)
do
for
line
in
string.gmatch
(
msg
,
"([^\n]+)\n*"
)
do
vlc
.
msg
.
err
(
line
)
vlc
.
msg
.
err
(
line
)
...
...
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