Package-level declarations

Types

Link copied to clipboard
open class DualStreamer(val context: Context, val withAudio: Boolean = true, val withVideo: Boolean = true, firstEndpointFactory: IEndpointInternal.Factory = DynamicEndpointFactory(), secondEndpointFactory: IEndpointInternal.Factory = DynamicEndpointFactory(), defaultRotation: Int = context.displayRotation) : IDualStreamer, IAudioDualStreamer, IVideoDualStreamer

A class that handles 2 outputs.

Link copied to clipboard
data class DualStreamerAudioCodecConfig(val mimeType: String = MediaFormat.MIMETYPE_AUDIO_AAC, val startBitrate: Int, val profile: Int = getDefaultProfile(mimeType))

A data class that holds audio specific codec data.

Link copied to clipboard
Link copied to clipboard
data class DualStreamerVideoCodecConfig(val mimeType: String = MediaFormat.MIMETYPE_VIDEO_AVC, val startBitrate: Int, val resolution: Size = Size(1280, 720), val profile: Int = getBestProfile(mimeType), val level: Int = getBestLevel(mimeType, profile), val gopDurationInS: Float = 1.0f)

A data class that holds video specific codec data.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
class VideoOnlyDualStreamer(context: Context, firstEndpointFactory: IEndpointInternal.Factory = DynamicEndpointFactory(), secondEndpointFactory: IEndpointInternal.Factory = DynamicEndpointFactory(), defaultRotation: Int = context.displayRotation) : IDualStreamer, IVideoDualStreamer

A ISingleStreamer implementation for video only (without audio).

Functions

Link copied to clipboard
suspend fun cameraDualStreamer(context: Context, cameraId: String = context.defaultCameraId, audioSourceFactory: IAudioSourceInternal.Factory? = MicrophoneSourceFactory(), firstEndpointFactory: IEndpointInternal.Factory = DynamicEndpointFactory(), secondEndpointFactory: IEndpointInternal.Factory = DynamicEndpointFactory(), defaultRotation: Int = context.displayRotation): DualStreamer

Creates a DualStreamer with a default audio source.

Link copied to clipboard
suspend fun cameraVideoOnlyDualStreamer(context: Context, cameraId: String = context.defaultCameraId, firstEndpointFactory: IEndpointInternal.Factory = DynamicEndpointFactory(), secondEndpointFactory: IEndpointInternal.Factory = DynamicEndpointFactory(), defaultRotation: Int = context.displayRotation): VideoOnlyDualStreamer

Creates a VideoOnlyDualStreamer with the camera as video source and no audio source.

Link copied to clipboard
suspend fun DualStreamer(context: Context, audioSourceFactory: IAudioSourceInternal.Factory, videoSourceFactory: IVideoSourceInternal.Factory, firstEndpointFactory: IEndpointInternal.Factory, secondEndpointFactory: IEndpointInternal.Factory, defaultRotation: Int): DualStreamer

Creates a DualStreamer with an audio source and a video source.

Link copied to clipboard

Creates a DualStreamerAudioConfig with the same configuration for both audio streams.

fun DualStreamerAudioConfig(firstAudioCodecConfig: DualStreamerAudioCodecConfig = DualStreamerAudioCodecConfig(), secondAudioCodecConfig: DualStreamerAudioCodecConfig = DualStreamerAudioCodecConfig(), sampleRate: Int = DualStreamerAudioCodecConfig.getDefaultSampleRate( listOf( firstAudioCodecConfig.mimeType, secondAudioCodecConfig.mimeType ) ), channelConfig: Int = AudioFormat.CHANNEL_IN_STEREO, byteFormat: Int = AudioFormat.ENCODING_PCM_16BIT): DualStreamerAudioConfig

Creates a DualStreamerAudioConfig with different configuration for each audio stream.

Link copied to clipboard

Creates a DualStreamerVideoConfig with the same configuration for both video streams.

fun DualStreamerVideoConfig(fps: Int = 30, firstVideoCodecConfig: DualStreamerVideoCodecConfig = DualStreamerVideoCodecConfig(), secondVideoCodecConfig: DualStreamerVideoCodecConfig = DualStreamerVideoCodecConfig()): DualStreamerVideoConfig

Creates a DualStreamerVideoConfig with different configuration for each video stream.

Link copied to clipboard
suspend fun screenRecorderDualStreamer(context: Context, audioSourceFactory: IAudioSourceInternal.Factory? = MicrophoneSourceFactory(), firstEndpointFactory: IEndpointInternal.Factory = DynamicEndpointFactory(), secondEndpointFactory: IEndpointInternal.Factory = DynamicEndpointFactory(), defaultRotation: Int = context.displayRotation): DualStreamer

Creates a DualStreamer with the screen as video source and an audio source (by default, the microphone).

Link copied to clipboard
suspend fun screenRecorderVideoOnlyDualStreamer(context: Context, firstEndpointFactory: IEndpointInternal.Factory = DynamicEndpointFactory(), secondEndpointFactory: IEndpointInternal.Factory = DynamicEndpointFactory(), defaultRotation: Int = context.displayRotation): VideoOnlyDualStreamer

Creates a DualStreamer with the screen as video source and no audio source.

Link copied to clipboard
suspend fun VideoOnlyDualStreamer(context: Context, videoSourceFactory: IVideoSourceInternal.Factory, firstEndpointFactory: IEndpointInternal.Factory = DynamicEndpointFactory(), secondEndpointFactory: IEndpointInternal.Factory = DynamicEndpointFactory(), defaultRotation: Int = context.displayRotation): VideoOnlyDualStreamer

Creates a VideoOnlyDualStreamer with a default video source.