# Camera controls

<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

The Video SDK for Windows lets you control the local camera during a session: select and switch cameras, and mirror or rotate the local video. You configure cameras with `IZoomVideoSDKVideoHelper`, obtained from `getVideoHelper`. For starting and stopping video, see [Core features](/docs/video-sdk/windows/video/).

## Get the camera list

To enumerate the cameras attached to the machine, call `getCameraList`. Each `IZoomVideoSDKCameraDevice` exposes its name and ID through `getDeviceName` and `getDeviceId`.

```cpp
IZoomVideoSDKVideoHelper* pVideoHelper = m_pVideoSDK->getVideoHelper();

if (pVideoHelper->getNumberOfCameras() > 0)
{
    IVideoSDKVector<IZoomVideoSDKCameraDevice*>* pCameraList = pVideoHelper->getCameraList();
    for (int i = 0; i < pCameraList->GetCount(); i++)
    {
        IZoomVideoSDKCameraDevice* pCamera = pCameraList->GetItem(i);
        // Inspect pCamera->getDeviceName() and pCamera->getDeviceId().
    }
}
```

## Select a camera

To select a specific camera, pass its device ID to `selectCamera`.

```cpp
IVideoSDKVector<IZoomVideoSDKCameraDevice*>* pCameraList = pVideoHelper->getCameraList();
IZoomVideoSDKCameraDevice* pCamera = pCameraList->GetItem(0);
pVideoHelper->selectCamera(pCamera->getDeviceId());
```

## Switch camera

To cycle to the next available camera, call `switchCamera` with no arguments.

```cpp
IZoomVideoSDKVideoHelper* pVideoHelper = m_pVideoSDK->getVideoHelper();
if (pVideoHelper) {
    pVideoHelper->switchCamera();
}
```

## Mirror the local video

To mirror the local user's video, call `mirrorMyVideo`. Read the current state with `isMyVideoMirrored`.

```cpp
IZoomVideoSDKVideoHelper* pVideoHelper = m_pVideoSDK->getVideoHelper();

// Mirror the local video.
pVideoHelper->mirrorMyVideo(true);

// Check whether the local video is mirrored.
bool isMirrored = pVideoHelper->isMyVideoMirrored();
```

## Rotate the local video

To rotate the local user's video, for example to match a device that is mounted sideways, call `rotateMyVideo` with a `VideoRotation` value.

```cpp
IZoomVideoSDKVideoHelper* pVideoHelper = m_pVideoSDK->getVideoHelper();
pVideoHelper->rotateMyVideo(VideoRotation_90);
```

`rotateMyVideo` takes one of the following values.

-   `VideoRotation_0`
-   `VideoRotation_90`
-   `VideoRotation_180`
-   `VideoRotation_270`

## Alpha channel mode

The SDK can produce a per-pixel alpha mask alongside the local video frame, which is useful for compositing the user over custom backgrounds. For details, see [Raw video with alpha channel](/docs/video-sdk/windows/raw-data/raw-video-alpha-channel/).
