Apply ktlintFormat

Tool output only, no hand edits, so this is safe to read with whitespace
diffing off. It is its own commit for exactly that reason: a whole-repo
reformat folded into the commit that configured the formatter would have
made both unreviewable.

What it did, mostly: trailing commas on wrapped argument lists, signatures
collapsed onto one line where they fit inside 120 columns, import order, and
four genuinely unused imports removed. Unit tests pass unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-22 14:10:44 -05:00
co-authored by Claude Opus 5
parent 93b1fbd5a9
commit 496f1c7e73
35 changed files with 327 additions and 304 deletions
@@ -1,6 +1,5 @@
package org.libremediaconverter.codec
import android.media.MediaCodecInfo
import android.media.MediaCodecList
import android.media.MediaFormat
import android.util.Log
@@ -28,8 +27,7 @@ class AndroidDeviceCodecs private constructor(
private val decodeMimes: Set<String>,
) : DeviceCodecs {
override fun canEncode(codec: VideoCodec): Boolean =
mimeFor(codec)?.let { it in hardwareEncodeMimes } ?: true
override fun canEncode(codec: VideoCodec): Boolean = mimeFor(codec)?.let { it in hardwareEncodeMimes } ?: true
override fun canDecode(codecName: String): Boolean {
// The platform already failed to parse this input, so there is nothing to
@@ -46,8 +44,7 @@ class AndroidDeviceCodecs private constructor(
@Volatile
private var cached: AndroidDeviceCodecs? = null
fun get(): AndroidDeviceCodecs =
cached ?: synchronized(this) { cached ?: probe().also { cached = it } }
fun get(): AndroidDeviceCodecs = cached ?: synchronized(this) { cached ?: probe().also { cached = it } }
private fun probe(): AndroidDeviceCodecs {
val encoders = mutableSetOf<String>()
@@ -104,7 +101,6 @@ class AndroidDeviceCodecs private constructor(
}
/** Test seam: lets instrumented tests build a probe from explicit sets. */
fun forTesting(encoders: Set<String>, decoders: Set<String>) =
AndroidDeviceCodecs(encoders, decoders)
fun forTesting(encoders: Set<String>, decoders: Set<String>) = AndroidDeviceCodecs(encoders, decoders)
}
}