nars Posted August 7, 2012 Posted August 7, 2012 Is there some way to seek to a specific time position (when playing a recorded file, obviously) using COM? I did tested and can read current position from DVBViewer.DataManager.Value['#currentplaytime'] however I did tried to set it to a specific time and nothing happens, is there any (other) way to do it? Thanks in advance. 1 Quote
dbraner Posted August 7, 2012 Posted August 7, 2012 You can use datamanager only for reading some status information and for storing custom values. Setting a variable doesn't trigger any action in DVBViewer. I can't remember a COM method which allows you to seek to a specific position in a media file. Quote
nars Posted August 7, 2012 Author Posted August 7, 2012 Thank you for your reply. I did looked and even tried IPlayListManager.Play(TitleNr: Integer; Position: Double); with TitleNr set to 0, 1, -1 but no go on a single file playing why PlayFile() function doesn't also have a position parameter? Now seeing maybe I will try to temporarily create a playlist with just one file and try using Play() then... If anyone else haves some (better) idea please... also some way using a plugin would work, but I did also checked plugin sdk and can't find a way to do it either unless maybe possible using GetGraph and dealing with IGraphBuilder? But that seems out of the sdk and I have no good knowledge about directshow things. Quote
Carlos T. Posted 6 hours ago Posted 6 hours ago Hi, I managed to get it working this way: tiempoRestante = round(segundosTotal) 'Calculate the jump time dvb.SetSetupValue "Jumptime", "0", tiempoRestante dvb.ApplyConfig dvb.SendCommand 103 WScript.Sleep 30 'Small delay between commands to avoid overloading the COM queue dvb.SetSetupValue "Jumptime", "0", "10" dvb.ApplyConfig The trick I use is to temporarily redefine the jump time, perform the jump, and then restore it to the default value of 10. This forces setup.xml to be written twice, but I haven't found a better solution. Quote
Carlos T. Posted 21 minutes ago Posted 21 minutes ago I found another method for jumping: dvb.BookmarksClear ultimoFichero dvb.BookmarkAdd ultimoFichero, segundos dvb.SendCommand 77 ' F8 WScript.Sleep 30 dvb.SendCommand 45 ' 5 WScript.Sleep 30 dvb.SendCommand 42 ' 2 WScript.Sleep 30 dvb.SendCommand 41 ' 1 first bookmark Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.