The Android XR SDK is now available in Developer Preview. We want your feedback! Visit our
support page to reach out.
XR_ANDROID_passthrough_camera_state OpenXR extension
Stay organized with collections
Save and categorize content based on your preferences.
Name String
XR_ANDROID_passthrough_camera_state
Extension Type
Instance extension
Registered Extension Number
461
Revision
1
Extension and Version Dependencies
OpenXR 1.0
Last Modified Date
2024-09-05
Contributors
Spencer Quin, Google
Jared Finder, Google
Kevin Moule, Google
Nihav Jain, Google
Overview
The passthrough camera can take time to start up and may not be immediately
available. This extension lets applications know the current state of the
passthrough camera.
Get the current passthrough camera state
XrResult xrGetPassthroughCameraStateANDROID(
XrSession session,
const XrPassthroughCameraStateGetInfoANDROID* getInfo,
XrPassthroughCameraStateANDROID* cameraStateOutput);
Parameter Descriptions
session
is an XrSession handle previously created with xrCreateSession.
getInfo
is any info that will affect how camera state is determined.
cameraStateOutput
is the current state of the camera.
xrGetPassthroughCameraStateANDROID retrieves the current state of the
passthrough camera.
The XrPassthroughCameraStateGetInfoANDROID structure is an input/output
struct which specifies the camera state request
parameters.
typedef struct XrPassthroughCameraStateGetInfoANDROID {
XrStructureType type;
void* next;
} XrPassthroughCameraStateGetInfoANDROID;
Member Descriptions
type
is the XrStructureType of this structure.
next
is NULL
or a pointer to the next structure in a structure chain.
The XrPassthroughCameraStateANDROID enumeration identifies different states
which the passthrough camera can be in.
typedef enum XrPassthroughCameraStateANDROID {
XR_PASSTHROUGH_CAMERA_STATE_DISABLED_ANDROID = 0,
XR_PASSTHROUGH_CAMERA_STATE_INITIALIZING_ANDROID = 1,
XR_PASSTHROUGH_CAMERA_STATE_READY_ANDROID = 2,
XR_PASSTHROUGH_CAMERA_STATE_ERROR_ANDROID = 3,
XR_PASSTHROUGH_CAMERA_STATE_MAX_ENUM_ANDROID = 0x7FFFFFFF
} XrPassthroughCameraStateANDROID;
The enums have the following meanings:
Enum |
Description |
XR_PASSTHROUGH_CAMERA_STATE_DISABLED_ANDROID
|
The camera has been disabled by an app, the system or the user. |
XR_PASSTHROUGH_CAMERA_STATE_INITIALIZING_ANDROID
|
The camera is still coming online and not yet ready to use. |
XR_PASSTHROUGH_CAMERA_STATE_READY_ANDROID
|
The camera is ready to use. |
XR_PASSTHROUGH_CAMERA_STATE_ERROR_ANDROID
|
The camera is in an unrecoverable error state. |
New Object Types
New Flag Types
New Enum Constants
XrStructureType enumeration is extended with:
XR_TYPE_PASSTHROUGH_CAMERA_STATE_GET_INFO_ANDROID
New Enums
New Structures
New Functions
Issues
Version History
- Revision 1, 2024-09-05 (Spencer Quin)
- Initial version.
OpenXR™ and the OpenXR logo are trademarks owned
by The Khronos Group Inc. and are registered as a trademark in China,
the European Union, Japan and the United Kingdom.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-05-23 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-23 UTC."],[],[],null,["# XR_ANDROID_passthrough_camera_state OpenXR extension\n\n**Name String**\n\n`XR_ANDROID_passthrough_camera_state`\n\n**Extension Type**\n\nInstance extension\n\n**Registered Extension Number**\n\n461\n\n**Revision**\n\n1\n\n**Extension and Version Dependencies**\n\n[OpenXR 1.0](https://registry.khronos.org/OpenXR/specs/1.0/html/xrspec.html#versions-1.0)\n\n**Last Modified Date**\n\n2024-09-05\n\n**Contributors**\n\nSpencer Quin, Google\n\nJared Finder, Google\n\nKevin Moule, Google\n\nNihav Jain, Google\n\nOverview\n--------\n\nThe passthrough camera can take time to start up and may not be immediately\navailable. This extension lets applications know the current state of the\npassthrough camera.\n\nGet the current passthrough camera state\n----------------------------------------\n\n XrResult xrGetPassthroughCameraStateANDROID(\n XrSession session,\n const XrPassthroughCameraStateGetInfoANDROID* getInfo,\n XrPassthroughCameraStateANDROID* cameraStateOutput);\n\n### Parameter Descriptions\n\n- `session` is an [XrSession](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrSession) handle previously created with [xrCreateSession](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#xrCreateSession).\n- `getInfo` is any info that will affect how camera state is determined.\n- `cameraStateOutput` is the current state of the camera.\n\n[xrGetPassthroughCameraStateANDROID](#xrGetPassthroughCameraStateANDROID) retrieves the current state of the\npassthrough camera.\n\nThe [XrPassthroughCameraStateGetInfoANDROID](#XrPassthroughCameraStateGetInfoANDROID) structure is an input/output\nstruct which specifies the camera state request\nparameters. \n\n typedef struct XrPassthroughCameraStateGetInfoANDROID {\n XrStructureType type;\n void* next;\n } XrPassthroughCameraStateGetInfoANDROID;\n\n### Member Descriptions\n\n- `type` is the [XrStructureType](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrStructureType) of this structure.\n- `next` is `NULL` or a pointer to the next structure in a structure chain.\n\nThe [XrPassthroughCameraStateANDROID](#XrPassthroughCameraStateANDROID) enumeration identifies different states\nwhich the passthrough camera can be in. \n\n typedef enum XrPassthroughCameraStateANDROID {\n XR_PASSTHROUGH_CAMERA_STATE_DISABLED_ANDROID = 0,\n XR_PASSTHROUGH_CAMERA_STATE_INITIALIZING_ANDROID = 1,\n XR_PASSTHROUGH_CAMERA_STATE_READY_ANDROID = 2,\n XR_PASSTHROUGH_CAMERA_STATE_ERROR_ANDROID = 3,\n XR_PASSTHROUGH_CAMERA_STATE_MAX_ENUM_ANDROID = 0x7FFFFFFF\n } XrPassthroughCameraStateANDROID;\n\nThe enums have the following meanings:\n\n| Enum | Description |\n|----------------------------------------------------|-----------------------------------------------------------------|\n| `XR_PASSTHROUGH_CAMERA_STATE_DISABLED_ANDROID` | The camera has been disabled by an app, the system or the user. |\n| `XR_PASSTHROUGH_CAMERA_STATE_INITIALIZING_ANDROID` | The camera is still coming online and not yet ready to use. |\n| `XR_PASSTHROUGH_CAMERA_STATE_READY_ANDROID` | The camera is ready to use. |\n| `XR_PASSTHROUGH_CAMERA_STATE_ERROR_ANDROID` | The camera is in an unrecoverable error state. |\n\n**New Object Types**\n\n**New Flag Types**\n\n**New Enum Constants**\n\n[XrStructureType](https://registry.khronos.org/OpenXR/specs/1.1/html/xrspec.html#XrStructureType) enumeration is extended with:\n\n- `XR_TYPE_PASSTHROUGH_CAMERA_STATE_GET_INFO_ANDROID`\n\n**New Enums**\n\n- [XrPassthroughCameraStateANDROID](#XrPassthroughCameraStateANDROID)\n\n**New Structures**\n\n- [XrPassthroughCameraStateGetInfoANDROID](#XrPassthroughCameraStateGetInfoANDROID)\n\n**New Functions**\n\n- [xrGetPassthroughCameraStateANDROID](#xrGetPassthroughCameraStateANDROID)\n\n**Issues**\n\n**Version History**\n\n- Revision 1, 2024-09-05 (Spencer Quin)\n- Initial version.\n\n*** ** * ** ***\n\nOpenXR™ and the OpenXR logo are trademarks owned\nby The Khronos Group Inc. and are registered as a trademark in China,\nthe European Union, Japan and the United Kingdom."]]