455ba6055d
Phone-as-receiver for the USB-C -> HDMI mirroring use case. Speaks the existing signaling + RTP wire protocol, so the C++ sender needs no changes. AGP 9 built-in Kotlin (no separate plugin), no androidx. - rtp/: RtpHeader, RtpPacket, JitterBuffer (16 pkt / 60 ms, straggler discard), H264Depacketizer (single-NAL + FU-A, Annex-B out) — JVM tests - signaling/: newline-JSON server (offer -> answer, PLI, 500 ms rate cap) - decode/H264Decoder: MediaCodec -> Surface; size from in-band SPS (offer is 0x0); surface passed to configure(); releaseOutputBuffer(render) - pipeline/ReceiverPipeline: NSD advertise (API-36 RegistrationListener + reflection fallback), UDP RTP, jitter, decode, PLI recovery - ReceiverActivity: fullscreen TextureView letterboxed by sizing the view to the video aspect (C2 scales output to the surface) Validated end-to-end on a Fairphone 6 (API 36): offer/answer, first frame, letterbox fit, PLI on loss.
33 lines
643 B
Kotlin
33 lines
643 B
Kotlin
plugins {
|
|
id("com.android.application")
|
|
}
|
|
|
|
android {
|
|
namespace = "screen_cast"
|
|
compileSdk = 36
|
|
|
|
defaultConfig {
|
|
applicationId = "screen_cast.receiver"
|
|
minSdk = 30
|
|
targetSdk = 36
|
|
versionCode = 1
|
|
versionName = "0.1.0"
|
|
}
|
|
|
|
// No release signing configured: the app is sideloaded as a debug build.
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = false
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
testImplementation("junit:junit:4.13.2")
|
|
}
|