We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3369 - RaspberryPI ability to specify a Dispmanx layer
Summary: RaspberryPI ability to specify a Dispmanx layer
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.4
Hardware: ARM Linux
: P2 enhancement
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-21 18:26 UTC by Albert Casals
Modified: 2016-10-19 06:25 UTC (History)
2 users (show)

See Also:


Attachments
Changeset implements the use of SDL_RPI_VIDEO_LAYER environment variable (2.03 KB, patch)
2016-06-21 18:26 UTC, Albert Casals
Details | Diff
Changeset to implement SDL_RPI_VIDEO_LAYER using a Hint (2.03 KB, patch)
2016-06-22 11:53 UTC, Albert Casals
Details | Diff
SDL dispmanx layer using a Hint (4.31 KB, patch)
2016-06-22 21:11 UTC, Albert Casals
Details | Diff
Updated patch with fixed hint name (4.33 KB, patch)
2016-07-04 20:03 UTC, Albert Casals
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Albert Casals 2016-06-21 18:26:24 UTC
Created attachment 2504 [details]
Changeset implements the use of SDL_RPI_VIDEO_LAYER environment variable

On a RaspberryPI, it might become convenient to specify the Dispmanx layer SDL uses.
Currently, it is hardcoded to be 10000 to sit above most applications.

This can be specially useful when integrating other graphical apps and frameworks like OMXplayer, QT5 etc.. in order to have more flexibility on their Z-order.

The attached changeset allows to export SDL_RPI_VIDEO_LAYER with the desired layer number.
Comment 1 Alex Szpakowski 2016-06-21 19:56:18 UTC
This seems like it should be implemented as a SDL_Hint rather than a plain environment variable. SDL hints can be set either via an environment variable or through the SDL_SetHint API.
Comment 2 Albert Casals 2016-06-22 11:53:48 UTC
Created attachment 2505 [details]
Changeset to implement SDL_RPI_VIDEO_LAYER using a Hint

Using a hint for SDL_RPI_VIDEO_LAYER rather than an environment variable.
Also position the mouse layer correctly above it, in cases where it is needed.
Comment 3 Albert Casals 2016-06-22 21:11:09 UTC
Created attachment 2506 [details]
SDL dispmanx layer using a Hint

Apologies, I must have attached the wrong patch on previous post.
Comment 4 Philipp Wiesemann 2016-07-02 21:39:33 UTC
The name of the hint should start with "SDL_HINT_":

#define SDL_HINT_RPI_VIDEO_LAYER           "SDL_RPI_VIDEO_LAYER"
Comment 5 Albert Casals 2016-07-04 20:03:51 UTC
Created attachment 2526 [details]
Updated patch with fixed hint name

Thanks - uploading updated diff file.
Comment 6 Albert Casals 2016-07-18 08:29:15 UTC
Is there anything I can do further to make this patch go upstream?
Comment 7 Albert Casals 2016-09-16 16:28:53 UTC
Sam, any chance we can get this changeset upstream?
Comment 8 Sam Lantinga 2016-10-19 06:25:12 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/c1bb718f6c3f