Skip to content

Commit fa2706b

Browse files
committed
refactor(core): use const to set media codec encoder tag
1 parent a27eab4 commit fa2706b

File tree

1 file changed

+4
-2
lines changed
  • core/src/main/java/io/github/thibaultbee/streampack/core/elements/encoders/mediacodec

1 file changed

+4
-2
lines changed

core/src/main/java/io/github/thibaultbee/streampack/core/elements/encoders/mediacodec/MediaCodecEncoder.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ import io.github.thibaultbee.streampack.core.elements.utils.extensions.put
3434
import io.github.thibaultbee.streampack.core.logger.Logger
3535
import kotlinx.coroutines.CoroutineDispatcher
3636
import kotlinx.coroutines.CoroutineScope
37-
import kotlinx.coroutines.Dispatchers
3837
import kotlinx.coroutines.SupervisorJob
3938
import kotlinx.coroutines.cancelChildren
4039
import kotlinx.coroutines.launch
@@ -64,7 +63,7 @@ internal constructor(
6463
private val frameFactory by lazy { FrameFactory(mediaCodec) }
6564

6665
private val isVideo = encoderConfig.isVideo
67-
private val tag = if (isVideo) "VideoEncoder" else "AudioEncoder" + "(${this.hashCode()})"
66+
private val tag = if (isVideo) VIDEO_ENCODER_TAG else AUDIO_ENCODER_TAG + "(${this.hashCode()})"
6867

6968

7069
private var state = State.IDLE
@@ -606,6 +605,9 @@ internal constructor(
606605
}
607606

608607
companion object {
608+
private const val AUDIO_ENCODER_TAG = "AudioEncoder"
609+
private const val VIDEO_ENCODER_TAG = "VideoEncoder"
610+
609611
/**
610612
* Create a [Frame] from a [MediaCodec] output buffer
611613
*

0 commit comments

Comments
 (0)