Skip to content

Commit

Permalink
chore: Remove unused ImageWriter
Browse files Browse the repository at this point in the history
  • Loading branch information
mrousavy committed Sep 13, 2023
1 parent 06409b0 commit cfed944
Showing 1 changed file with 0 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.mrousavy.camera.core

import android.content.Context
import android.media.ImageWriter
import android.media.MediaCodec
import android.media.MediaRecorder
import android.os.Build
Expand Down Expand Up @@ -37,7 +36,6 @@ class RecordingSession(context: Context,
private val recorder: MediaRecorder
private val outputFile: File
private var startTime: Long? = null
private var imageWriter: ImageWriter? = null
val surface: Surface = MediaCodec.createPersistentInputSurface()

init {
Expand Down Expand Up @@ -101,9 +99,6 @@ class RecordingSession(context: Context,
try {
recorder.stop()
recorder.release()

imageWriter?.close()
imageWriter = null
} catch (e: Error) {
Log.e(TAG, "Failed to stop MediaRecorder!", e)
}
Expand Down

0 comments on commit cfed944

Please sign in to comment.