FromFileBase

Wrapper to stream a MP4 file with H264 video codec. Only Video is streamed, no Audio. Can be executed in background. API requirements: API 18+. Created by pedro on 7/07/17.

Inheritors

Constructors

Link copied to clipboard
constructor(videoDecoderInterface: VideoDecoderInterface, audioDecoderInterface: AudioDecoderInterface)
constructor(context: Context, videoDecoderInterface: VideoDecoderInterface, audioDecoderInterface: AudioDecoderInterface)
OpenGl mode, necessary context.
constructor(openGlView: OpenGlView, videoDecoderInterface: VideoDecoderInterface, audioDecoderInterface: AudioDecoderInterface)

Properties

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.
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
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 isStreaming(): Boolean
Get stream state.
Link copied to clipboard
open fun moveTo(time: Double)
Working but it is too slow.
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 setAudioExtractor(extractor: Extractor)
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.
Link copied to clipboard
open fun setRecordController(recordController: BaseRecordController)
Link copied to clipboard
open fun setTimestampMode(timestampModeVideo: TimestampMode, timestampModeAudio: TimestampMode)
Set the mode to calculate timestamp.
Link copied to clipboard
Set video bitrate of H264 in bits per second while stream.
Link copied to clipboard
open fun setVideoCodec(codec: VideoCodec)
Link copied to clipboard
open fun setVideoExtractor(extractor: Extractor)
Link copied to clipboard
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.
Link copied to clipboard
open fun stopStream()
Stop stream started with @startStream.