Skip to content

Fix Android SRT crashes and restore the OBS camera feed - #67

Merged
YashasVM merged 5 commits into
mainfrom
fix/stable-openstream-connection
Sep 28, 2026
Merged

YashasVM merged 5 commits into
mainfrom
fix/stable-openstream-connection

Conversation

@YashasVM

@YashasVM YashasVM commented Sep 26, 2026 •

Copy link
Copy Markdown
Owner

The Android app could abort before opening or while stopping its SRT listener. Kotlin's six native method names also did not match the exported JNI symbols, so the phone could not send media. This change starts libsrt after library initialization, makes listener cancellation safe, aligns JNI exports, and prevents an Activity stop/start race from closing a restarted session.

Phone discovery now keeps one ID across app restarts and updates. Without that, OBS kept a source bound to the old random ID and displayed "Waiting for selected Android phone" after the app returned. A debug APK receives an automatically newer version code on each build; tools/build_android_apk.sh explains signing and downgrade errors. The Android workflow can produce a release-signed 1.0.2 candidate with the same certificate as v1.0.1. The OBS dock groups connection and camera controls.

Validation: 116 repository tests; Android unit tests, lint, and APK build across four ABIs; Linux OBS build and CTest 4/4; Windows plugin and website CI builds. On a Samsung SM-S928B, the app survived 12 background/foreground cycles without a new crash. Linux OBS decoded 4,200 consecutive 1920×1080 H.264 frames with AAC at about 30 fps, released the reservation on source disable, and reconnected on re-enable. A force-stop/relaunch of the debug app during streaming reconnected without phone reselection. The release-signed candidate passed CI signature and version checks and installed over v1.0.1 while preserving Android's original installation date; the production app also connected to OBS and decoded over 23,000 frames. The production app was force-stopped and relaunched during streaming; OBS kept the selected phone ID, reconnected to the phone, reopened H.264/AAC, and resumed decoding 1920×1080 frames without reselection.

The host's UFW firewall initially blocked UDP discovery on port 51615. Allowing that port from the phone let OBS discover and reserve it. Battery impact has not been measured, so this PR makes no battery-life claim.

@coderabbitai

coderabbitai Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 95ff818c-572c-4e0d-a927-b0b8c2f67519


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@YashasVM
YashasVM marked this pull request as ready for review September 26, 2026 17:29
Remove obsolete OpenStream documentation and agent guidance
@YashasVM
YashasVM merged commit 3d0c6e2 into main Sep 28, 2026
7 checks passed
@YashasVM
YashasVM deleted the fix/stable-openstream-connection branch September 28, 2026 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant