Refactorgin

hh
Laurent 5 years ago
parent 995c476467
commit a5c95d2131
  1. 10
      app/src/main/java/net/pokeranalytics/android/util/video/MMediaMuxer.kt

@ -27,7 +27,7 @@ class MMediaMuxer {
private var bitList: MutableList<ByteArray>? = null
private var bitFirst: MutableList<ByteArray>? = null
private var bitLast: MutableList<ByteArray>? = null
private var current_index_frame = 0
private var currentIndexFrame = 0
private var outputPath: String? = null
private var _activity: Activity? = null
private var pd: ProgressDialog? = null
@ -83,7 +83,7 @@ class MMediaMuxer {
}
fun CreateVideo() {
current_index_frame = 0
currentIndexFrame = 0
Logd("Prepare Frames Data")
bitFirst!!.addAll(bitList!!)
bitFirst!!.addAll(bitLast!!)
@ -224,7 +224,7 @@ class MMediaMuxer {
FRAME_RATE
)
if (inputBufIndex >= 0) {
val input = bitFirst!![current_index_frame]
val input = bitFirst!![currentIndexFrame]
val inputBuffer = mediaCodec!!.getInputBuffer(inputBufIndex)
inputBuffer.clear()
inputBuffer.put(input)
@ -258,8 +258,8 @@ class MMediaMuxer {
mediaCodec!!.releaseOutputBuffer(encoderStatus, false)
}
}
current_index_frame++
if (current_index_frame > MAX_FRAME_VIDEO - 1) {
currentIndexFrame++
if (currentIndexFrame > MAX_FRAME_VIDEO - 1) {
Log.d(TAG, "mRunning = false;")
mRunning = false
}

Loading…
Cancel
Save