[Gambas-user] Embedding VLC movie window immediately... without a 2 second pause

Benoit Minisini gambas at ...1...
Wed Mar 26 01:34:44 CET 2008


On mercredi 26 mars 2008, Lee McPherson wrote:
> I have the basic code to embed a VLC movie window into a gambas app,
> however, there is an annoying 2 second pause before the window finally
> becomes embedded.  The movie will actually start playing for a couple of
> seconds in a separate window before it gets embedded.  I'm not sure if
> it's a limitation of VLC or something else but I'm trying to figure out
> how to stop this.  Here is the basic code I'm using (borrowed from
> another user) :
>
> PUBLIC SUB Presence_Embed(windowTitle AS String)
>   DIM key AS Integer
>   key = WindowClasses.getWindowID(windowTitle)
>   IF key > 0 THEN
>   Embedder1.Embed(key)
>   Embedder1.SetFocus
>   ENDIF
>   Embedder1.Visible = TRUE
> END
>
> PUBLIC SUB Form_Open()
>
>   DIM iWindowInfoArray AS Integer
>   $MplayerProc = EXEC ["/usr/bin/vlc", "-I", "rc"] FOR INPUT OUTPUT AS
> "$mplayerproc"   'starts vlc command line in a process
>   PRINT #$mplayerproc, "add /home/lee/nip.avi"    'adds a sample movie
> to the playlist and starts it
>   Presence_Embed("VLC (X11 output)")
>
> END
>

Can you try to know where this time is lost exactly? Jjust add "DEBUG Timer" 
lines everywhere for that.

Regards,

-- 
Benoit Minisini




More information about the User mailing list