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
2d0aee25
Commit
2d0aee25
authored
Oct 11, 2010
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lua extensions: use an enum and remove demuy declaration.
parent
75acda83
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
16 deletions
+15
-16
modules/misc/lua/extension.h
modules/misc/lua/extension.h
+13
-14
modules/misc/lua/extension_thread.c
modules/misc/lua/extension_thread.c
+2
-2
No files found.
modules/misc/lua/extension.h
View file @
2d0aee25
...
...
@@ -27,19 +27,18 @@
#include <vlc_extensions.h>
#include <vlc_arrays.h>
///< Array of extension_t
TYPEDEF_ARRAY
(
extension_t
,
array_extension_t
);
/* List of available commands */
#define CMD_ACTIVATE 1
#define CMD_DEACTIVATE 2
#define CMD_TRIGGERMENU 3
/* Arg1 = int*, pointing to id to trigger. free */
#define CMD_CLICK 4
/* Arg1 = extension_widget_t* */
#define CMD_CLOSE 5
#define CMD_SET_INPUT 6
/* No arg. Just signal current input changed */
#define CMD_UPDATE_META 7
/* No arg. Just signal current input item meta
* changed */
#define CMD_PLAYING_CHANGED 8
/* Arg1 = int*, New playing status */
typedef
enum
{
CMD_ACTIVATE
=
1
,
CMD_DEACTIVATE
,
CMD_TRIGGERMENU
,
/* Arg1 = int*, pointing to id to trigger. free */
CMD_CLICK
,
/* Arg1 = extension_widget_t* */
CMD_CLOSE
,
CMD_SET_INPUT
,
/* No arg. Just signal current input changed */
CMD_UPDATE_META
,
/* No arg. Just signal current input item meta changed */
CMD_PLAYING_CHANGED
/* Arg1 = int*, New playing status */
}
command_type_e
;
//Data types
typedef
enum
...
...
@@ -83,7 +82,7 @@ struct extension_sys_t
/* Queue of commands to execute */
struct
command_t
{
int
i_command
;
command_type_e
i_command
;
void
*
data
[
10
];
///< Optional void* arguments
struct
command_t
*
next
;
///< Next command
}
*
command
;
...
...
@@ -96,7 +95,7 @@ int Activate( extensions_manager_t *p_mgr, extension_t * );
bool
IsActivated
(
extensions_manager_t
*
p_mgr
,
extension_t
*
);
int
Deactivate
(
extensions_manager_t
*
p_mgr
,
extension_t
*
);
void
WaitForDeactivation
(
extension_t
*
p_ext
);
int
__PushCommand
(
extension_t
*
ext
,
bool
unique
,
int
cmd
,
va_list
options
);
int
__PushCommand
(
extension_t
*
ext
,
bool
unique
,
command_type_e
cmd
,
va_list
options
);
static
inline
int
PushCommand
(
extension_t
*
ext
,
int
cmd
,
...
)
{
va_list
args
;
...
...
modules/misc/lua/extension_thread.c
View file @
2d0aee25
...
...
@@ -207,7 +207,7 @@ void WaitForDeactivation( extension_t *p_ext )
}
/** Push a UI command */
int
__PushCommand
(
extension_t
*
p_ext
,
bool
b_unique
,
int
i_command
,
int
__PushCommand
(
extension_t
*
p_ext
,
bool
b_unique
,
command_type_e
i_command
,
va_list
args
)
{
vlc_mutex_lock
(
&
p_ext
->
p_sys
->
command_lock
);
...
...
@@ -319,7 +319,7 @@ static void* Run( void *data )
{
if
(
lua_ExecuteFunction
(
p_mgr
,
p_ext
,
"activate"
,
LUA_END
)
<
0
)
{
msg_
Dbg
(
p_mgr
,
"Could not activate extension!"
);
msg_
Err
(
p_mgr
,
"Could not activate extension!"
);
Deactivate
(
p_mgr
,
p_ext
);
cmd
=
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