How to control the frame rate in DirectShow?
-
Hi all.. Well, as in the subject: how can I control the frame rate of a video in DirectShow? I am using DirectShow to play a video and blend a rectangle that moves along the video, which positions are stored in an array. I use SetTimer() to change the rectangle's position, but it seems that the timepoint in the timer doesn't match the frame rate of the video. So I'm thinking of controlling the frame rate of the video instead.. Thank you in advance... -- modified at 7:20 Wednesday 21st March, 2007
-Houari
-
Hi all.. Well, as in the subject: how can I control the frame rate of a video in DirectShow? I am using DirectShow to play a video and blend a rectangle that moves along the video, which positions are stored in an array. I use SetTimer() to change the rectangle's position, but it seems that the timepoint in the timer doesn't match the frame rate of the video. So I'm thinking of controlling the frame rate of the video instead.. Thank you in advance... -- modified at 7:20 Wednesday 21st March, 2007
-Houari
Hi, I think you can use the FrameRate attribute to get the frame rate. Siddharth
-
Hi, I think you can use the FrameRate attribute to get the frame rate. Siddharth
-
Hi all.. Well, as in the subject: how can I control the frame rate of a video in DirectShow? I am using DirectShow to play a video and blend a rectangle that moves along the video, which positions are stored in an array. I use SetTimer() to change the rectangle's position, but it seems that the timepoint in the timer doesn't match the frame rate of the video. So I'm thinking of controlling the frame rate of the video instead.. Thank you in advance... -- modified at 7:20 Wednesday 21st March, 2007
-Houari
Why change the framerate? Wouldn't that change the motion of the video? Since you have a "clock" already because you're playing video you shouldn't need to use a timer. You can base your motion on the timestamp of each frame. Mark
"Great job, team. Head back to base for debriefing and cocktails." (Spottswoode "Team America")