VideoEncoder

Created by pedro on 19/01/17. This class need use same resolution, fps and imageFormat that Camera1ApiManagerGl

Constructors

Link copied to clipboard
constructor(getVideoData: GetVideoData)

Properties

Link copied to clipboard
open val bitRate: Int
Link copied to clipboard
open var fps: Int
Link copied to clipboard
open val height: Int
Link copied to clipboard
Link copied to clipboard
open var rotation: Int
Link copied to clipboard
open val width: Int

Functions

Link copied to clipboard
open fun forceCodecType(codecType: CodecUtil.CodecType)
Link copied to clipboard
open fun formatChanged(@NonNull mediaCodec: MediaCodec, @NonNull mediaFormat: MediaFormat)
Link copied to clipboard
open fun getType(): String
Link copied to clipboard
open fun inputAvailable(@NonNull mediaCodec: MediaCodec, inBufferIndex: Int)
abstract fun inputAvailable(mediaCodec: MediaCodec, inBufferIndex: Int)
Link copied to clipboard
open fun inputYUVData(frame: Frame)
Link copied to clipboard
open fun isRunning(): Boolean
Link copied to clipboard
open fun outputAvailable(@NonNull mediaCodec: MediaCodec, outBufferIndex: Int, @NonNull bufferInfo: MediaCodec.BufferInfo)
abstract fun outputAvailable(mediaCodec: MediaCodec, outBufferIndex: Int, bufferInfo: MediaCodec.BufferInfo)
Link copied to clipboard
Prepare encoder with default parameters
open fun prepareVideoEncoder(width: Int, height: Int, fps: Int, bitRate: Int, rotation: Int, iFrameInterval: Int, formatVideoEncoder: FormatVideoEncoder): Boolean

open fun prepareVideoEncoder(width: Int, height: Int, fps: Int, bitRate: Int, rotation: Int, iFrameInterval: Int, formatVideoEncoder: FormatVideoEncoder, profile: Int, level: Int): Boolean
Prepare encoder with custom parameters
Link copied to clipboard
Link copied to clipboard
open fun reset(): Boolean
Link copied to clipboard
open fun restart()
Link copied to clipboard
open fun setEncoderErrorCallback(encoderErrorCallback: EncoderErrorCallback)
Link copied to clipboard
open fun setForceFps(fps: Int)
Link copied to clipboard
open fun setTimestampMode(timestampMode: TimestampMode)
Link copied to clipboard
open fun setType(type: String)
Link copied to clipboard
Link copied to clipboard
open fun start()
open fun start(startTs: Long)
open fun start(resetTs: Boolean)
Link copied to clipboard
open fun stop()
open fun stop(resetTs: Boolean)