procedure TFormDVDPlayer.FilterGraphDVDCurrentHMSFTime(sender: TObject;
HMSFTimeCode: tagDVD_HMSF_TIMECODE; TimeCode: tagDVD_TIMECODE);
var
ttt : tagDVD_HMSF_TIMECODE;
fps : ULONG;
begin
with HMSFTimeCode do
StatusBar.Panels.Items[0].Text :=
format('%d:%d:%d',[bHours, bMinutes ,bSeconds]);
with FilterGraph as IDvdInfo2 do GetTotalTitleTime(ttt, fps);
Edit1.Text := format('%d:%d:%d',[ttt.bHours, ttt.bMinutes ,ttt.bSeconds]);
if BeginPlay then
begin
if StrToTime(format('%d:%d:%d',[HMSFTimeCode.bHours, HMSFTimeCode.bMinutes ,HMSFTimeCode.bSeconds]))>StrToTime(format('%d:%d:%d',[ttt.bHours, ttt.bMinutes ,ttt.bSeconds]))-2 then
begin
MessageDlg('影片播放完毕', mtWarning, [mbOK], 0);
FilterGraph.Stop;
FilterGraph.ClearGraph;
end;
end;
end;