I have built a mediaplayer application based on the PlayWin demo that comes with DSPack. I have built this in Delphi 10.4 Sydney. The primary file type I am focussing on is *.mp4. All this is working fine.
I would like to provide the capability to move to the middle of the currently plying video and continue playing to the end of the video.
I have searched extensively on StackOverflow and attempted any solutions that appear correct. Nothing has worked.
My current attempt is:
procedure TMediaPlayer.btnMoveToMidVideoClick(Sender: TObject);
Var
sgBefore: String;
sgAfter: String;
MediaSeeking: IMediaSeeking;
Start: Int64;
Stop: Int64;
begin
FilterGraph.Active := true;
VideoWindow.FilterGraph:= FilterGraph;
FilterGraph.RenderFile('S:\iTube Studio Downloaded\6.5 HP Greyhound Engine\6_5HP_Best Way To Clean a Honda Style Carburetor - Vide0.mp4');
FilterGraph.QueryInterface(IMediaSeeking, MediaSeeking);
Start := 1200519 div 2;
Stop := 1200519;
MediaSeeking.SetPositions(Start, AM_SEEKING_AbsolutePositioning, Stop, AM_SEEKING_AbsolutePositioning);
FilterGraph.Play;
end;
I HAVE NO IDEA WHERE TO GET THE START AND STOP VALUES FROM.
Can anyone figure out how to move to the middle of a currently playing video?
Dick Maley
Thank you in advance.