开发者

dynamic xna video playback speed?

When calling getTexture from a video object in XNA 3.1 you get the current frame of the playing video based on how much time elapsed since the video st开发者_如何学JAVAarted to play.

However, I need to play back the video while changing the playback speed dynamically based on the players actions.

I wonder if there is a way to play back the video at a faster or slower rate? Somehow tricking the player to believe more or less than the actual playback time has passed?

If not, any other way to play back videos with a dynamic framerate using XNA?

This only needs to work in Windows.


The built in XNA video API doesn't have a facility to do this. If you only need to work on windows, check out alternative APIs for playing videos such as:
http://xnadsplayer.codeplex.com/


I ended up writing a mpeg-1 decoder myself in the end after looking around a lot without finding any solution that worked well enough. The closest I could get was using directshow, but that had some serious lag issues so that changing video speed would not happen realtime if the CPU was working too hard.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜