Fix Android 9 H.264 streaming and server resilience#48
Merged
DigitallyRefined merged 2 commits intoJul 10, 2026
Conversation
362aa73 to
0fd0adb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
1. Android 9 H.264 compatibility
projects/mi6-ip-camera/android-ip-camera-src/app/src/main/kotlin/com/github/digitallyrefined/androidipcamera/helpers/H264HardwareEncoder.kt
projects/mi6-ip-camera/android-ip-camera-src/app/src/main/kotlin/com/github/digitallyrefined/androidipcamera/helpers/H264Bitstream.kt — new
2. Stalled NVR protection
projects/mi6-ip-camera/android-ip-camera-src/app/src/main/kotlin/com/github/digitallyrefined/androidipcamera/helpers/H264StreamingEncoder.kt
3. True configured frame rate
projects/mi6-ip-camera/android-ip-camera-src/app/src/main/kotlin/com/github/digitallyrefined/androidipcamera/StreamingService.kt
projects/mi6-ip-camera/android-ip-camera-src/app/src/main/kotlin/com/github/digitallyrefined/androidipcamera/helpers/CameraGlPipe.kt
projects/mi6-ip-camera/android-ip-camera-src/app/src/main/kotlin/com/github/digitallyrefined/androidipcamera/helpers/FrameRateLimiter.kt — new
4. Platform TLS and server lifecycle
projects/mi6-ip-camera/android-ip-camera-src/app/src/main/kotlin/com/github/digitallyrefined/androidipcamera/helpers/StreamingServerHelper.kt
Uses Android’s built-in TLS provider.
Automatic mode selects:
Explicit TLS 1.2 remains supported.
Does not permanently rewrite the automatic preference.
Generates and securely stores a random certificate password.
Generates a device-local certificate when needed.
Adds server-generation tracking for safe restarts.
Prevents old server jobs and clients from surviving restarts.
Tracks and closes H.264, MJPEG and audio clients.
Makes client removal idempotent.
projects/mi6-ip-camera/android-ip-camera-src/app/src/main/res/values/strings.xml
projects/mi6-ip-camera/android-ip-camera-src/app/src/main/res/xml/preferences.xml
5. Build configuration
projects/mi6-ip-camera/android-ip-camera-src/app/build.gradle
6. Tests
projects/mi6-ip-camera/android-ip-camera-src/app/src/test/kotlin/com/github/digitallyrefined/androidipcamera/helpers/H264BitstreamTest.kt — new
projects/mi6-ip-camera/android-ip-camera-src/app/src/test/kotlin/com/github/digitallyrefined/androidipcamera/helpers/FrameRateLimiterTest.kt — new