问题描述
我正在做一个简单的C#代码,它使用DirectShowLib从USB PCTV录制模拟电视(广播中的所有内容:音频,视频和VBI)。有时,并非总是如此,当我调用mediaControl.Run()方法时,它崩溃并返回HRESULT 0x887601C2,我在任何DirectShow或.NET文档中都找不到它的含义。
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.
推荐答案
0x887601C2
DDERR_SURFACELOST
,并且与视频演示相关,例如在播放过程中,您会切换用户,注销,启动屏幕保护程序等。视频渲染器正在丢失用于显示视频的资源,因此会出现错误。
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.
立即在 Run
上运行,也许您正在双监视器系统上运行您的应用程序,将视频渲染器设置在一个监视器上,而实际上该窗口在另一个监视器上,并且需要进行其他设置才能重新获取用于视频演示的硬件资源。
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.
这篇关于DirectShow在IMediaControl.Run()上返回hresult 0x887601C2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!