RtmpFromFile

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

Created by pedro on 26/06/17.

Constructors

Link copied to clipboard
constructor(openGlView: OpenGlView, connectChecker: ConnectChecker, videoDecoderInterface: VideoDecoderInterface, audioDecoderInterface: AudioDecoderInterface)
constructor(context: Context, connectChecker: ConnectChecker, videoDecoderInterface: VideoDecoderInterface, audioDecoderInterface: AudioDecoderInterface)
constructor(connectChecker: ConnectChecker, videoDecoderInterface: VideoDecoderInterface, audioDecoderInterface: AudioDecoderInterface)

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open fun forceCodecType(codecTypeVideo: CodecUtil.CodecType, codecTypeAudio: CodecUtil.CodecType)
Link copied to clipboard
open fun forceFpsLimit(enabled: Boolean)

Force stream to work with fps selected in prepareVideo method. Must be called before prepareVideo. This is not recommend because could produce fps problems.

Link copied to clipboard
Link copied to clipboard
open fun getAudioTime(): Double
Link copied to clipboard
open fun getBitrate(): Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun getStreamClient(): RtmpStreamClient
Link copied to clipboard
open fun getStreamHeight(): Int
Link copied to clipboard
open fun getStreamWidth(): Int
Link copied to clipboard
Link copied to clipboard
open fun getVideoTime(): Double
Link copied to clipboard
Link copied to clipboard
open fun isRecording(): Boolean

Get record state.

Link copied to clipboard
open fun moveTo(time: Double)

Working but it is too slow. You need wait few seconds after call it to continue :(

Link copied to clipboard
open fun pauseRecord()
Link copied to clipboard
open fun playAudioDevice()
Link copied to clipboard
open fun prepareAudio(filePath: String): Boolean
open fun prepareAudio(context: Context, uri: Uri): Boolean
open fun prepareAudio(fileDescriptor: FileDescriptor, bitRate: Int): Boolean
open fun prepareAudio(filePath: String, bitRate: Int): Boolean
open fun prepareAudio(context: Context, uri: Uri, bitRate: Int): Boolean
Link copied to clipboard
open fun prepareVideo(fileDescriptor: FileDescriptor): Boolean
open fun prepareVideo(filePath: String): Boolean
open fun prepareVideo(context: Context, uri: Uri): Boolean
open fun prepareVideo(fileDescriptor: FileDescriptor, bitRate: Int, rotation: Int): Boolean
open fun prepareVideo(filePath: String, bitRate: Int, rotation: Int): Boolean
open fun prepareVideo(context: Context, uri: Uri, bitRate: Int, rotation: Int): Boolean
open fun prepareVideo(fileDescriptor: FileDescriptor, bitRate: Int, rotation: Int, profile: Int, level: Int): Boolean
open fun prepareVideo(filePath: String, bitRate: Int, rotation: Int, profile: Int, level: Int): Boolean
open fun prepareVideo(context: Context, uri: Uri, bitRate: Int, rotation: Int, profile: Int, level: Int): Boolean
Link copied to clipboard
open fun replaceAudioFile(fileDescriptor: FileDescriptor)
open fun replaceAudioFile(filePath: String)
open fun replaceAudioFile(context: Context, uri: Uri)
Link copied to clipboard
open fun replaceVideoFile(fileDescriptor: FileDescriptor)
open fun replaceVideoFile(filePath: String)
open fun replaceVideoFile(context: Context, uri: Uri)
Link copied to clipboard
open fun replaceView(context: Context)
open fun replaceView(openGlView: OpenGlView)
Link copied to clipboard
open fun requestKeyFrame()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun resumeRecord()
Link copied to clipboard
open fun reSyncFile()
Link copied to clipboard
open fun setAudioCodec(codec: AudioCodec)
Link copied to clipboard
open fun setEncoderErrorCallback(encoderErrorCallback: EncoderErrorCallback)

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

Link copied to clipboard
Link copied to clipboard
open fun setLoopMode(loopMode: Boolean)

If you want reproduce video in loop. This mode clear all effects or stream object when video is restarted. TODO: No clear it.

Link copied to clipboard
open fun setRecordController(recordController: BaseRecordController)
Link copied to clipboard
@RequiresApi(api = 19)
open fun setVideoBitrateOnFly(bitrate: Int)

Set video bitrate of H264 in bits per second while stream.

Link copied to clipboard
open fun setVideoCodec(codec: VideoCodec)
Link copied to clipboard
@RequiresApi(api = 26)
open fun startRecord(@NonNull fd: FileDescriptor)
open fun startRecord(@NonNull path: String)

Starts recording a MP4 video.

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

Need be called after @prepareVideo.

Link copied to clipboard
open fun stopAudioDevice()
Link copied to clipboard
open fun stopRecord()

Stop record MP4 video 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.