C
chrysalis
Unregistered / Unconfirmed
GUEST, unregistred user!
我做的一个播放器,为什么不能定点播放!代码如下!
var
MediaSeeking:IMediaSeeking;
StopPosition,CurrPos,S,Value:Int64;
begin
if OpenDialog.Execute then
begin
if not FilterGraph.Active then
FilterGraph.Active := true;
FilterGraph.ClearGraph;
FilterGraph.RenderFile(OpenDialog.FileName);
VideoWindow.PopupMenu := PopupMenu;
SoundLevel.Position := FilterGraph.Volume;
FilterGraph.QueryInterface(IMediaSeeking,MediaSeeking);
with MediaSeekingdo
begin
Value := Trunc(CurrPos / 10000000);
S := (value mod 3600) mod 60;
MediaSeeking.GetStopPosition(S);
MediaSeeking.SetPositions(S,AM_SEEKING_AbsolutePositioning,
StopPosition,AM_SEEKING_NoPositioning);
FilterGraph.Play;
end;
end;
为什么不能实现在设置的时间段内播放呢?
var
MediaSeeking:IMediaSeeking;
StopPosition,CurrPos,S,Value:Int64;
begin
if OpenDialog.Execute then
begin
if not FilterGraph.Active then
FilterGraph.Active := true;
FilterGraph.ClearGraph;
FilterGraph.RenderFile(OpenDialog.FileName);
VideoWindow.PopupMenu := PopupMenu;
SoundLevel.Position := FilterGraph.Volume;
FilterGraph.QueryInterface(IMediaSeeking,MediaSeeking);
with MediaSeekingdo
begin
Value := Trunc(CurrPos / 10000000);
S := (value mod 3600) mod 60;
MediaSeeking.GetStopPosition(S);
MediaSeeking.SetPositions(S,AM_SEEKING_AbsolutePositioning,
StopPosition,AM_SEEKING_NoPositioning);
FilterGraph.Play;
end;
end;
为什么不能实现在设置的时间段内播放呢?