DirectShow return hresult 0x887601C2 on IMediaControl.Run()

旧巷老猫 提交于 2019-12-11 05:07:42

问题


I'm doing a simple C# code which uses DirectShowLib to record analog TV (everything in the broadcast: audio, video and VBI) from a USB PCTV. Sometimes, not always, when I call mediaControl.Run() method it crashes and returns HRESULT 0x887601C2, which I couldn't find a meaning for in any DirectShow or .NET documentation.

Anyone knows what does the code mean? Thank you.


回答1:


0x887601C2 is DDERR_SURFACELOST and related to presentation of the video, such as for example that during playback you switch users, logoff, screensaver is started etc. Video renderer is losing the resources it is using to display video, hence the error.

If you get this immediately on Run, maybe you are running your application on a dual monitor system, with the video renderer set to be on one monitor while effectively the window is located by most on the other, and requires a different setup in order to re-acquire hardware resources for video presentation.



来源:https://stackoverflow.com/questions/21320350/directshow-return-hresult-0x887601c2-on-imediacontrol-run

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!