libVLC setTime issues

This forum is about all development around libVLC.
MMM
New Cone
New Cone
Posts: 3
Joined: 05 Jun 2010 19:30

libVLC setTime issues

Postby MMM » 05 Jun 2010 19:45

Hi folks!

First let me say a real BIG: Thank you! for building up this great player that simply plays everything I'd like to watch :-)

But I have a problem using the lib (wrapped by VLCj) and to jump within the time.
When the Player is seeking through the video I get only wrong positions within the video. There seem to be no possibility to detect when the player is finished with seeking/caching and ready to playback so all commands will have no side effects.
Might there be a way to throw a event when the VLC engine is in a not 'critical' state?

I know you have a lot of things to do and your team is pretty small :-(

Logod
New Cone
New Cone
Posts: 9
Joined: 18 May 2010 08:55

Re: libVLC setTime issues

Postby Logod » 06 Jun 2010 03:42

Hi,

I have a similar problem, but with the “mediaPlayer.getTime()”. I use VLCj too.

When I put the video on pause “mediaPlayer.pause();”. I retrieve the time “mediaPlayer.getTime()”. And if I retrieve the time again, it’s not the same (around 20 to 50 milliseconds of offset).

Apparently the first time I obtain is the good time (I don’t make test with another player).
So I block the actualisation of the time when the player doesn’t play. And I retrieve only once the time.

MMM
New Cone
New Cone
Posts: 3
Joined: 05 Jun 2010 19:30

Re: libVLC setTime issues

Postby MMM » 06 Jun 2010 08:43

Yeah but walking trough the video is a verrrrrry essential feature IMHO.

Logod
New Cone
New Cone
Posts: 9
Joined: 18 May 2010 08:55

Re: libVLC setTime issues

Postby Logod » 06 Jun 2010 09:49

I give you my video code source part.

I check with VirtualDub, my program don’t have the offset problem.

There is a special time management, because the program is use to localised frame trough time (that mine you have a “timecode” (a date) at the beginning of the first frame of the video).
I add in the zip file the class how allows to make time conversion.

You can easily remove this time management part and use the millisecond since the beginning of the video (that how my program works it fact, I convert a date to a millisecond and the millisecond to the date)

The trick about the offset issue is to update only once the time when you are in pause or stop.
And for moving, I check if we are in the video interval

http://rapidshare.com/files/395816709/s ... e.zip.html

MMM
New Cone
New Cone
Posts: 3
Joined: 05 Jun 2010 19:30

Re: libVLC setTime issues

Postby MMM » 09 Jun 2010 21:12

Thank you very much Logod, your PlayerControlsPanel might be a good workaround :-)


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 3 guests