Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
788d2256
Commit
788d2256
authored
Jun 16, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lua: extension: reindent
parent
7031f81c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
67 additions
and
70 deletions
+67
-70
modules/lua/extension_thread.c
modules/lua/extension_thread.c
+67
-70
No files found.
modules/lua/extension_thread.c
View file @
788d2256
...
...
@@ -340,95 +340,92 @@ static void* Run( void *data )
vlc_restorecancel
(
cancel
);
/* Run command */
if
(
true
)
if
(
LockExtension
(
p_ext
)
)
{
if
(
LockExtension
(
p_ext
)
)
mutex_cleanup_push
(
&
p_ext
->
p_sys
->
running_lock
);
switch
(
cmd
->
i_command
)
{
mutex_cleanup_push
(
&
p_ext
->
p_sys
->
running_lock
);
switch
(
cmd
->
i_command
)
case
CMD_ACTIVATE
:
{
case
CMD_ACTIVATE
:
if
(
lua_ExecuteFunction
(
p_mgr
,
p_ext
,
"activate"
,
LUA_END
)
<
0
)
{
if
(
lua_ExecuteFunction
(
p_mgr
,
p_ext
,
"activate"
,
LUA_END
)
<
0
)
{
msg_Err
(
p_mgr
,
"Could not activate extension!"
);
Deactivate
(
p_mgr
,
p_ext
);
}
break
;
msg_Err
(
p_mgr
,
"Could not activate extension!"
);
Deactivate
(
p_mgr
,
p_ext
);
}
break
;
}
case
CMD_DEACTIVATE
:
case
CMD_DEACTIVATE
:
{
msg_Dbg
(
p_mgr
,
"Deactivating '%s'"
,
p_ext
->
psz_title
);
if
(
lua_ExtensionDeactivate
(
p_mgr
,
p_ext
)
<
0
)
{
msg_Dbg
(
p_mgr
,
"Deactivating '%s'"
,
p_ext
->
psz_title
);
if
(
lua_ExtensionDeactivate
(
p_mgr
,
p_ext
)
<
0
)
{
msg_Warn
(
p_mgr
,
"Extension '%s' did not deactivate properly"
,
p_ext
->
psz_title
);
}
p_ext
->
p_sys
->
b_exiting
=
true
;
RemoveActivated
(
p_mgr
,
p_ext
);
break
;
msg_Warn
(
p_mgr
,
"Extension '%s' did not deactivate properly"
,
p_ext
->
psz_title
);
}
p_ext
->
p_sys
->
b_exiting
=
true
;
RemoveActivated
(
p_mgr
,
p_ext
);
break
;
}
case
CMD_CLOSE
:
{
lua_ExecuteFunction
(
p_mgr
,
p_ext
,
"close"
,
LUA_END
);
break
;
}
case
CMD_CLOSE
:
{
lua_ExecuteFunction
(
p_mgr
,
p_ext
,
"close"
,
LUA_END
);
break
;
}
case
CMD_CLICK
:
case
CMD_CLICK
:
{
extension_widget_t
*
p_widget
=
cmd
->
data
[
0
];
assert
(
p_widget
);
msg_Dbg
(
p_mgr
,
"Clicking '%s': '%s'"
,
p_ext
->
psz_name
,
p_widget
->
psz_text
);
if
(
!
lua_ExtensionWidgetClick
(
p_mgr
,
p_ext
,
p_widget
)
<
0
)
{
extension_widget_t
*
p_widget
=
cmd
->
data
[
0
];
assert
(
p_widget
);
msg_Dbg
(
p_mgr
,
"Clicking '%s': '%s'"
,
p_ext
->
psz_name
,
p_widget
->
psz_text
);
if
(
!
lua_ExtensionWidgetClick
(
p_mgr
,
p_ext
,
p_widget
)
<
0
)
{
msg_Warn
(
p_mgr
,
"Could not translate click"
);
}
break
;
msg_Warn
(
p_mgr
,
"Could not translate click"
);
}
break
;
}
case
CMD_TRIGGERMENU
:
{
int
*
pi_id
=
cmd
->
data
[
0
];
assert
(
pi_id
);
msg_Dbg
(
p_mgr
,
"Trigger menu %d of '%s'"
,
*
pi_id
,
p_ext
->
psz_name
);
lua_ExtensionTriggerMenu
(
p_mgr
,
p_ext
,
*
pi_id
);
break
;
}
case
CMD_TRIGGERMENU
:
{
int
*
pi_id
=
cmd
->
data
[
0
];
assert
(
pi_id
);
msg_Dbg
(
p_mgr
,
"Trigger menu %d of '%s'"
,
*
pi_id
,
p_ext
->
psz_name
);
lua_ExtensionTriggerMenu
(
p_mgr
,
p_ext
,
*
pi_id
);
break
;
}
case
CMD_SET_INPUT
:
{
lua_ExecuteFunction
(
p_mgr
,
p_ext
,
"input_changed"
,
LUA_END
);
break
;
}
case
CMD_SET_INPUT
:
{
lua_ExecuteFunction
(
p_mgr
,
p_ext
,
"input_changed"
,
LUA_END
);
break
;
}
case
CMD_UPDATE_META
:
{
lua_ExecuteFunction
(
p_mgr
,
p_ext
,
"meta_changed"
,
LUA_END
);
break
;
}
case
CMD_UPDATE_META
:
{
lua_ExecuteFunction
(
p_mgr
,
p_ext
,
"meta_changed"
,
LUA_END
);
break
;
}
case
CMD_PLAYING_CHANGED
:
{
lua_ExecuteFunction
(
p_mgr
,
p_ext
,
"playing_changed"
,
LUA_NUM
,
*
((
int
*
)
cmd
->
data
[
0
]),
LUA_END
);
break
;
}
case
CMD_PLAYING_CHANGED
:
{
lua_ExecuteFunction
(
p_mgr
,
p_ext
,
"playing_changed"
,
LUA_NUM
,
*
((
int
*
)
cmd
->
data
[
0
]),
LUA_END
);
break
;
}
default:
{
msg_Dbg
(
p_mgr
,
"Unknown command in extension command queue: %d"
,
cmd
->
i_command
);
break
;
}
default:
{
msg_Dbg
(
p_mgr
,
"Unknown command in extension command queue: %d"
,
cmd
->
i_command
);
break
;
}
vlc_cleanup_pop
();
UnlockExtension
(
p_ext
);
}
vlc_cleanup_pop
();
UnlockExtension
(
p_ext
);
}
FreeCommands
(
cmd
);
...
...
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