fm.liveswitch.android.CameraPreview Class Reference

Public Member Functions

Context getContext ()
 
LayoutScale getViewScale ()
 
void setViewScale (LayoutScale scale)
 
View getView ()
 
void setMuted (final boolean muted)
 
boolean getMuted ()
 
void adjustTextureScale (float scaleX)
 
 CameraPreview (final Context context, LayoutScale scale)
 
void onSurfaceTextureAvailable (SurfaceTexture surface, int width, int height)
 
void onSurfaceTextureSizeChanged (SurfaceTexture surface, int width, int height)
 
boolean onSurfaceTextureDestroyed (SurfaceTexture surface)
 
void onSurfaceTextureUpdated (SurfaceTexture surface)
 
void onLayoutChange (View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom)
 

Protected Member Functions

TextureView getCameraView ()
 
void setCamera (Camera camera)
 
void setCamera (Camera2Source camera)
 
void updateSurfaceSize ()
 
void setCameraRotation (int cameraRotation)
 
void startPreview (SurfaceTexture surface)
 
void stopPreview ()
 

Protected Attributes

float mTextureScaleProperty = 1.0f
 

Constructor & Destructor Documentation

◆ CameraPreview()

fm.liveswitch.android.CameraPreview.CameraPreview ( final Context  context,
LayoutScale  scale 
)

Member Function Documentation

◆ adjustTextureScale()

void fm.liveswitch.android.CameraPreview.adjustTextureScale ( float  scaleX)

◆ getCameraView()

TextureView fm.liveswitch.android.CameraPreview.getCameraView ( )
protected

◆ getContext()

Context fm.liveswitch.android.CameraPreview.getContext ( )

◆ getMuted()

boolean fm.liveswitch.android.CameraPreview.getMuted ( )

◆ getView()

View fm.liveswitch.android.CameraPreview.getView ( )

◆ getViewScale()

LayoutScale fm.liveswitch.android.CameraPreview.getViewScale ( )

◆ onLayoutChange()

void fm.liveswitch.android.CameraPreview.onLayoutChange ( View  v,
int  left,
int  top,
int  right,
int  bottom,
int  oldLeft,
int  oldTop,
int  oldRight,
int  oldBottom 
)

◆ onSurfaceTextureAvailable()

void fm.liveswitch.android.CameraPreview.onSurfaceTextureAvailable ( SurfaceTexture  surface,
int  width,
int  height 
)

◆ onSurfaceTextureDestroyed()

boolean fm.liveswitch.android.CameraPreview.onSurfaceTextureDestroyed ( SurfaceTexture  surface)

◆ onSurfaceTextureSizeChanged()

void fm.liveswitch.android.CameraPreview.onSurfaceTextureSizeChanged ( SurfaceTexture  surface,
int  width,
int  height 
)

◆ onSurfaceTextureUpdated()

void fm.liveswitch.android.CameraPreview.onSurfaceTextureUpdated ( SurfaceTexture  surface)

◆ setCamera() [1/2]

void fm.liveswitch.android.CameraPreview.setCamera ( Camera  camera)
protected

◆ setCamera() [2/2]

void fm.liveswitch.android.CameraPreview.setCamera ( Camera2Source  camera)
protected

◆ setCameraRotation()

void fm.liveswitch.android.CameraPreview.setCameraRotation ( int  cameraRotation)
protected

◆ setMuted()

void fm.liveswitch.android.CameraPreview.setMuted ( final boolean  muted)

◆ setViewScale()

void fm.liveswitch.android.CameraPreview.setViewScale ( LayoutScale  scale)

◆ startPreview()

void fm.liveswitch.android.CameraPreview.startPreview ( SurfaceTexture  surface)
protected

◆ stopPreview()

void fm.liveswitch.android.CameraPreview.stopPreview ( )
protected

◆ updateSurfaceSize()

void fm.liveswitch.android.CameraPreview.updateSurfaceSize ( )
protected

Member Data Documentation

◆ mTextureScaleProperty

float fm.liveswitch.android.CameraPreview.mTextureScaleProperty = 1.0f
protected