Android XR SDK 现已推出开发者预览版。我们期望收到您的反馈!请访问我们的
支持页面与我们联系。
XR_ANDROID_passthrough_camera_state OpenXR 扩展
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
名称字符串
XR_ANDROID_passthrough_camera_state
扩展程序类型
实例扩展
已注册的扩展号码
461
修订版本
1
扩展程序和版本依赖项
OpenXR 1.0
上次修改日期
2024-09-05
创作贡献者
Spencer Quin,Google
Jared Finder,Google
Kevin Moule,Google
Nihav Jain,Google
概览
透视摄像头可能需要一些时间才能启动,并且可能无法立即使用。借助此扩展程序,应用可以了解透视摄像头的当前状态。
获取当前的透传摄像头状态
XrResult xrGetPassthroughCameraStateANDROID(
XrSession session,
const XrPassthroughCameraStateGetInfoANDROID* getInfo,
XrPassthroughCameraStateANDROID* cameraStateOutput);
参数说明
xrGetPassthroughCameraStateANDROID 用于检索透视相机的当前状态。
XrPassthroughCameraStateGetInfoANDROID 结构是一个输入/输出结构体,用于指定相机状态请求参数。
typedef struct XrPassthroughCameraStateGetInfoANDROID {
XrStructureType type;
void* next;
} XrPassthroughCameraStateGetInfoANDROID;
成员说明
XrPassthroughCameraStateANDROID 枚举用于标识透视摄像头可以处于的不同状态。
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;
枚举的含义如下:
枚举 |
说明 |
XR_PASSTHROUGH_CAMERA_STATE_DISABLED_ANDROID
|
相机已被应用、系统或用户停用。 |
XR_PASSTHROUGH_CAMERA_STATE_INITIALIZING_ANDROID
|
摄像头仍在上线中,尚无法使用。 |
XR_PASSTHROUGH_CAMERA_STATE_READY_ANDROID
|
摄像头可以使用了。 |
XR_PASSTHROUGH_CAMERA_STATE_ERROR_ANDROID
|
摄像头处于不可恢复的错误状态。 |
新的对象类型
新的标志类型
新的枚举常量
XrStructureType 枚举已扩展为:
XR_TYPE_PASSTHROUGH_CAMERA_STATE_GET_INFO_ANDROID
新枚举
新结构
新函数
问题
版本历史记录
- 修订版 1,2024 年 9 月 5 日(Spencer Quin)
- 初始版本。
OpenXR™ 和 OpenXR 徽标是 Khronos Group Inc. 拥有的商标,已在中国、欧盟、日本和英国注册为商标。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-27。
[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],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."]]