IMFVirtualCamera::GetMediaSource method (mfvirtualcamera.h)
Gets an IMFMediaSource that provides media data from the virtual camera.
Syntax
HRESULT GetMediaSource(
IMFMediaSource **ppMediaSource
);
Parameters
ppMediaSource
A shared-client IMFMediaSource from the virtual camera.
Return value
Error code | Description |
---|---|
S_OK | Succeeded |
Remarks
GetMediaSource may not be called until after IMFVirtualCamera::Start has been successfully called. The IMFMediaSource returned in the ppMediaSource parameter is a media source that has reduced functionality. It is internally marked as a shared client. This media source is intended for apps to use as a local preview during virtual camera activation and configuration process.
If a full function IMFMediaSource is needed, the app must call MFCreateDeviceSource using the symbolic link name returned in the IMFAttributes after a IMFVirtualCamera::Start call. Doing so, however will result in an exclusive-control media source being created which, when activated, will lock out all other apps from using the virtual camera.
The lifetime of the IMFMediaSource retrieved by this method is directly tied to the lifetime of the IMFVirtualCamera from which it is obtained. If the IMFVirtualCamera is disposed or IMFVirtualCamera::Shutdown is called, the IMFMediaSource obtained from this method will also be shutdown.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Build 22000 |
Header | mfvirtualcamera.h |
Library | mfsensorgroup.lib |
DLL | mfsensorgroup.dll |