RtspOnlyAudio

class RtspOnlyAudio(connectChecker: ConnectChecker) : OnlyAudioBase

More documentation see: com.pedro.library.base.OnlyAudioBase

Created by pedro on 10/07/18.

Constructors

Link copied to clipboard
constructor(connectChecker: ConnectChecker)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open fun disableAudio()

Mute microphone, can be called before, while and after stream.

Link copied to clipboard
open fun enableAudio()

Enable a muted microphone, can be called before, while and after stream.

Link copied to clipboard
open fun forceCodecType(codecTypeAudio: CodecUtil.CodecType)
Link copied to clipboard
Link copied to clipboard
open override fun getStreamClient(): RtspStreamClient
Link copied to clipboard
open fun isAudioMuted(): Boolean

Get mute state of microphone.

Link copied to clipboard
open fun isRecording(): Boolean

Get record state.

Link copied to clipboard
open fun pauseRecord()
Link copied to clipboard
open fun prepareAudio(): Boolean

Same to call: prepareAudio(64 * 1024, 32000, true, false, false);

open fun prepareAudio(bitrate: Int, sampleRate: Int, isStereo: Boolean): Boolean
open fun prepareAudio(bitrate: Int, sampleRate: Int, isStereo: Boolean, echoCanceler: Boolean, noiseSuppressor: Boolean): Boolean

open fun prepareAudio(audioSource: Int, bitrate: Int, sampleRate: Int, isStereo: Boolean, echoCanceler: Boolean, noiseSuppressor: Boolean): Boolean

Call this method before use @startStream. If not you will do a stream without audio.

Link copied to clipboard
Link copied to clipboard
open fun resumeRecord()
Link copied to clipboard
open fun setAudioCodec(codec: AudioCodec)
Link copied to clipboard
open fun setCustomAudioEffect(customAudioEffect: CustomAudioEffect)

Set an audio effect modifying microphone's PCM buffer.

Link copied to clipboard
open fun setEncoderErrorCallback(encoderErrorCallback: EncoderErrorCallback)

Set a callback to know errors related with Video/Audio encoders

Link copied to clipboard
open fun setMicrophoneMode(microphoneMode: MicrophoneMode)

Must be called before prepareAudio.

Link copied to clipboard
open fun setRecordController(recordController: BaseRecordController)
Link copied to clipboard
@RequiresApi(api = 26)
open fun startRecord(@NonNull fd: FileDescriptor)
@RequiresApi(api = 18)
open fun startRecord(path: String)

@RequiresApi(api = 18)
open fun startRecord(path: String, listener: RecordController.Listener)

Starts recording an AAC audio.

Link copied to clipboard
open fun startStream(url: String)

Need be called after @prepareVideo or/and @prepareAudio.

Link copied to clipboard
@RequiresApi(api = 18)
open fun stopRecord()

Stop record AAC audio started with @startRecord. If you don't call it file will be unreadable.

Link copied to clipboard
open fun stopStream()

Stop stream started with @startStream.