DRM Preview Overlay #407
Replies: 2 comments 2 replies
-
Hi, an interesting suggestion. Certainly if this works for your application, then go with it! More generally, I'm a bit conflicted about the whole thing. On the one hand it seems like a good idea to do something a bit more generic like this. One might ask: should we still allow resizing of the overlay (though to a different size)? Does that make the DRM preview more incompatible with the QT or QTGL ones? Or perhaps we don't care? One thing I really want to avoid is devoting time to beefing up all the different preview implementations in various ways, though perhaps there's more justification in the DRM case because there's no GUI framework. I'm not sure. I'm certainly open to opinions and persuasion on this one... |
Beta Was this translation helpful? Give feedback.
-
For anyone trying this after commit 50e78bf The line Or, if you want the overlay span the entire display with the viewfinder preview not at the top left (0, 0) (I don't know if @ancient-geek's original change did this) |
Beta Was this translation helpful? Give feedback.
-
With the current drm_preview.py, overlays appear to be limited to the extent of the preview window.
However, there are use cases where it is helpful for the overlay plane to extend over the whole of the display whilst the preview is in a smaller window.
For example, one might want to use the overlay to place GUI elements around the viewfinder window, or to display image statistics or camera configuration settings outside, rather than on top of, of the preview window.
As a noob I've achieved this by changing line 170 from:
self.crtc.set_plane(self.overlay_plane, self.overlay_fb, x, y, w, h, 0, 0, width, height)
to
self.crtc.set_plane(self.overlay_plane, self.overlay_fb, x, y, width, height, 0, 0, width, height)
However, perhaps this might be a generally worthwhile approach as it gives the user a choice of overlay size?
Beta Was this translation helpful? Give feedback.
All reactions