Windows 10 1703 - Direct Show 和 Media Foundation 相机问题

Windows 10 1703 - Direct Show and Media Foundation camera issue

我们在 DirectShow 和 MediaFoundation 上看到一个奇怪的问题,即相机出现黑框。 在两个应用程序的 运行 MFTrace 上,我们看到 CMemInputPinDetours::Receive 没有被调用(与工作场景相比)。在什么情况下会发生这种情况? 问题仅出现在 Lenova 笔记本电脑上,并且仅出现在病房上的 Windows 10 1703(即创作者更新)。 DirectShow 应用程序的完整日志: Microsoft 示例 MFCaptureD3D 和 SimpleCapture 也不起作用! 不确定我们在这里缺少什么,有人可以帮忙吗?

部分MFTrace日志如下:

1252,D2C 14:16:36.74678 CGraphHelpers::Trace @000002CB48084CA0 >>>>>>>>>>>>> Run graph 1252,D2C 14:16:36.74679 CGraphBuilderDetours::EnumFilters @000002CB48084CA0 - enter 1252,D2C 14:16:36.74680 CGraphBuilderDetours::EnumFilters @000002CB48084CA0 - exit 1252,D2C 14:16:36.74681 CGraphHelpers::TraceFilter @ Filter @000002CB60D7BCF8, name 'SinkFilter', vendor '(null)' 1252,D2C 14:16:36.74684 CGraphHelpers::TracePin @ Input pin @000002CB6602BDD8 (IMemInputPin @000002CB6602BE98) name 'VideoCapture', connected to filter @000002CB48091158 pin @000002CB480C9228, MT: majortype=MEDIATYPE_Video;subtype=MFVideoFormat_YUY2;bFixedSizeSamples=1;bTemporalCompression=0;lSampleSize=1843200;formattype=FORMAT_VideoInfo;pUnk=@0000000000000000;cbFormat=88 1252,D2C 14:16:36.74684 CGraphHelpers::TraceFilter @ Filter @000002CB48091158, name 'VideoCaptureFilter', vendor '(null)' 1252,D2C 14:16:36.74686 CGraphHelpers::TracePin @ Output pin @000002CB480C9228 name 'Capture', connected to filter @000002CB60D7BCF8 pin @000002CB6602BDD8, MT: majortype=MEDIATYPE_Video;subtype=MFVideoFormat_YUY2;bFixedSizeSamples=1;bTemporalCompression=0;lSampleSize=1843200;formattype=FORMAT_VideoInfo;pUnk=@0000000000000000;cbFormat=88 1252,D2C 14:16:36.74687 CGraphHelpers::TracePin @ Input pin @000002CB48084A18 (IMemInputPin @000002CB48084AD8) name 'Video Camera Terminal', NOT CONNECTED(!!!) 1252,D2C 14:16:36.74687 CGraphHelpers::TracePin @ Output pin @000002CB480845F8 name 'Still', NOT CONNECTED(!!!) 1252,D2C 14:16:36.74687 CGraphHelpers::Trace @000002CB48084CA0 <<<<<<<<<<<<< Run graph 1252,D2C 14:16:36.74687 CGraphBuilderDetours::EnumFilters @000002CB48084CA0 - enter 1252,D2C 14:16:36.74688 CGraphBuilderDetours::EnumFilters @000002CB48084CA0 - exit 1252,D2C 14:16:36.74688 CMemInputPinDetours::Attach @00007FF80B790928 - enter 1252,D2C 14:16:36.74688 CInterfaceDetours::AttachVtbl @00007FF80B790928 - enter 1252,D2C 14:16:36.74688 CDetourHelpers::AttachInterface @ - enter 1252,D2C 14:16:36.74691 CDetourHelpers::AttachInterface @ - exit 1252,D2C 14:16:36.74691 CInterfaceDetours::AttachVtbl @00007FF80B790928 - exit 1252,D2C 14:16:36.74691 CMemInputPinDetours::Attach @00007FF80B790928 - exit 1252,D2C 14:16:36.74691 CMemInputPinDetours::Attach @00007FF8129B7D10 - enter 1252,D2C 14:16:36.74691 CInterfaceDetours::AttachVtbl @00007FF8129B7D10 - enter 1252,D2C 14:16:36.74692 CDetourHelpers::AttachInterface @ - enter 1252,D2C 14:16:36.74693 CDetourHelpers::AttachInterface @ - exit 1252,D2C 14:16:36.74693 CInterfaceDetours::AttachVtbl @00007FF8129B7D10 - exit 1252,D2C 14:16:36.74693 CMemInputPinDetours::Attach @00007FF8129B7D10 - exit 1252,D2C 14:16:36.74696 COle32ExportDetours::CoCreateInstance @ - enter 1252,D2C 14:16:36.74811 COle32ExportDetours::CoCreateInstance @ Created {E436EBB1-524F-11CE-9F53-0020AF0BA770} System Clock (C:\Windows\System32\quartz.dll) @000002CB4805CE68 - traced interfaces: 1252,D2C 14:16:36.74811 COle32ExportDetours::CoCreateInstance @ - exit 1252,D2C 14:16:36.74822 COle32ExportDetours::CoCreateInstance @ - enter 1252,D2C 14:16:36.74865 COle32ExportDetours::CoCreateInstance @ Created {877E4351-6FEA-11D0-B863-00AA00A216A1} Plug In Distributor: IKsClock (C:\Windows\System32\ksproxy.ax) @000002CB48090920 - traced interfaces: 1252,D2C 14:16:36.74865 COle32ExportDetours::CoCreateInstance @ - exit 1252,D2C 14:16:36.78381 CMediaControlDetours::Run @000002CB480C98E8 - exit 1252,D2C 14:16:36.78382 CMediaControlDetours::GetState @000002CB480C98E8 - enter 1252,D2C 14:16:36.78383 CMediaControlDetours::GetState @000002CB480C98E8 - exit 1252,1E08 14:16:54.49906 COle32ExportDetours::CoCreateInstance @ - enter 1252,1E08 14:16:54.49921 COle32ExportDetours::CoCreateInstance @ Created {9FC8E510-A27C-4B3B-B9A3-BF65F00256A8} (C:\WINDOWS\system32\dataexchange.dll) @000002CB4805BD40 - traced interfaces: 1252,1E08 14:16:54.49921 COle32ExportDetours::CoCreateInstance @ - exit 1252,D2C 14:16:54.57840 CMediaControlDetours::Pause @000002CB480C98E8 - enter 1252,D2C 14:16:54.58279 CMediaControlDetours::Pause @000002CB480C98E8 - exit 1252,D2C 14:16:54.58280 CMediaControlDetours::Stop @000002CB480C98E8 - enter 1252,D2C 14:16:54.79315 CMediaControlDetours::Stop @000002CB480C98E8 - exit

找到根本原因,卡巴斯基杀毒软件导致了这个问题,将我们的应用程序添加到信任列表解决了问题!

我们看到机器上正在使用卡巴斯基10,按照下面提到的步骤link解决了问题: https://support.kaspersky.com/9398#block2

如果有卡巴斯基2015,则可以使用下面的link来解决问题: https://support.kaspersky.com/11157#block1