Problem with SeekCurrentPosition() in DirectX Video Class

Ming_Lei

Freshman
Joined
May 6, 2004
Messages
41
Location
Seattle, WA
I have a problem with Video.SeekCurrentPosition method in DirectX.AudioVideoPlayback namespace. I am writing a program that plays various kind of video and sound, with a track bar that is used to go back and forth in a video or audio file. I therefore used SeekCurrentPosition with flag that is absolute positioning. But the call to the method each time seek to 0 no mather what the value been actually given. What is the problem?

Code:
===============================================
double pos = ((double)trackBar1.Value / 100.0) * video.Duration;
video.SeekCurrentPosition(pos, SeekPositionFlags.AbsolutePositioning);
===============================================
 
For a video of duration about 800 seconds, the value of pos is around 5 to 10 (maybe say 9.782) when I moved the track bar a little forward initially.
 
Back
Top