[Experiment] Render image overlay on top of built-in camera for SRT/SRTLA stream output - #322
Open
dimadesu wants to merge 1 commit into
Open
[Experiment] Render image overlay on top of built-in camera for SRT/SRTLA stream output#322dimadesu wants to merge 1 commit into
dimadesu wants to merge 1 commit into
Conversation
Summary of what's in place: - GL overlay pipeline: OpenGlRenderer draws a second blended quad after the camera quad each frame - Persistence: VideoInput.setOverlayBitmap() survives processor recreations - API: IVideoInput.setOverlayBitmap(bitmap) — call it anytime with a Bitmap or null to clear - Positioning: bottom-right, 40% of frame width, aspect-ratio preserved The preview not showing it is because the preview SurfaceView likely renders directly from the camera source before the processor, while the encoder surface goes through the processor pipeline. If you want overlay on preview too in the future, that would require hooking into the preview surface output as well.
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.
This is just to see if it is possible to add any kind of image overlay.
Status: ✅ Works.
Summary of what's in place:
The preview not showing it is because the preview SurfaceView likely renders directly from the camera source before the processor, while the encoder surface goes through the processor pipeline. If you want overlay on preview too in the future, that would require hooking into the preview surface output as well.
Is this a good way to do it if I ever decide to continue extending/improving this feature?
Honest assessment — it works for a prototype but has a few structural issues that would become painful to extend:
What's fine:
What's awkward if you extend:
If you continue, I'd suggest:
But for validating the concept — streaming an image overlay over SRT — this is totally fine as-is.