Steve Lhomme
5363279805
remove the $Id$ in the source code
7 years ago
Steve Lhomme
84740adccb
modules: use VLC_TIMER_FIRE_ONCE instead of 0
The intent is more readable this way
8 years ago
Steve Lhomme
543e9fb997
modules: use vlc_timer_disarm() instead of a call with 0 delay
The intent is more readable this way and can be reworked later.
8 years ago
Hugo Beauzée-Luyssen
bd8d39bc69
lua: Mandate KillExtension to be called with command_lock locked
Otherwise the caller always unlocks the lock, only to have it acquire
again by KillExtension.
9 years ago
Hugo Beauzée-Luyssen
6e17f399bb
lua: Remove dubious LockExtension/UnlockExtension
9 years ago
Hugo Beauzée-Luyssen
b56c999353
lua: Use QueueDeactivateCommand when suitable
9 years ago
Hugo Beauzée-Luyssen
6e266f5e8f
lua: Don't attempt to deactivate the extension when killing it.
As the extension thread is holding the lock, and stuck while the lua
function is executing, when a timeout is detected, there's no way to
acquire the lock, not to execute the deactivate function in a thread
safe manner.
9 years ago
Hugo Beauzée-Luyssen
bb210fea61
lua: Split CMD_DEACTIVATE generation/queuing out of Deactivate
9 years ago
Hugo Beauzée-Luyssen
6a627ce841
lua: Properly support reactivation of the extension
9 years ago
Hugo Beauzée-Luyssen
04da2f7345
lua: Simplify activated extension detection
9 years ago
Hugo Beauzée-Luyssen
17648212c5
lua: Don't deactivate the extension when failing to create its thread
This is a noop since b_exiting is true, but even if it wasn't, there's
no thread to pick up the command anyway.
9 years ago
Hugo Beauzée-Luyssen
451b18c4a3
lua: Cleanup lua state once the thread has joined
9 years ago
Hugo Beauzée-Luyssen
123e190ee3
lua: PushCommand: Check for allocation failure
9 years ago
Hugo Beauzée-Luyssen
ce74108099
lua: PushCommand: Reduce locked scope
9 years ago
Hugo Beauzée-Luyssen
ab515823f4
lua: Factorize timeout detection
9 years ago
Hugo Beauzée-Luyssen
ce3fbfca7c
lua: Fix deadlock when deactivating extension due to timeout.
lua_ExecuteFunctionVa is not meant to be called with the command_lock
held.
This partially reverts 7a94f2e6b2
Fix #17565
9 years ago
Rémi Denis-Courmont
7a94f2e6b2
lua: remove cargo-cultivated cancellation
10 years ago
Filip Roséen
31ea536898
lua: reserved identifier in function names
* renamed `__PushCommand` to `PushCommand__` since the former is a
reserved identifier and therefor ill-formed according to the C
ISO Standard.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
10 years ago
Thomas Guillem
183d5cda47
dialog: use new API
10 years ago
Rémi Denis-Courmont
901fa0d6c7
Inline all remaining calls to vlc_cleanup_run()
The code size saving in vlc_cleanup_run() is marginal and premature
optimization. In practice, vlc_cleanup_run() makes the source code
harder to follow/read, confuses static analyzers and generates false
positive clobber warnings (on some OSes due to long jumps).
It did exercise some of the cleanup code paths though.
11 years ago
Rémi Denis-Courmont
5ae7b5e3c3
Lua: fix compilation with Lua 5.1.4
12 years ago
Rémi Denis-Courmont
fe30f8c0c3
Lua: add sockets to extensions ( fixes #9495 )
12 years ago
Rémi Duraffort
e8553f48b8
Fix wrong test (cid #1049311 )
13 years ago
Rémi Denis-Courmont
e6ab18c187
Lua: extension: fix inverted cancellation logic
The cancellation-safe section was protected instead of the
cancellation-unsafe section.
13 years ago
Rémi Denis-Courmont
788d225674
Lua: extension: reindent
13 years ago
Rémi Denis-Courmont
7031f81cd8
Lua: extension: simplify command dequeuing
13 years ago
Rafaël Carré
5aaa94e4a9
lua: fix windows build
include config.h
14 years ago
Jean-Baptiste Kempf
61147a769e
Move /modules/misc/lua/ to /modules/lua
Lua is an important part of VLC and abusing misc has gone a bit too far...
15 years ago
Jean-Philippe André
1e505da4a8
Lua: load modules manually for zipped extensions
Modules must be placed in the subfolder modules/ of the zip package.
Accepted file extensions are .luac and .lua (probed in that order)
15 years ago
Jean-Philippe André
5980be37ec
Lua: allow killing Extensions
If an Extension didn't respond in 10s, a dialog pops up and allows
the user to kill the Extension (thread cancellation)
15 years ago
Rémi Duraffort
041923136e
lua extensions: remove dummy function (moreover vlc_join is simpler to understand)
16 years ago
Rémi Duraffort
2d0aee25f1
lua extensions: use an enum and remove demuy declaration.
16 years ago
Jean-Philippe André
0a15eecff3
Extensions: fix vlc.deactivate() malfunction
Inspired by jetru's patches, thank you. This should fix #3451
16 years ago
Jean-Philippe André
4106f477c6
Extensions: fix a leak (and a potential crash)
16 years ago
Rémi Duraffort
078feead12
Lua: fix a crash (the command is already freeed).
16 years ago
Rémi Duraffort
c12e97cbe7
Lua_ext: fix race condition.
16 years ago
Jean-Philippe André
8b61de26db
Lua: do not click a button twice in a row
Fixes #3364 (big bug on buttons)
It is not possible to click the same button twice in a row (while the
script is actually running), but other buttons can be clicked.
16 years ago
Srikanth Raju
eeda6528dd
Lua: Add new callback playing_changed for playing status changes
Signed-off-by: Jean-Philippe André <jpeg@videolan.org>
16 years ago
Srikanth Raju
31d2afeed7
Lua: Allow arguments to be passed to lua functions in lua_ExecuteFunction
Signed-off-by: Jean-Philippe André <jpeg@videolan.org>
16 years ago
Jean-Philippe André
c235fa52c1
Extensions: fix leak: free commands
16 years ago
Jean-Philippe André
13ca60ed3a
Revert ef5d32ea57103: hopefully fix a race condition on deactivation
This was wrong, the fix should not come there.
16 years ago
Jean-Philippe André
ef5d32ea57
Extensions: hopefully fix a race condition on deactivation
16 years ago
Jean-Philippe André
1f3bd0cc83
Extensions: call lua_DialogFlush after Lua call
This flushes the dialog (updates it at the UI level) after a Lua
function return.
16 years ago
Jean-Philippe André
dfaef0e6be
Extensions: New capability "meta-listener". Push unique commands
PushCommand takes now a new parameter: b_unique. If set, do not push
this command twice in the command queue.
16 years ago
Jean-Philippe André
eaa7302d6a
Extensions: new script capability "input-listener"
When the input changes (next track, ...), every capable extension
will execute the function "input_changed"
16 years ago
Jean-Philippe André
9f49f1112e
Extensions: fix extensions manager's locking scheme
16 years ago
Rémi Duraffort
a67d563f10
lua: fix potential leak (and missing unlock).
16 years ago
Jean-Philippe André
1bbf6f1c45
Extensions: core library
This contains:
- Extensions manager
- Extensions activation / deactivation functions
- Separate threads for each extension
- Lua specific functions for calling the script
17 years ago