Table of Contents

Class CameraInfo

Information describing a camera device.

public sealed class CameraInfo : CameraMetadata
Inheritance
object
CameraInfo
Inherited Members
Extension Methods

Constructors

CameraInfo(string, AndroidJavaObject, Key?, Key?)

public CameraInfo(string cameraId, AndroidJavaObject native, CameraMetadata.Key? metaQuestSourceKey = null, CameraMetadata.Key? metaQuestPositionKey = null)

Parameters

cameraId string
native AndroidJavaObject
metaQuestSourceKey CameraMetadata.Key
metaQuestPositionKey CameraMetadata.Key

Fields

CameraId

The device ID of the camera.

public readonly string CameraId

Field Value

string

Eye

The eye the camera is closest to.

public readonly CameraInfo.CameraEye Eye

Field Value

CameraInfo.CameraEye

Intrinsics

The intrinsic data for this camera.

public readonly CameraInfo.CameraIntrinsics? Intrinsics

Field Value

CameraInfo.CameraIntrinsics

LensPoseRotation

The orientation of the camera relative to the sensor coordinate system, converted from Android sensor rotation space to Unity rotation space.

public readonly Quaternion? LensPoseRotation

Field Value

Quaternion?

LensPoseTranslation

The position of the camera's optical center, converted from Android sensor space to Unity space.

public readonly Vector3? LensPoseTranslation

Field Value

Vector3?

Source

The source of the camera feed.

public readonly CameraInfo.CameraSource Source

Field Value

CameraInfo.CameraSource

SupportedResolutions

The resolutions supported by this camera.

public readonly Resolution[] SupportedResolutions

Field Value

Resolution[]

SupportedStreamUseCases

The stream use cases supported by this camera, if any.

public readonly StreamUseCase[] SupportedStreamUseCases

Field Value

StreamUseCase[]

Remarks

Guaranteed to an empty array on devices < API Level 33.

Methods

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

Equals(CameraInfo?)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(CameraInfo? other)

Parameters

other CameraInfo

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

GetAvailableCaptureRequestKeys()

Returns the keys supported by this CameraDevice for querying with a CaptureRequest.

public CameraMetadata.Key[] GetAvailableCaptureRequestKeys()

Returns

Key[]

GetAvailableCaptureResultKeys()

Returns the keys supported by this CameraDevice for querying with a CaptureResult.

public CameraMetadata.Key[] GetAvailableCaptureResultKeys()

Returns

Key[]

GetAvailableSessionCharacteristicsKeys()

Returns the keys for this CameraDevice whose values are capture session specific.

public CameraMetadata.Key[] GetAvailableSessionCharacteristicsKeys()

Returns

Key[]

Remarks

Returns an empty array on devices < API Level 35.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

GetKeysNeedingPermission()

Returns a subset of the keys returned by GetKeys() with all keys that require camera clients to obtain the Manifest.permission.CAMERA permission.

public CameraMetadata.Key[] GetKeysNeedingPermission()

Returns

Key[]

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Operators

operator ==(CameraInfo?, CameraInfo?)

public static bool operator ==(CameraInfo? a, CameraInfo? b)

Parameters

a CameraInfo
b CameraInfo

Returns

bool

operator !=(CameraInfo?, CameraInfo?)

public static bool operator !=(CameraInfo? a, CameraInfo? b)

Parameters

a CameraInfo
b CameraInfo

Returns

bool