问题描述
在 http://上尝试该示例时msdn.microsoft.com/en-us/library/dd904198(v=XNAGameStudio.40).aspx 程序在
第69行:" player.Play(视频); "
错误消息:"Microsoft.Xna.Framework.dll中发生了'System.InvalidOperationException类型的未处理的异常
error message: "An unhandled exception of type 'System.InvalidOperationException' occurred in Microsoft.Xna.Framework.dll
其他信息:发生意外错误."
Additional information: An unexpected error has occurred."
我没有更改代码中的单个字符,而是完全使用了从VideoPlayback_4_0.zip文件夹中提取的文件. (可以直接从 http://msdn下载. microsoft.com/en-us/library/dd904198(v=XNAGameStudio.40).aspx )
I did not change a single character in the code, but used exactly the files as they came out of the VideoPlayback_4_0.zip folder. (can be directly downloaded from http://msdn.microsoft.com/en-us/library/dd904198(v=XNAGameStudio.40).aspx)
我在其他论坛上也遇到过同样的问题,但我找不到可用的解决方案.有人知道导致问题的原因以及如何解决该问题吗?
I have read in other forums from people experiencing the same problem, but I could not find a usable solution. Does anybody know what causes the problem and how to fix it?
Stack Trace
Microsoft.Xna.Framework.dll!Microsoft.Xna.Framework.Helpers.ThrowExceptionFromErrorCode(Microsoft.Xna.Framework.ErrorCodes error) + 0x3d bytes
Microsoft.Xna.Framework.Video.dll!Microsoft.Xna.Framework.Media.VideoPlayer.Play(Microsoft.Xna.Framework.Media.Video video) + 0xb7 bytes
VideoPlayback.exe!VideoPlayback.Game1.Update(Microsoft.Xna.Framework.GameTime gameTime) Line 69 + 0x1a bytes
Microsoft.Xna.Framework.Game.dll!Microsoft.Xna.Framework.Game.Tick() + 0x4f0 bytes
推荐答案
抄本是问题所在.重新安装Windows解决了该问题.
The codex were the problem. Reinstalling Windows resolved the issue.
这篇关于播放视频(MSDN教程)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!