Fix: not working on android 16/oneplus 15. Also fix an issue where image was blurry due to bit rate error. - #8
Merged
Merged
Conversation
A session never unregistered its MediaProjection.Callback or stopped the projection, so starting a new capture made the system stop the old one and dispatch onStop to the leaked callback. That dispatch was queued on the main looper while startRecording ran, landing 1-2ms after the new session came up and immediately stopping it, which produced empty mp4 files. - Unregister the callback and stop the projection in RecordingSession.stop(), guarded by a released flag so a queued onStop cannot kill a newer session - Build the FloatingController inline instead of posting it, so stopRecording can dismiss it; the posted version was created after teardown and left an orphaned bubble whose timer counted forever - Wrap the overlay addView in try/catch and stop the timer when not showing - Drop PUBLIC and PRESENTATION from the VirtualDisplay flags, which made the system treat it as a real secondary display and attach a nav bar to it - Release a leftover session before starting a new one, stop the service when MediaProjection is unavailable, and clear state in onDestroy - Watchdog stepped Native to 4K instead of down; send it to 1080p - Skip BUFFER_FLAG_CODEC_CONFIG buffers instead of muxing them as a frame
Native captures were soft after every app switch. A flat 8 Mbps across 1264x2768 at 60fps is roughly 0.04 bits per pixel per frame, so a scene change forced an I-frame the CBR budget could not pay for and the picture only sharpened once the scene went static again. - Floor the bitrate at width * height * fps * bits-per-pixel, 0.10 for AVC and 0.07 for HEVC and AV1, capped at 40 Mbps and never below the user's own pick - Brush red exit now minimises: the toolbar closes but the strokes stay, and only the clear button erases them. Reopening from the bubble restores them - Mark the drawing overlay not-touchable while minimised so it stops swallowing every touch on the device - Reuse the audio mixing scratch arrays instead of allocating them per read
Choosing AV1 on a device with no hardware AV1 encoder made createEncoderByType return the libaom software encoder. It cannot keep up with screen capture, so the achieved frame rate fell far below the requested one, the device stuttered while recording, and the finished file reported the average it managed rather than the rate that was asked for. - Reject encoders that are not hardware accelerated, letting the existing fallback ladder move on to a codec the device can encode in hardware - Allow a software encoder only on the final last-resort attempt, so a device with no hardware encoder at all can still record - Warn when the codec in use is not the one selected, since falling back silently is what makes the recorded frame rate look wrong
Owner
|
Hey @Xnick417x , |
snap24
added a commit
that referenced
this pull request
Aug 3, 2026
snap24
added a commit
that referenced
this pull request
Aug 3, 2026
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.
Hello this application is amazing. Unfortunately it wasn't working on my oneplus 15. I fixed a few things even fixed a mic spam in recording that did cause a little cpu overhead. It works great on my device now. It's amazing no cpu over head and only 100mb of ram used. What a great app. Thanks man.