Package tvi.webrtc
Class Camera1Session
java.lang.Object
tvi.webrtc.Camera1Session
- All Implemented Interfaces:
CameraSession
-
Nested Class Summary
Nested classes/interfaces inherited from interface tvi.webrtc.CameraSession
CameraSession.CreateSessionCallback, CameraSession.Events, CameraSession.FailureType -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcreate(CameraSession.CreateSessionCallback callback, CameraSession.Events events, boolean captureToTexture, android.content.Context applicationContext, SurfaceTextureHelper surfaceTextureHelper, String cameraName, int width, int height, int framerate) android.hardware.CameraGet the camera object.Get the current capture format.static voidinitializeCallbackBuffer(CameraEnumerationAndroid.CaptureFormat captureFormat, android.hardware.Camera camera) Initialize the camera callback buffer.voidStart listening for frames captured to a buffer.voidStart listening for frames captured to a surface texture.voidstop()Stops the capture.
-
Method Details
-
create
public static void create(CameraSession.CreateSessionCallback callback, CameraSession.Events events, boolean captureToTexture, android.content.Context applicationContext, SurfaceTextureHelper surfaceTextureHelper, 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:CameraSessionStops 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:
stopin interfaceCameraSession
-
getCamera
public android.hardware.Camera getCamera()Get the camera object. -
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.
-