Package tvi.webrtc
Class Camera1Session
- java.lang.Object
-
- tvi.webrtc.Camera1Session
-
- All Implemented Interfaces:
CameraSession
public class Camera1Session extends java.lang.Object implements CameraSession
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface tvi.webrtc.CameraSession
CameraSession.CreateSessionCallback, CameraSession.Events, CameraSession.FailureType
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
create(CameraSession.CreateSessionCallback callback, CameraSession.Events events, boolean captureToTexture, android.content.Context applicationContext, SurfaceTextureHelper surfaceTextureHelper, java.lang.String cameraName, int width, int height, int framerate)
android.hardware.Camera
getCamera()
Get the camera object.CameraEnumerationAndroid.CaptureFormat
getCaptureFormat()
Get the current capture format.static void
initializeCallbackBuffer(CameraEnumerationAndroid.CaptureFormat captureFormat, android.hardware.Camera camera)
Initialize the camera callback buffer.void
listenForBytebufferFrames()
Start listening for frames captured to a buffer.void
listenForTextureFrames()
Start listening for frames captured to a surface texture.void
stop()
Stops the capture.
-
-
-
Method Detail
-
create
public static void create(CameraSession.CreateSessionCallback callback, CameraSession.Events events, boolean captureToTexture, android.content.Context applicationContext, SurfaceTextureHelper surfaceTextureHelper, java.lang.String cameraName, int width, int height, int framerate)
-
initializeCallbackBuffer
public static void initializeCallbackBuffer(CameraEnumerationAndroid.CaptureFormat captureFormat, android.hardware.Camera camera)
Initialize the camera callback buffer. This method can be used when starting the session or to re-initialize the session after applying an update to the camera object. TODO(titovartem) make correct fix during webrtc:9175
-
stop
public void stop()
Description copied from interface:CameraSession
Stops the capture. Waits until no more calls to capture observer will be made. If waitCameraStop is true, also waits for the camera to stop.- Specified by:
stop
in interfaceCameraSession
-
getCamera
public android.hardware.Camera getCamera()
Get the camera object.
-
getCaptureFormat
public CameraEnumerationAndroid.CaptureFormat getCaptureFormat()
Get the current capture format.
-
listenForTextureFrames
public void listenForTextureFrames()
Start listening for frames captured to a surface texture. This method should only be used if |captureToTexture| is true.
-
listenForBytebufferFrames
public void listenForBytebufferFrames()
Start listening for frames captured to a buffer. This method should only be used if |captureToTexture| is false.
-
-