MediaMixer

class MediaMixer(context: Context, val isRunning: AtomicBoolean = AtomicBoolean(false)) : MediaOutputDataSource, CoroutineScope, DefaultLifecycleObserver, Running

Mixing audio and video for streaming.

Constructors

Link copied to clipboard
constructor(context: Context, isRunning: AtomicBoolean = AtomicBoolean(false))

Properties

Link copied to clipboard

Specifies the audio mixer settings.

Link copied to clipboard
Link copied to clipboard
open override val hasAudio: Boolean

Whether audio source is enabled or not.

Link copied to clipboard
open override val hasVideo: Boolean

Whether video source is enabled or not.

Link copied to clipboard
open override val isRunning: AtomicBoolean

Indicates whether the receiver is running.

Link copied to clipboard

Specifies the device torch indicating whether the turn on(TRUE) or not(FALSE).

Link copied to clipboard
open override val screen: Screen

The offscreen renderer for video output.

Functions

Link copied to clipboard
suspend fun attachAudio(track: Int, audio: AudioSource?): Result<Unit>

Attaches a audio source.

Link copied to clipboard
suspend fun attachVideo(track: Int, video: VideoSource?): Result<Unit>

Attaches a video source.

Link copied to clipboard
fun dispose()

Disposes the stream of memory management.

Link copied to clipboard
open fun onCreate(owner: LifecycleOwner)
Link copied to clipboard
open fun onDestroy(owner: LifecycleOwner)
Link copied to clipboard
open fun onPause(owner: LifecycleOwner)
Link copied to clipboard
open fun onResume(owner: LifecycleOwner)
Link copied to clipboard
open fun onStart(owner: LifecycleOwner)
Link copied to clipboard
open fun onStop(owner: LifecycleOwner)
Link copied to clipboard
open override fun registerOutput(output: MediaOutput)

Registers an output instance.

Link copied to clipboard
fun setVideoEffect(track: Int, videoEffect: VideoEffect)

Sets a video effect.

Link copied to clipboard
open override fun startRunning()

Tells the receiver to start running.

Link copied to clipboard
open override fun stopRunning()

Tells the receiver to stop running.

Link copied to clipboard
open override fun unregisterOutput(output: MediaOutput)

Unregisters an output instance.