Class CameraPreview
An Android camera preview.
Inheritance
System.Object
CameraPreview
Namespace: FM.LiveSwitch.Android
Assembly: FM.LiveSwitch.Android.dll
Syntax
public class CameraPreview : object
Constructors
CameraPreview(Context, LayoutScale)
Initializes a new instance of the CameraPreview class.
Declaration
public CameraPreview(Context context, LayoutScale scale)
Parameters
Type | Name | Description |
---|---|---|
Context | context | The context. |
LayoutScale | scale | The scale. |
Properties
CameraView
Gets the camera view.
Declaration
protected TextureView CameraView { get; }
Property Value
Type | Description |
---|---|
TextureView | The camera view. |
Context
Gets the context.
Declaration
public Context Context { get; }
Property Value
Type | Description |
---|---|
Context | The context. |
Muted
Declaration
public bool Muted { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
View
Gets the view.
Declaration
public View View { get; }
Property Value
Type | Description |
---|---|
View | The view. |
ViewScale
Gets or sets the view scale.
Declaration
public LayoutScale ViewScale { get; set; }
Property Value
Type | Description |
---|---|
LayoutScale | The view scale. |
Methods
Dispose()
Releases unmanaged and - optionally - managed resources.
Declaration
public void Dispose()
OnLayoutChange(Object, LayoutChangeEventArgs)
Raised when layout change.
Declaration
public void OnLayoutChange(object sender, LayoutChangeEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The sender. |
LayoutChangeEventArgs | e | The |
OnSurfaceTextureAvailable(Object, SurfaceTextureAvailableEventArgs)
Raised when surface texture available.
Declaration
public void OnSurfaceTextureAvailable(object sender, SurfaceTextureAvailableEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The sender. |
SurfaceTextureAvailableEventArgs | e |
OnSurfaceTextureDestroyed(Object, SurfaceTextureDestroyedEventArgs)
Raised when surface texture destroyed.
Declaration
public void OnSurfaceTextureDestroyed(object sender, SurfaceTextureDestroyedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The sender. |
SurfaceTextureDestroyedEventArgs | e | The |
SetCamera(Android.Hardware.Camera)
Sets the camera.
Declaration
public void SetCamera(Android.Hardware.Camera camera)
Parameters
Type | Name | Description |
---|---|---|
Android.Hardware.Camera | camera | The camera. |
SetCameraRotation(Int32)
Sets the camera rotation.
Declaration
public void SetCameraRotation(int cameraRotation)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | cameraRotation | The camera rotation. |
StartPreview(SurfaceTexture)
Starts the preview.
Declaration
protected void StartPreview(SurfaceTexture surface)
Parameters
Type | Name | Description |
---|---|---|
SurfaceTexture | surface | The surface. |
StopPreview()
Stops the preview.
Declaration
protected void StopPreview()
UpdateSurfaceSize()
Updates the size of the surface.
Declaration
protected void UpdateSurfaceSize()