[vlc-devel] [PATCH] commit: Use the signal interface and fix signal handling ( Rémi Denis-Courmont )
bl4
bl4 at playker.info
Wed Jun 4 18:05:35 CEST 2008
bl4 wrote:
> git version control wrote:
>> vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Thu
>> May 29 22:50:19 2008 +0300| [a8f72d056fc842e3d338971ebf2a7511c59855a5]
>>
>> Use the signal interface and fix signal handling
>>
>>
>>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a8f72d056fc842e3d338971ebf2a7511c59855a5
>>
>>
>
> I'm afraid this commit broke the vlc gui in my case. When I pass a
> filename on the command line, vlc starts playing, but the status bar
> is empty, the title bar is unchanged, the progress bar doesn't move
> and the Pause/Play button doesn't work. Everything goes back to normal
> when I stop and play again. Everything is fine when I use Media | Open
> File menu to open a file.
>
I narrowed down the diff to:
@@ -134,6 +125,7 @@ int main( int i_argc, const char *ppsz_argv[] )
if (vlc != NULL)
{
+ libvlc_add_intf (vlc, "signals", NULL);
libvlc_add_intf (vlc, NULL, &ex);
libvlc_wait (vlc);
libvlc_release (vlc);
libvlc_add_intf (vlc, "signals", NULL);
becomes
libvlc_InternalAddIntf( vlc->p_libvlc_int, "signals", true );
Inside this function, the interface is created and started:
p_intf = intf_Create( vlc->p_libvlc_int, "signals" );
intf_RunThread( p_intf );
Because the last argument to libvlc_InternalAddIntf is true, it also calls:
playlist_Play( libvlc_priv(vlc->p_libvlc_int)->p_playlist );
I believe this is the cause of the issue. Without this playlist_Play()
call, there are no problems with GUI and signals are handled in the new
way, so the last argument to
libvlc_InternalAddIntf should be false.
I'm attaching a patch that adds a function libvlc_add_intf_noplay and
uses it to initialize the new signal interface. I don't know if it's the
best way to solve this issue, please let me know if you have any other
suggestions.
--
bl4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-starting-signal-interface.patch
Type: text/x-patch
Size: 2272 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20080604/7faa00d7/attachment.bin>
More information about the vlc-devel
mailing list