开发者

When to change trackbar value when playing video?

开发者 https://www.devze.com 2023-02-17 05:11 出处:网络
I made application which plays video using DirectX.AudioVideoPlayback.Video class. There are methods Play(), Pause(), etc...

I made application which plays video using DirectX.AudioVideoPlayback.Video class. There are methods Play(), Pause(), etc... How should I know when to change value to my trackbar which tracks how much video pa开发者_JAVA百科ssed? Should I create timer and at some interval update my trackbar or there is another solution?


Check it by a timer indeed. If you have your own samplegrabber callback you get the position provided by a callback (however not always rate aware) and CurrentTime is rate aware. Checking it by a timer also helps you to have the information on the right thread from the start.

0

精彩评论

暂无评论...
验证码 换一张
取 消