E_INVALIDARG One or more arguments are invalid while renderStream

mc 4,516 Reputation points
2023-11-07T09:56:10.51+00:00

I want get camera preview and I can enumerate the device list

but in pBuild->RenderStream(&PIN_CATEGORY_PREVIEW, &MEDIATYPE_Video, pCap, NULL, NULL);

there is error one or moe arguments are invalid

I have init the pBuild and pCap

how to get preview of the camera?

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,628 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,737 questions
{count} votes

Accepted answer
  1. Castorix31 85,371 Reputation points
    2023-11-07T13:13:43.31+00:00

    See the PlayCap sample

    (CaptureVideo function in playcap.cpp)


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.