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
17746f42
Commit
17746f42
authored
Nov 08, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lua: kill relocations
parent
6409fdbc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
13 deletions
+8
-13
modules/lua/extension.c
modules/lua/extension.c
+8
-13
No files found.
modules/lua/extension.c
View file @
17746f42
...
...
@@ -49,19 +49,17 @@ static const luaL_Reg p_reg[] =
* Extensions capabilities
* Note: #define and ppsz_capabilities must be in sync
*/
static
const
char
const
caps
[][
20
]
=
{
#define EXT_HAS_MENU (1 << 0) ///< Hook: menu
#define EXT_TRIGGER_ONLY (1 << 1) ///< Hook: trigger. Not activable
#define EXT_INPUT_LISTENER (1 << 2) ///< Hook: input_changed
#define EXT_META_LISTENER (1 << 3) ///< Hook: meta_changed
#define EXT_PLAYING_LISTENER (1 << 4) ///< Hook: status_changed
static
const
char
*
const
ppsz_capabilities
[]
=
{
"menu"
,
#define EXT_TRIGGER_ONLY (1 << 1) ///< Hook: trigger. Not activable
"trigger"
,
#define EXT_INPUT_LISTENER (1 << 2) ///< Hook: input_changed
"input-listener"
,
#define EXT_META_LISTENER (1 << 3) ///< Hook: meta_changed
"meta-listener"
,
#define EXT_PLAYING_LISTENER (1 << 4) ///< Hook: status_changed
"playing-listener"
,
NULL
};
#define WATCH_TIMER_PERIOD (10 * CLOCK_FREQ) ///< 10s period for the timer
...
...
@@ -381,17 +379,14 @@ int ScanLuaCallback( vlc_object_t *p_this, const char *psz_filename,
{
/* Key is at index -2 and value at index -1. Discard key */
const
char
*
psz_cap
=
luaL_checkstring
(
L
,
-
1
);
int
i_cap
=
0
;
bool
b_ok
=
false
;
/* Find this capability's flag */
for
(
const
char
*
iter
=
*
ppsz_capabilities
;
iter
!=
NULL
;
iter
=
ppsz_capabilities
[
++
i_cap
])
for
(
size_t
i
=
0
;
i
<
sizeof
(
caps
)
/
sizeof
(
caps
[
0
]);
i
++
)
{
if
(
!
strcmp
(
iter
,
psz_cap
)
)
if
(
!
strcmp
(
caps
[
i
]
,
psz_cap
)
)
{
/* Flag it! */
p_ext
->
p_sys
->
i_capabilities
|=
1
<<
i
_cap
;
p_ext
->
p_sys
->
i_capabilities
|=
1
<<
i
;
b_ok
=
true
;
break
;
}
...
...
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