Difference between revisions of "User:Pdherbemont"
Pdherbemont (talk | contribs) (VLC.app proposition) |
Pdherbemont (talk | contribs) m (english fix.) |
||
Line 5: | Line 5: | ||
The problem with current implementation of VLC.app and gui/macosx is that it relays on the src/vlc.c common file that set up the interface. This permit to use vlc command line and do cool vlc thing with it. However there are many troubles with gui/macosx: | The problem with current implementation of VLC.app and gui/macosx is that it relays on the src/vlc.c common file that set up the interface. This permit to use vlc command line and do cool vlc thing with it. However there are many troubles with gui/macosx: | ||
− | * It can't be detached, nor can be | + | * It can't be detached, nor can be attached on the fly. Thus we '''can't really say that gui/macosx is a vlc interface module'''. |
− | * There is a conflict | + | * There is a technical conflict with Cocoa: |
− | |||
Run() | Run() | ||
{ | { | ||
− | [NSApp run]; /* May not exit */ | + | [NSApp run]; /* May not exit however vlc will cleanly ends only if gui/macosx Run() ends, so this won't work */ |
} | } | ||
We do: | We do: | ||
Line 17: | Line 16: | ||
if(setjmp(jmpbuff) == 0) | if(setjmp(jmpbuff) == 0) | ||
[NSApp run]; /* May not exit */ | [NSApp run]; /* May not exit */ | ||
− | /* Will exit when longjmp(jmpbuff, 1) is called */ | + | /* Will exit when longjmp(jmpbuff, 1) is called, then vlc will cleanly ends */ |
} | } | ||
Which is kind of ugly. | Which is kind of ugly. |
Revision as of 21:24, 23 March 2007
(Pdherbemont is Pierre d'Herbemont)
VLC.app proposition
The problem
The problem with current implementation of VLC.app and gui/macosx is that it relays on the src/vlc.c common file that set up the interface. This permit to use vlc command line and do cool vlc thing with it. However there are many troubles with gui/macosx:
- It can't be detached, nor can be attached on the fly. Thus we can't really say that gui/macosx is a vlc interface module.
- There is a technical conflict with Cocoa:
Run() { [NSApp run]; /* May not exit however vlc will cleanly ends only if gui/macosx Run() ends, so this won't work */ }
We do:
Run() { if(setjmp(jmpbuff) == 0) [NSApp run]; /* May not exit */ /* Will exit when longjmp(jmpbuff, 1) is called, then vlc will cleanly ends */ }
Which is kind of ugly.
Proposed solution
gui/macosx shouldn't be a module interface but instead an application that makes uses of libvlc (named here VLCOSX). However src/vlc.c would be still be build (named here vlc), and we'll have in the VLC.app bundle the two binary VLCOSX and vlc. VLCOSX would start the Cocoa application whereas vlc would be the real vlc that we can use with command line. VLCOSX could still be hacked to forward vlc option to libvlc, but this is really not is goal.