---
name: "SDL_GetCameraID"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_GetCameraID"
---

# SDL\_GetCameraID(3)

Get the instance ID of an opened camera.

## NAME

SDL\_GetCameraID - Get the instance ID of an opened camera.

## HEADER FILE

Defined in SDL3/SDL\_camera.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**SDL\_CameraID SDL\_GetCameraID(SDL\_Camera \*camera);**

## FUNCTION PARAMETERS

- *camera*

  an  **SDL\_Camera**\
    to query.

## RETURN VALUE

( **SDL\_CameraID** ) Returns the instance ID of the specified camera on success or 0 on failure; call  **SDL\_GetError** () for more information.

## THREAD SAFETY

It is safe to call this function from any thread.

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_OpenCamera**(3)](/SDL_OpenCamera/3.md)
