amazon-chime-sdk / com.amazonaws.services.chime.sdk.meetings.audiovideo.video.capture / VideoCaptureSource

# VideoCaptureSource

`interface VideoCaptureSource : VideoSource`

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.

### Functions

#### addCaptureSourceObserver | Add a capture source observer to receive callbacks from the source on lifecycle events which can be used to trigger UI. This observer is entirely optional. `abstract fun addCaptureSourceObserver(observer: CaptureSourceObserver): Unit`
#### removeCaptureSourceObserver | Remove a capture source observer `abstract fun removeCaptureSourceObserver(observer: CaptureSourceObserver): Unit`
#### setMaxResolution | Set max resolution for video capture source DefaultCameraCaptureSource and DefaultScreenCaptureSource call this function to set max resolution for camera and screen capture `abstract fun setMaxResolution(maxResolution: VideoResolution): Unit`
#### start | Start capturing on this source and emitting video frames `abstract fun start(): Unit`
#### stop | Stop capturing on this source and cease emitting video frames `abstract fun stop(): Unit`

### Inheritors

#### CameraCaptureSource | CameraCaptureSource is an interface for camera capture sources with additional features not covered by VideoCaptureSource. `interface CameraCaptureSource : VideoCaptureSource`
#### DefaultScreenCaptureSource | 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. `class DefaultScreenCaptureSource : VideoCaptureSource, VideoSink`
#### SurfaceTextureCaptureSource | 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. `interface SurfaceTextureCaptureSource : VideoCaptureSource`