{"id":25039520,"url":"https://github.com/fernandorpardo/dispmanx","last_synced_at":"2025-04-13T23:11:31.857Z","repository":{"id":191339997,"uuid":"172327857","full_name":"fernandorpardo/DispmanX","owner":"fernandorpardo","description":"DispmanX example","archived":false,"fork":false,"pushed_at":"2020-08-02T16:57:07.000Z","size":14,"stargazers_count":15,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T23:11:27.002Z","etag":null,"topics":["dispmanx","framebuffer","raspberry-pi"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fernandorpardo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-02-24T11:12:50.000Z","updated_at":"2024-05-30T14:04:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"35b9d1cc-a9a7-4507-bd40-e1157338c916","html_url":"https://github.com/fernandorpardo/DispmanX","commit_stats":null,"previous_names":["fernandorpardo/dispmanx"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fernandorpardo%2FDispmanX","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fernandorpardo%2FDispmanX/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fernandorpardo%2FDispmanX/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fernandorpardo%2FDispmanX/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fernandorpardo","download_url":"https://codeload.github.com/fernandorpardo/DispmanX/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248794569,"owners_count":21162615,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dispmanx","framebuffer","raspberry-pi"],"created_at":"2025-02-06T02:52:15.227Z","updated_at":"2025-04-13T23:11:31.797Z","avatar_url":"https://github.com/fernandorpardo.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fox\n\nFramebuffer overlaying DispmanX.\n\nA simple example for Raspberry Pi\n\n### DISCLAIMERS \u0026 (C)\n\nThis code is based on [hello_dispmanx](https://github.com/raspberrypi/firmware/tree/master/opt/vc/src/hello_pi/hello_dispmanx)\nunder Copyright (c) 2012, Broadcom Europe Ltd\n\nYou actually need to download https://github.com/raspberrypi/firmware into your system to solve headers and lib dependencies.\n\nModify the Makefile to make SDKSTAGE point to the place where you have locally stored the 'firmware' directory.\n\n\n### DESCRIPTION\n\nThis is not a final application but an example for Raspberry Pi of how to create an overlay caption to applications using DispmanX such as OMXplayer.\n\nIf you are using the Chromium browser for the graphic interface of your application, as I do, you may want to use it to generate some graphics and text overlaying the video being played with OMXplayer.\n\nThe graphic interface, either CLI or the ones having X11 underneath (graphic desktop, Chromium browser), do render on the framebuffer. Framebuffer is DispmanX layer -127, this means that anything rendering on any layer above -127 will hide your application. \n\nOne way to keep showing your application while the video is being played could be to build a framebuffer device /dev/fb0 mapped to a DispmanX layer above the video rather than to the framebuffer memory.\n\nThe approach here is to run an process in the background that dumps at regular intervals an area of the framebuffer into a DispmanX layer above the one used by OMXplayer. \n\n\n### USAGE\n\nFrom three different SSH sessions do the following:\n\nSSH#1- dump this caption.png image into the fb using fbi (Linux framebuffer imageviewer)\n```console\n$ sudo fbi -a -noverbose -norandom -T 1 -t 8 caption.png\n```\nNow you see a black screen with the caption\n\n![caption](https://user-images.githubusercontent.com/38065602/74604623-0b322500-50c0-11ea-8a21-fce1e08672e4.png)\n\nSSH#2- play a video in loop, e.g.,\n```console\n$ omxplayer –loop https://static.videezy.com/system/resources/previews/000/021/067/original/P1022200.mp4\n```\nNow you see the video but not the caption. The caption is still there but hidden by layer 0 where OMXplayer dumps the video frames (remember the caption.png image is in layer -127)\n\nSSH#3 - run fox\n```console\n$ fox\n```\n\nAt this point, you should see the video with the caption (the selected portion of the fb overlaying the video)\n![c](https://user-images.githubusercontent.com/38065602/74604634-2a30b700-50c0-11ea-9684-326d28c97b0c.png)\n\n\n### LIMITATIONS\n\nThis example works for DispmanX type VC_IMAGE_RGB565 (16-bits color) that is the one in hello_dispmanx. A TODO task is to extend this example to 32-bits color types (VC_IMAGE_TF_RGBA32)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffernandorpardo%2Fdispmanx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffernandorpardo%2Fdispmanx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffernandorpardo%2Fdispmanx/lists"}