Skip to content

OpenCV to MSMF #27643

@DMorgenstern

Description

@DMorgenstern

System Information

OpenCV v4.12.0
VisualStudio 17.14.11
Windows 11

Detailed description

Using OpenCV sample code "videocapture_camera.cpp" unchanged, each frame capture / imshow function produces multiple exceptions (in VS debugger) of the type:

Exception thrown at 0x00007FFBD37A7F9A in VidCap.exe: Microsoft C++ exception: _com_error at memory location 0x0000005D01EFE990

Apart from this, the sample app appears to work correctly. Exceptions disappear when using CAP_DSHOW apiPreference.

I understand (from comments in https://forum.opencv.org/t/repeated-com-error-with-vidcap-in-vs17/23646) that "the code connecting OpenCV to MSMF (media foundation) is not as “trodden” as the DSHOW backend".

Steps to reproduce

Using OpenCV sample code "videocapture_camera.cpp" unchanged:
opencv/samples/cpp/videocapture_camera.cpp at master · opencv/opencv · GitHub

Issue submission checklist

  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
  • I updated to the latest OpenCV version and the issue is still there
  • There is reproducer code and related data files (videos, images, onnx, etc)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions