E_INVALIDARG One or more arguments are invalid while renderStream

mc 3,221 Reputation points

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,286 questions
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,317 questions
{count} votes

Accepted answer
  1. Castorix31 79,911 Reputation points

    See the PlayCap sample

    (CaptureVideo function in playcap.cpp)

0 additional answers

Sort by: Most helpful