🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.delphi.multimedia
2 messages
2 total messages Started by Raymond Kennington Wed, 16 Jul 2008 03:01
Using DSPack, SetPosition plays the entire clip. Correct usage?
#214
Author: Raymond Kennington
Date: Wed, 16 Jul 2008 03:01
53 lines
2311 bytes
A clip (QuickTime .MOV) was displayed initially using:

   QueryInterface(IID_IMediaSeeking, MediaSeeking);

   with MediaSeeking do
   begin
     SetTimeFormat(TIME_FORMAT_MEDIA_TIME);

     GetAvailable(EarliestPos, LatestPos);

     ShowMessage(  'Earliest Pos: ' + IntToStr(EarliestPos) + #13#10
                 + 'Latest Pos:   ' + IntToStr(LatestPos));

     // Earliest: 0
     // Latest  : 7 660 000

     StartPos := EarliestPos;
     StopPos  := LatestPos;

     MediaSeeking.SetPositions(StartPos,AM_SEEKING_AbsolutePositioning,
                               StopPos, AM_SEEKING_AbsolutePositioning);
   end;

   Play();

The following code is an attempt to send the clip back to the beginning:

procedure TSearchForm.ToBeginningBtnClick(Sender: TObject);
begin
   DisplayFilterGraph.Active := True;

   with MediaSeeking do
   begin
     case SetPositions(EarliestPos, AM_SEEKING_AbsolutePositioning,
                       EarliestPos, AM_SEEKING_AbsolutePositioning) of

       S_FALSE: 	ShowMessage('No position change. (Both flags specify no 
seeking.)');
       S_OK:     	  ; // ShowMessage('Success.');
       E_INVALIDARG: ShowMessage('Invalid argument.');
       E_NOTIMPL:    ShowMessage('Method is not supported.');
       E_POINTER:    ShowMessage('NULL pointer argument.');
     end;
   end;
end;


However, the entire clip is played.

What is the correct way of setting the absolute positions?

Thanks.
Raymond.
Re: Using DSPack, SetPosition plays the entire clip. Correct usage?
#215
Author: Raymond Kennington
Date: Wed, 16 Jul 2008 03:33
8 lines
1132 bytes
Further information:

The return result of SetPositions is that of FALSE, namely no seeking 
took place.

I have installed the klcodec codecs (using the default install).

Raymond.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads