IBitmapSource

Properties

Link copied to clipboard
abstract val bitmap: Bitmap

Gets a bitmap to be displayed.

Link copied to clipboard
abstract val isPreviewingFlow: StateFlow<Boolean>

Flow of the last previewing state.

Functions

Link copied to clipboard
abstract fun <T> getPreviewSize(targetSize: Size, targetClass: Class<T>): Size

Gets the preview size from the target size.

Link copied to clipboard
abstract suspend fun hasPreview(): Boolean

Whether the video source has a preview.

Link copied to clipboard
abstract suspend fun requestRelease()

Requests to release the video source.

Link copied to clipboard
abstract suspend fun resetPreview()

Resets preview.

Link copied to clipboard
abstract suspend fun setPreview(surface: Surface)

Sets preview surface.

Link copied to clipboard
suspend fun IPreviewableSource.setPreview(surfaceHolder: SurfaceHolder)

Sets a preview surface holder.

suspend fun IPreviewableSource.setPreview(surfaceView: SurfaceView)
suspend fun IPreviewableSource.setPreview(textureView: TextureView)

Sets a preview surface.

Link copied to clipboard
abstract suspend fun startPreview()

Starts video preview.

abstract suspend fun startPreview(previewSurface: Surface)

Sets preview surface and start video preview.

Link copied to clipboard
suspend fun IPreviewableSource.startPreview(surfaceHolder: SurfaceHolder)
suspend fun IPreviewableSource.startPreview(surfaceView: SurfaceView)
suspend fun IPreviewableSource.startPreview(textureView: TextureView)

Starts audio and video capture. If you can prefer to call SingleStreamer.setAudioConfig before starting preview. It is a shortcut for setPreview and startPreview.

Link copied to clipboard
abstract suspend fun stopPreview()

Stops video preview.