Class CameraPreview
An Android camera preview.
Inheritance
Inherited Members
Namespace: FM.LiveSwitch.Android
Assembly: FM.LiveSwitch.Android.dll
Syntax
public class CameraPreview
Constructors
CameraPreview(Context, LayoutScale)
Initializes a new instance of the CameraPreview class.
Declaration
public CameraPreview(Context context, LayoutScale scale)
Parameters
Type | Name | Description |
---|---|---|
Android.Content.Context | context | The context. |
LayoutScale | scale | The scale. |
Properties
CameraView
Gets the camera view.
Declaration
protected TextureView CameraView { get; }
Property Value
Type | Description |
---|---|
Android.Views.TextureView | The camera view. |
Context
Gets the context.
Declaration
public Context Context { get; }
Property Value
Type | Description |
---|---|
Android.Content.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 |
---|---|
Android.Views.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, View.LayoutChangeEventArgs)
Raised when layout change.
Declaration
public void OnLayoutChange(object sender, View.LayoutChangeEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The sender. |
Android.Views.View.LayoutChangeEventArgs | e | The Android.Views.View.LayoutChangeEventArgs instance containing the event data. |
OnSurfaceTextureAvailable(Object, TextureView.SurfaceTextureAvailableEventArgs)
Raised when surface texture available.
Declaration
public void OnSurfaceTextureAvailable(object sender, TextureView.SurfaceTextureAvailableEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The sender. |
Android.Views.TextureView.SurfaceTextureAvailableEventArgs | e |
OnSurfaceTextureDestroyed(Object, TextureView.SurfaceTextureDestroyedEventArgs)
Raised when surface texture destroyed.
Declaration
public void OnSurfaceTextureDestroyed(object sender, TextureView.SurfaceTextureDestroyedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The sender. |
Android.Views.TextureView.SurfaceTextureDestroyedEventArgs | e | The Android.Views.TextureView.SurfaceTextureDestroyedEventArgs instance containing the event data. |
SetCamera(Camera)
Sets the camera.
Declaration
public void SetCamera(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 |
---|---|---|
Android.Graphics.SurfaceTexture | surface | The surface. |
StopPreview()
Stops the preview.
Declaration
protected void StopPreview()
UpdateSurfaceSize()
Updates the size of the surface.
Declaration
protected void UpdateSurfaceSize()