input.Time

This forum is about all development around libVLC.
markpe
New Cone
New Cone
Posts: 3
Joined: 31 Mar 2009 02:59

input.Time

Postby markpe » 31 Mar 2009 03:11

I'm currently developing in VB .Net and have a timer event set to iterate to the next item in the play list after a given time. I'd like to specify a random point in the video being played to start at after it changes to the next item in the play list. My code from inside the event is as follows:

Code: Select all

time += 1 If time = 30 Then vlcplugin.playlist.next() vlcplugin.input.Time = 20000 time = 0 End If
(vlcplugin is the name of my object. This event is set to fire every second, time is initially set to 0 on form load)

The event does trigger and the next item is played when the proper condition is met, however the input.Time command is never executed. Each video always starts at the beginning. If I use input.Time = somenumber after the vlcplugin.playlist.play() command, it will work. Any suggestions? And yes, all of my videos are longer than 20 seconds so I'm not trying to go outside of the bounds of my file.

Rémi Denis-Courmont
Developer
Developer
Posts: 15279
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: input.Time

Postby Rémi Denis-Courmont » 31 Mar 2009 20:27

Not all inputs support seeking.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

markpe
New Cone
New Cone
Posts: 3
Joined: 31 Mar 2009 02:59

Re: input.Time

Postby markpe » 31 Mar 2009 21:16

I've noticed that if I issue a input.Time command after a video begins playing, I can get it to always work, but issuing it directly after a playlist.next command never seems to work. It seems like it has something to do with the video stream needing to be fully establish or something.

markpe
New Cone
New Cone
Posts: 3
Joined: 31 Mar 2009 02:59

Re: input.Time

Postby markpe » 31 Mar 2009 23:37

What I've had to do is delay the command by just enough time to make sure that video is fully loaded into the player. Obviously, not all videos will load at the same rate, so delaying the command causes a noticeable skip on some videos and not others. I've included my code so you can see what exactly I'm talking about. Any devs out there want to expand on what I'm seeing so that I can understand it better? I'm obviously new to the plugin.

(this function runs every 1/10 of a second. So every 10th iteration is 1 second)

Code: Select all

time += 1 If time = 3 Then //Had to settle on a .3 second delay in order to get it to work on my machine seek() //seek() function contains vlcplugin.input.time command ElseIf time = 100 Then //After 10 seconds, go to next item vlcplugin.playlist.next() time = 0 //restart counter End If


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 29 guests