Changeset de31813fc07c398e906346df090bf4680212a85c
- Timestamp:
- 11/04/07 22:42:27
(10 months ago)
- Author:
- Antoine Cellerier <dionoea@videolan.org>
- git-committer:
- Antoine Cellerier <dionoea@videolan.org> 1194212547 +0000
- git-parent:
[154d9e74c59590e731abee5cd26ee8a401a4146c]
- git-author:
- Antoine Cellerier <dionoea@videolan.org> 1194212547 +0000
- Message:
Add a new type of VLC Lua module: Interfaces.
Two things led me to add this new type of Lua modules:
- Most interfaces duplicate code from one another (rc and telnet both deal
with sockets, rc and hotkeys duplicate VLC interfacing code)
- It's easier to code in Lua than in C (for high level stuff)
(* Users can code their own module easily, all they need is a text editor.)
Most of the changes in modules/misc/ are Lua wrappers for different C APIs
in VLC. I'd say that 90% of those wrappers won't change, the other 10% might
need small changes (mostly to simplify the C code).
The VLC Lua "interface" module will look for lua scripts in the
*share*/luaintf/ directory. Files in *share*/luaintf/modules/ are lua modules
which can be used by multiple VLC Lua modules (using require "modulename").
This commit includes 4 Lua interface modules:
- dummy.lua: the default module. Prints error messages and quits.
- rc.lua: equivalent to the legacy rc.c module. Also includes a bunch of
new features (+ multiple socket connections at a time work!). See file for
more details.
- telnet.lua: equivalent to the legacy telnet.c module. See file for more
details.
- hotkeys.lua: a rewrite of the hotkey handling module. This module is still
experimental. I'll need to change VLC core hotkeys stuff to make it work
like I want (ie: 1 hotkey triggers 1 action instead of the current 1 action
can have 1 hotkey). This version executes 3 dummy actions when keys 'q',
'w' or 'x' are pressed.
What's left to do:
- Port the http interface plugin to this framework (at least for the
macros/rpn part ... using <?vlc some lua code ?> à la PHP would be way
easier than what we currently have).
- Finish work on the hotkeys module.
- Code a real telnet/rc module with autocompletion and all the cool features
usually found in a telnet/terminal interface.
- Trash the legacy C modules.
Stuff to test (which I can't test myself):
- Win32 and Mac OS X specific changes to Makefile.am
- Console interface under Win32. I expect it not to work.
Other stuff included in this changeset are:
- Code cleanup (I'm sure that it's still possible to simplify some of the old lua bindings code).
- That's pretty much it in fact :/
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r45abd2c |
rde31813 |
|
| 434 | 434 | $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/luameta/`basename $${i}` ; \ |
|---|
| 435 | 435 | done ; \ |
|---|
| | 436 | $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/luaintf |
|---|
| | 437 | for i in $(srcdir)/share/luaintf/*.* ; do \ |
|---|
| | 438 | $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/luaintf/`basename $${i}` ; \ |
|---|
| | 439 | done ; \ |
|---|
| | 440 | $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/luaintf/modules |
|---|
| | 441 | for i in $(srcdir)/share/luaintf/modules/*.* ; do \ |
|---|
| | 442 | $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/luaintf/modules/`basename $${i}` ; \ |
|---|
| | 443 | done ; \ |
|---|
| 436 | 444 | $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/dialogs |
|---|
| 437 | 445 | $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/js |
|---|
| … | … | |
| 734 | 742 | $(INSTALL) -m 644 $${i} $(top_builddir)/vlc-${VERSION}/share/luameta/`basename $${i}` ; \ |
|---|
| 735 | 743 | done ; |
|---|
| | 744 | $(INSTALL) -d $(top_builddir)/vlc-${VERSION}/share/luaintf |
|---|
| | 745 | for i in $(srcdir)/share/luaintf/*.* ; do \ |
|---|
| | 746 | $(INSTALL) -m 644 $${i} $(top_builddir)/vlc-${VERSION}/share/luaintf/`basename $${i}` ; \ |
|---|
| | 747 | done ; |
|---|
| | 748 | $(INSTALL) -d $(top_builddir)/vlc-${VERSION}/share/luaintf/modules |
|---|
| | 749 | for i in $(srcdir)/share/luaintf/modules/*.* ; do \ |
|---|
| | 750 | $(INSTALL) -m 644 $${i} $(top_builddir)/vlc-${VERSION}/share/luaintf/modules/`basename $${i}` ; \ |
|---|
| | 751 | done ; |
|---|
| 736 | 752 | |
|---|
| 737 | 753 | mkdir -p "$(top_builddir)/vlc-${VERSION}/osdmenu" |
|---|
| rc4b9cf9 |
rde31813 |
|
| 1 | | SOURCES_lua = luaplaylist.c luameta.c vlclua.c vlclua.h |
|---|
| | 1 | SOURCES_lua = playlist.c meta.c intf.c vlc.c vlc.h callbacks.c objects.c variables.c configuration.c net.c vlm.c |
|---|
| rd2a20af |
rde31813 |
|
| 257 | 257 | luaplaylist/youtube_homepage.lua \ |
|---|
| 258 | 258 | luaplaylist/metacafe.lua \ |
|---|
| 259 | | luaplaylist/googlevideo.lua |
|---|
| | 259 | luaplaylist/googlevideo.lua \ |
|---|
| | 260 | luaintf/rc.lua \ |
|---|
| | 261 | luaintf/hotkeys.lua \ |
|---|
| | 262 | luaintf/modules/common.lua \ |
|---|
| | 263 | luaintf/modules/host.lua \ |
|---|
| | 264 | luaintf/telnet.lua \ |
|---|
| | 265 | luaintf/dummy.lua |
|---|