Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.compose)
}

Expand All @@ -15,7 +14,7 @@ val keystoreProps = Properties().apply {

android {
namespace = "dev.hardline"
compileSdk = 36
compileSdk = 37
ndkVersion = "28.2.13676358"

defaultConfig {
Expand Down Expand Up @@ -89,7 +88,7 @@ kotlin {
}

// libusb and libuvc are not committed: fetch them before anything compiles.
val fetchNativeDeps by tasks.registering(Exec::class) {
val fetchNativeDeps = tasks.register<Exec>("fetchNativeDeps") {
description = "Downloads libusb and libuvc into third_party/ and applies the patches."
group = "build setup"
val script = rootProject.file("scripts/fetch-deps.sh")
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/dev/hardline/media/Codec.kt
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class VideoEncoder(
fun pickEncoder(mime: String, width: Int, height: Int, hardware: Boolean): String? =
MediaCodecList(MediaCodecList.REGULAR_CODECS).codecInfos.firstOrNull { info ->
info.isEncoder && info.supportedTypes.any { it.equals(mime, true) } && H26xDecoder.isSoftware(info) != hardware &&
runCatching { info.getCapabilitiesForType(mime).videoCapabilities.isSizeSupported(width, height) }.getOrDefault(false)
runCatching { info.getCapabilitiesForType(mime).videoCapabilities?.isSizeSupported(width, height) ?: false }.getOrDefault(false)
}?.name

fun isSupported(codec: VideoCodec, width: Int, height: Int): Boolean =
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/dev/hardline/media/Recorder.kt
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class Recorder(
}
}

fun setPaused(value: Boolean) = synchronized(lock) {
fun setPaused(value: Boolean): Unit = synchronized(lock) {
if (!active || paused == value) return
paused = value
val now = SystemClock.elapsedRealtime()
Expand Down Expand Up @@ -201,7 +201,7 @@ class Recorder(
if (failed) stop()
}

override fun onAudioPacket(packet: AudioPacket) = synchronized(lock) {
override fun onAudioPacket(packet: AudioPacket): Unit = synchronized(lock) {
if (!active || paused || muxer == null || needKey || audioTrack < 0) return
val pts = maxOf(packet.ptsUs - baseUs - gapUs, lastAudioUs + 1)
if (pts < 0) return
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/dev/hardline/net/SrtPublisher.kt
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ class SrtPublisher(private val c: CameraController, override val target: PushTar
val sink = object : VideoSink, AudioSink {
override fun onVideoConfig(config_: VideoConfig) { config = config_ }
override fun onAudioConfig(config: AudioConfig) = Unit
override fun onVideoPacket(packet: VideoPacket) = synchronized(mux) {
override fun onVideoPacket(packet: VideoPacket): Unit = synchronized(mux) {
if (!started) { if (!packet.key) return else started = true }
mux.video(config, packet)
}
Expand Down
1 change: 0 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.compose) apply false
}
13 changes: 6 additions & 7 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[versions]
agp = "8.13.2"
kotlin = "2.2.21"
compose-bom = "2025.12.01"
agp = "9.4.1"
kotlin = "2.4.20"
compose-bom = "2026.09.00"
activity-compose = "1.12.2"
lifecycle = "2.9.4"
core-ktx = "1.17.0"
exifinterface = "1.4.1"
core-ktx = "1.19.1"
exifinterface = "1.4.2"
documentfile = "1.1.0"
coroutines = "1.10.2"
coroutines = "1.11.0"
commons-net = "3.12.0"
android-mail = "1.6.8"
zxing = "3.5.4"
Expand All @@ -32,5 +32,4 @@ junit = { module = "junit:junit", version.ref = "junit" }

[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.1-bin.zip
networkTimeout=10000
retries=0
retryBackOffMs=500
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
11 changes: 4 additions & 7 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

86 changes: 52 additions & 34 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading