[vlc-devel] vlc MediaPlayer object does not restart after reaching end of video file?

Tony Anecito adanecito at yahoo.com
Sun Dec 20 01:17:28 CET 2009


Well looks like vlc resets objects or clears them. I am still not sure if it removes the mediaPlayer and creates another which I suspect I will have to do. I found this code snippet in vlc which for end of playing event indicates it might not be reusing the mediaPlayer but it is a long stretch for myself to reach that conclusion.

if (p_event->type == libvlc_MediaPlayerEndReached) {
        i_first_time_media_player_time_changed = 0;
        p_vlc_mediaObject->clearMediaController();
        emit p_vlc_mediaObject->stateChanged(Phonon::StoppedState);
        emit p_vlc_mediaObject->finished();
    }

I am not sure what finished() for the mediaObject does or how that object relates to the mediaPlayer yet.

Regards,
-Tony

--- On Sat, 12/19/09, Tony Anecito <adanecito at yahoo.com> wrote:

> From: Tony Anecito <adanecito at yahoo.com>
> Subject: Re: [vlc-devel] vlc MediaPlayer object does not restart after reaching end of video file?
> To: "Mailing list for VLC media player developers" <vlc-devel at videolan.org>
> Date: Saturday, December 19, 2009, 3:17 PM
> An update. Seems I have a while loop
> to check for video output and after the end of the video is
> reached the mediaPlayer.play() no longer works as expected
> which is the video will start to output.
> 
> So what step do I need to execute so after the end of a
> movie is reached I can replay the video reusing the same
> mediaPlayer instance?
> 
> Many Thanks,
> -Tony
> 
> --- On Sat, 12/19/09, Tony Anecito <adanecito at yahoo.com>
> wrote:
> 
> > From: Tony Anecito <adanecito at yahoo.com>
> > Subject: [vlc-devel] vlc MediaPlayer object does not
> restart after reaching end of video file?
> > To: vlc-devel at videolan.org
> > Date: Saturday, December 19, 2009, 2:58 PM
> > Hi All,
> > 
> > For the MediaPlayer object once it reaches the end of
> a
> > video it is playing and an event is generated for end
> of
> > movie how does one get the mediaPlayer instance to
> restart?
> > If I try mediaPlayer.play it does not replay. I also
> tried
> > in my program execute to mediaPlayer.setPosition(0);
> and
> > then mediaPlayer.play and still it locks up or does
> not
> > play.
> > 
> > Any hints?
> > 
> > Thanks,
> > -Tony
> > 
> > 
> >       
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > http://mailman.videolan.org/listinfo/vlc-devel
> > 
> 
> 
>       
> _______________________________________________
> 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