我在C#中使用nVLC包装器,使用带有集成摄像头和VS2013 / .net 4.0的Windows 7(64位笔记本电脑)进行流式传输。当我使用插入Windows 7笔记本电脑的USB网络摄像头时,一切正常。当我使用笔记本电脑附带的集成摄像头时,我发现了一个未处理的异常情况。以下是崩溃的详细信息
Description: The process was terminated due to an unhandled exception.
Exception Info: exception code c0000005, exception address 77704273
Faulting application name: MyStreamer_nVLC.exe, version: 1.0.0.0, time stamp: 0x54340652
Faulting module name: ntdll.dll, version: 6.1.7601.18247, time stamp: 0x521ea8e7
Exception code: 0xc0000005
Fault offset: 0x00034273
Faulting process id: 0x2b68
Faulting application start time: 0x01cfe24badf6a829
Faulting application path: C:\Users\DarkOne\Desktop\Debug\MyStreamer_nVLC.exe
Faulting module path: C:\Windows\SysWOW64\ntdll.dll
Report Id: 014bdbd1-4e3f-11e4-830a-a240181b5488
这是造成崩溃的代码。集成摄像头打开,我看到绿灯紧接着发生撞击。 USB摄像头工作正常。
string videoDevice = "Integrated Camera"
string videoDeviceOption = "dshow-vdev=" + videoDevice ;
string output = @":sout=#transcode{vcodec=h264,vb=256,fps=30,scale=1,acodec=none}:udp{nux=ts,dst=127.0.0.1:8080} ";
media = factory.CreateMedia<IMedia>(@"dshow://", videoDeviceOption, output);
player = factory.CreatePlayer<IVideoPlayer>();
player.Open(media);
player.Play();