[vlc-devel] MediaPlayer crash or deadlock (only) if mouse moves over video after libvlc_MediaPlayerEndReached

Christian Gallant christian at masterkitchen.de
Thu Mar 18 11:35:42 CET 2010


Hi,

a solution is to hide the playerwidget just befor deleting it...

...
        if(vlcPlayer){
                vlcPlayer->hide();
                delete vlcPlayer;
        }
...

The widget is hidden, no mousemoves are detected. Seems to me that it IS a mouseevent problem. Strange, but it works fine after hiding it.


Regards
Chris


>
> Hi Hugo,
>
> this is for the 2nd mail :-)
>
> > Basically the only thing you'd need is something like that :
> >
> > void                            MediaPlayer::callbacks( const
> > libvlc_event_t* event, void* ptr )
> > {
> >      MediaPlayer* self = reinterpret_cast<MediaPlayer*>(ptr);
> >      switch ( event->type )
> >      {
> >       case libvlc_MediaPlayerEndReached:
> >            self->emit endReached();
> >       //....
> >      }
> > }
> >
>
> Exactly what we did or do except void MediaPlayer::callbacks() is
> static... The compiler will not let me do it without.
>
> > [...]
> >
> > libvlc_event_attach( p_eventManager, libvlc_MediaPlayerEndReached,
> > callbacks, p_mediaPlayer );
>
> Exactly the same again.
>
> > [...]
> >
> > connect( p_mediaPlayer, SIGNAL( endReached() ),
> > whatever_stops_the_playback_instance, SLOT( stop() ),
> > Qt::QueudConnection );
>
> I´ll try that again.
>
>
> > If you omit the last parameter, you'll more likely hang in
> > libvlc_media_player_stop()
> >
> > About the cursor causing a crash, I'm not aware of anything that
> could
> > watch the cursor movements and cause a crash, but again, a backtrace
> > would help ;)
>
>
> It seems strange to me as well that mousemovement should cause the
> error. But it only appears iv the mouse moves...
>
>
> Thanks and regards
> Chris
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel



More information about the vlc-devel mailing list