Multiple camera support

The Video SDK for Windows can send more than one camera stream from a single user at the same time, for example a webcam and a document camera. You manage extra streams with IZoomVideoSDKVideoHelper, identifying each stream by its camera device ID. To get the available device IDs, see Get the camera list.

Enable or disable a multi-camera stream

To start sending an additional camera stream, call enableMultiStreamVideo with the camera's device ID. You can pass an optional custom name to label the stream. To stop the stream, call disableMultiStreamVideo with the same device ID.

IZoomVideoSDKVideoHelper* pVideoHelper = m_pVideoSDK->getVideoHelper();
// Start sending an additional camera stream.
pVideoHelper->enableMultiStreamVideo(cameraDeviceID);
// Stop sending it.
pVideoHelper->disableMultiStreamVideo(cameraDeviceID);

Mute or unmute a multi-camera stream

To temporarily stop sending frames for an additional stream without tearing it down, call muteMultiStreamVideo. Resume with unmuteMultiStreamVideo.

IZoomVideoSDKVideoHelper* pVideoHelper = m_pVideoSDK->getVideoHelper();
pVideoHelper->muteMultiStreamVideo(cameraDeviceID);
pVideoHelper->unmuteMultiStreamVideo(cameraDeviceID);

Render a remote multi-camera stream

When a remote user enables, mutes, or disables an additional stream, the SDK calls onMultiCameraStreamStatusChanged and passes the stream's status, the user, and the IZoomVideoSDKRawDataPipe for that stream. Subscribe to that pipe to render the extra stream the same way you render a user's main video.

void CExampleListener::onMultiCameraStreamStatusChanged(ZoomVideoSDKMultiCameraStreamStatus status, IZoomVideoSDKUser* pUser, IZoomVideoSDKRawDataPipe* pVideoPipe)
{
    // Subscribe to pVideoPipe to render the additional stream.
}

For the subscription and rendering flow, see Receive raw data.