ACameraDevice
NameSpace: Camera
Inherits from:
INullablePointer,
IDisposable
Public Fields
Id
Note: Be careful when repeatedly accessing this property, because it allocates a new C# string each time and can generate additional GC pressure.
public string Id { get; set; }
Public Methods
void Dispose
public void Dispose()
bool TryCreateCaptureRequest
public bool TryCreateCaptureRequest(
ACaptureRequest.Template template,
out ACaptureRequest request
)
Parameters
Type | Name | Description |
---|---|---|
ACaptureRequest.Template | template | |
out ACaptureRequest | request |
bool TryCreateCaptureSession
public bool TryCreateCaptureSession(
ACaptureSessionOutputContainer container,
out ACameraCaptureSession session
)
Parameters
Type | Name | Description |
---|---|---|
ACaptureSessionOutputContainer | container | |
out ACameraCaptureSession | session |
bool TryCreateCaptureSessionWithCallbacks
public bool TryCreateCaptureSessionWithCallbacks(
ACaptureSessionOutputContainer container,
ACameraCaptureSession.StateCallbacks callbacks,
out ACameraCaptureSession session
)
Parameters
Type | Name | Description |
---|---|---|
ACaptureSessionOutputContainer | container | |
ACameraCaptureSession.StateCallbacks | callbacks | |
out ACameraCaptureSession | session |
Public Attributes
IsNull
public bool IsNull => value == IntPtr.Zero;
Public Enums
ErrorCode
Enumerator | Value | Description |
---|---|---|
CameraInUse | 1 | The camera device is in use already. |
MaxCamerasInUse | 2 | The system-wide limit for number of open cameras or camera resources has been reached, and more camera devices cannot be opened until previous instances are closed. |
CameraDisabled | 3 | The camera is disabled due to a device policy, and cannot be opened. |
CameraDeviceFatalError | 4 | The camera device has encountered a fatal error. The camera device needs to be re-opened to be used again. |
CameraServiceFatalError | 5 | The camera service has encountered a fatal error. The Android device may need to be shut down and restarted to restore camera function, or there may be a persistent hardware problem. An attempt at recovery may be possible by closing the CameraDevice and the CameraManager, and trying to acquire all resources again from scratch. |