Package-level declarations

Types

Link copied to clipboard

CameraCaptureSource is an interface for camera capture sources with additional features not covered by VideoCaptureSource.

Link copied to clipboard

CaptureSourceError describes an error resulting from a capture source failure These can be used to trigger UI, or attempt to restart the capture source.

Link copied to clipboard

CaptureSourceObserver observes events resulting from different types of capture devices. Builders may desire this input to decide when to show certain UI elements, or to notify users of failure.

Link copied to clipboard
class DefaultCameraCaptureSource @JvmOverloads constructor(context: Context, logger: Logger, surfaceTextureCaptureSourceFactory: SurfaceTextureCaptureSourceFactory, cameraManager: CameraManager = context.getSystemService( Context.CAMERA_SERVICE ) as CameraManager) : CameraCaptureSource, VideoSink

DefaultCameraCaptureSource will configure a reasonably standard capture stream which will use the Surface provided by the capture source provided by a SurfaceTextureCaptureSourceFactory

Link copied to clipboard
class DefaultScreenCaptureSource(context: Context, logger: Logger, surfaceTextureCaptureSourceFactory: SurfaceTextureCaptureSourceFactory, activityResultCode: Int, activityData: Intent, displayManager: DisplayManager = context.getSystemService(Context.DISPLAY_SERVICE) as DisplayManager, mediaProjectionManager: MediaProjectionManager = context.getSystemService(MEDIA_PROJECTION_SERVICE) as MediaProjectionManager) : VideoCaptureSource, VideoSink

DefaultScreenCaptureSource uses MediaProjection to create a VirtualDisplay to capture the device screen. It will render the captured frames to a Surface provided by a SurfaceTextureCaptureSourceFactory.

Link copied to clipboard
class DefaultSurfaceTextureCaptureSource(logger: Logger, width: Int, height: Int, val contentHint: VideoContentHint = VideoContentHint.None, eglCoreFactory: EglCoreFactory) : SurfaceTextureCaptureSource

DefaultSurfaceTextureCaptureSource will provide a Surface which it will listen to and convert to VideoFrameTextureBuffer objects

Link copied to clipboard

ScreenCaptureResolutionCalculator calculates scaled resolution based on input resolution and target resolution constraint

Link copied to clipboard

SurfaceTextureCaptureSource provides a Surface which can be passed to system sources like the camera. Upon start call, the source will listen to the surface and emit any new images as VideoFrame objects to any downstream VideoSink interfaces. This class is mostly intended for composition within VideoSource implementations which will pass the created Surface to a system source, then call addVideoSink to receive the frames before transforming and passing downstream.

Link copied to clipboard

SurfaceTextureCaptureSourceFactory is an factory interface for creating new SurfaceTextureCaptureSource objects, possible using shared state. This provides flexibility over use of SurfaceTextureCaptureSource objects since they may not allow reuse, or may have a delay before possible reuse.

Link copied to clipboard
data class VideoCaptureFormat(val width: Int, val height: Int, val maxFps: Int)

VideoCaptureFormat describes a given capture format that can be set to a VideoCaptureSource. Note that VideoCaptureSource implementations may ignore or adjust unsupported values.

Link copied to clipboard

VideoCaptureSource is an interface for various video capture sources (i.e. screen, camera, file) which can emit VideoFrame objects All the APIs here can be called regardless of whether the AudioVideoFacade is started or not.