Jump to content

COM API PlayListManager: start at given position not working anymore


Breaker27

Recommended Posts

Hello,
I updated to DVBViewer 5.0 (now 5.1) after setting up a new HTPC.
I'm using the COM API to start playback of a file from a little Delphi program of mine. I use the IPlayListManager interface to start playback at a given position like this:

item := FDVBViewer.PlayListManager.NewPlaylistItem;
item.Filename := 'v:\test.mkv';
positionSec := 1000.0;

FDVBViewer.PlayListManager.getPlaylist(3).Clear;
FDVBViewer.PlayListManager.getPlaylist(3).Add(item);
FDVBViewer.PlayListManager.Play(1, positionSec);
FDVBViewer.PlayListManager.PlayNext(True, positionSec); // as an alternative

 

But the procedures

procedure Play(TitleNr: Integer; Position: Double);
procedure PlayNext(Autostart: WordBool; Position: Double);
don't work anymore as expected. Playback always starts at the beginning, no matter what I enter as the position.
This is currently a no-go for me, so I have to revert to a very old version 4.x of DVBViewer, since other versions cannot be downloaded from the site. :-( It would be nice if the bug could be fixed soon.
Is there's another way to set the current playback position with the COM API, let me know (I didn't found a function for that)!
Environment: DVBViewer 5.0 (fresh installation), Updated to 5.1, under Windows 7 Prof.
Link to comment
  • 4 years later...

I can confirm this when testing it. Jumping to position is kind of a cool feature, although it has little significance to do it from the COM. For this function COM always require two params, but does only acknowledge the first and ignores the second.   

iDVBViewer.PlayListManager.Play(0,60) ; Plays listitem 1 in Playlist and jump to 1 minute.

 

Edited by majstang
  • Like 1
Link to comment

Strange implementation... if the specified item is not played DVBViewer starts playing it and ignores the position parameter. However, if playback of the item is already going on the position parameter is applied. Try

DVBViewer.PlayListManager.Play(0,0);
DVBViewer.PlayListManager.Play(0,60);

Maybe it's because DirectShow ignores a position change if playback has been started a short time ago, because internally it is not really up and running yet. Dunno...

 

Link to comment

:thumbsup: That worked:D Report closed and sorted:) Or if set a short timeout before function executes the jump might do, so that it will be possible to do both with one call?

Edited by majstang
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...