{"id":300700,"date":"2020-03-25T09:00:27","date_gmt":"2020-03-25T09:00:27","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=300700"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=300700","title":{"rendered":"\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u0438\u0434\u0435\u043e \u0441\u043b\u043e\u044f \u0432 Raspberry Pi \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c DispmanX API"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/493610\/\">\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.25%;\"><iframe src=\"https:\/\/www.youtube.com\/embed\/05cqFhJtHaA?rel=0&amp;showinfo=1&amp;hl=en-US\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen scrolling=\"no\" allow=\"encrypted-media; accelerometer; gyroscope; picture-in-picture\"><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0445\u043e\u0447\u0443 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 DispmanX API \u043e\u0434\u043d\u043e\u043f\u043b\u0430\u0442\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u0432 Raspberry. DispmanX API \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0430 \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u0435 Raspberry \u043d\u043e\u0432\u044b\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0435 \u0441\u043b\u043e\u0438. \u0421\u043b\u043e\u0438 \u0432\u0438\u0441\u044f\u0442 \u043d\u0430\u0434 \u0441\u043b\u043e\u044f\u043c\u0438. \u0418\u0445 \u043c\u043e\u0436\u043d\u043e \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c, \u0443\u0434\u0430\u043b\u044f\u0442\u044c, \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0442\u044c, \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u0441\u0430\u043c \u0432\u0438\u0434\u0435\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u0438\u0445 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0430. \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0447\u0442\u043e \u0441\u043b\u043e\u0438 \u043c\u043e\u0433\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u0430\u043b\u044c\u0444\u0430 \u043a\u0430\u043d\u0430\u043b, \u0438 \u0442\u043e\u0433\u0434\u0430, \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0441\u043b\u043e\u0435\u0432 \u0431\u0443\u0434\u0443\u0442 \u0441\u0430\u043c\u0438 \u0441\u043e\u0431\u043e\u0439 \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u0442\u044c\u0441\u044f. \u0422\u0430\u043a \u0436\u0435, \u043a\u0440\u043e\u043c\u0435 32-\u0442\u0438 \u0434\u0432\u0443\u0445\u0431\u0438\u0442\u043d\u044b\u0445 ARGB \u0441\u043b\u043e\u0435\u0432 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, YUV420 \u0441\u043b\u043e\u0438, \u0438\u043b\u0438 \u0441\u043b\u043e\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0442\u0438\u043f\u043e\u0432. \u0412 Raspberry \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u0441\u043b\u043e\u044f. \u0421\u0430\u043c\u044b\u0439 \u043d\u0438\u0436\u043d\u0438\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u0430. \u0412\u0435\u0441\u044c \u0432\u044b\u0432\u043e\u0434 \u0447\u0435\u0440\u0435\u0437 \u0438\u043a\u0441\u044b \u0438\u0434\u0435\u0442 \u0432 \u044d\u0442\u043e\u0442 \u0441\u043b\u043e\u0439. \u0418 \u0435\u0441\u0442\u044c \u0432\u0442\u043e\u0440\u043e\u0439, \u0441\u0430\u043c\u044b\u0439 \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u0441\u043b\u043e\u0439, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0436\u0438\u0432\u0435\u0442 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043a\u0443\u0440\u0441\u043e\u0440\u0430 \u043c\u044b\u0448\u0438.<\/p>\n<p>  \u042f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0441\u043b\u043e\u0439, \u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u043d\u0435\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0438 \u043a\u0430\u043a \u0435\u0433\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0442\u044c \u043f\u043e \u044d\u043a\u0440\u0430\u043d\u0443. \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u043d\u0430 \u0434\u0435\u043c\u043e \u0432\u0438\u0434\u0435\u043e \u0432\u044b\u0448\u0435 \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430 \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u0417\u0434\u0435\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0447\u0435\u0442\u044b\u0440\u0435 \u043d\u043e\u0432\u044b\u0445 32-\u0445 \u0431\u0438\u0442\u043d\u044b\u0445 \u0441\u043b\u043e\u044f ARGB. \u0412 \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u0441\u043b\u043e\u0435\u0432 \u044f \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e \u043f\u0438\u043a\u0441\u0435\u043b\u044b \u0438\u0437 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0431\u0438\u0442\u043c\u0430\u043f\u043e\u0432. \u041c\u043e\u0438 \u0431\u0438\u0442\u043c\u0430\u043f\u044b \u044d\u0442\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043e\u0431\u043b\u0430\u043a\u043e\u0432, \u0441\u043e\u043b\u043d\u0446\u0430 \u0438 \u0432\u043e\u0437\u0434\u0443\u0448\u043d\u044b\u0445 \u0448\u0430\u0440\u043e\u0432. \u0421\u043b\u043e\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u044e\u0442\u0441\u044f \u043f\u043e \u044d\u043a\u0440\u0430\u043d\u0443 \u0441 \u0440\u0430\u0437\u043d\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e, \u043d\u0430\u0432\u0438\u0441\u0430\u044f \u043d\u0430\u0434 \u0441\u0430\u043c\u044b\u043c \u043d\u0438\u0436\u043d\u0438\u043c \u0438\u043a\u0441\u043e\u0432\u044b\u043c \u0441\u043b\u043e\u0435\u043c.<a name=\"habracut\"><\/a><\/p>\n<p>  \u0418\u0442\u0430\u043a, DispmanX API. \u042d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u0430\u044f \u0448\u0442\u0443\u043a\u0430 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u0430\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u043b\u044f Raspberry \u0438 \u0435\u0433\u043e \u0432\u0438\u0434\u0435\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432. \u0418 \u044d\u0442\u043e \u00ab\u043d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f\u00bb \u0448\u0442\u0443\u043a\u0430. \u0412\u043e\u043e\u0431\u0449\u0435 \u0432 \u044f\u0434\u0440\u0435 Linux \u0438 \u0432 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0435 Linux \u0435\u0441\u0442\u044c \u043c\u0435\u0441\u0442\u043e \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0438\u0434\u0435\u043e \u0441\u043b\u043e\u0435\u0432 \u0447\u0435\u0440\u0435\u0437 DRM, Direct Rendering Manager, \u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u0438 Raspberry \u043f\u043e\u0447\u0435\u043c\u0443-\u0442\u043e \u0440\u0435\u0448\u0438\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434. \u0425\u043e\u0442\u044f, \u0441 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u044d\u0442\u043e \u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432\u043f\u043e\u043b\u043d\u0435 \u043c\u043e\u0436\u043d\u043e \u0435\u0437\u0434\u0438\u0442\u044c. DispmanX \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 Pi-Zero, \u043d\u0430 Raspberry Pi \/ Pi2 \/ Pi3 \u0438 Pi4. \u0412 \u043e\u0431\u0449\u0435\u043c \u043d\u0430 \u0432\u0441\u0435\u0445 \u043c\u0430\u043b\u0438\u043d\u043a\u0430\u0445. \u0425\u043e\u0442\u044f, \u043f\u043e \u043f\u0440\u0430\u0432\u0434\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, \u043d\u0430 Pi4 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 OpenGLESv3. \u0422\u0443\u0442 \u0442\u0430\u043a\u0438\u0435 \u0431\u0443\u0431\u043d\u044b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0443\u0436\u0435 \u0438 \u043d\u0435 \u043d\u0443\u0436\u043d\u044b. \u041d\u043e \u0441 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, DispmanX \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043f\u0440\u043e\u0449\u0435 (\u0445\u043e\u0442\u044f \u0438 \u043c\u0435\u043d\u044c\u0448\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439), \u0447\u0435\u043c OpenGLES.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u044d\u0442\u043e\u0433\u043e DispmanX API \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \/opt\/vc\/include\/bcm_host.h. \u041a\u0440\u043e\u043c\u0435 \u044d\u0442\u043e\u0433\u043e, \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0435\u0449\u0435 \u0438 \u043b\u0438\u043d\u043a\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0441 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 libbcm_host.so, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0430 \u0432 \u043f\u0430\u043f\u043a\u0435 \/opt\/vc\/lib.<\/p>\n<p>  \u0412\u0441\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u043d\u0430\u043c API \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f \u0441 vc_dispmanx_*\u2026<\/p>\n<p>  \u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u0441\u043b\u043e\u0435\u0432 \u044d\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0438\u0441\u043f\u043b\u0435\u044e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043f\u0430\u0440\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0439:  <\/p>\n<pre><code class=\"cpp\">bcm_host_init(); DISPMANX_DISPLAY_HANDLE_T display = vc_dispmanx_display_open( 0 ); <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u00ab\u0440\u0435\u0441\u0443\u0440\u0441\u00bb, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441\u043b\u043e\u044f  <\/p>\n<pre><code class=\"cpp\">VC_IMAGE_TYPE_T type = VC_IMAGE_ARGB8888; uint32_t UnusedImagePtr; int SrcImageWidth = 512; \/\/image must be 32 bytes aligned size int SrcImageWidth = 196; DISPMANX_RESOURCE_HANDLE_T resource = vc_dispmanx_resource_create( type, SrcImageWidth, SrcImageHeight,  &amp;UnusedImagePtr );<\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0442\u0438\u043f \u0441\u043b\u043e\u044f \u0432\u044b\u0431\u0440\u0430\u043d 32-\u0445 \u0431\u0438\u0442\u043d\u044b\u0439 \u0441 \u0430\u043b\u044c\u0444\u0430 \u043a\u0430\u043d\u0430\u043b\u043e\u043c. \u041d\u043e \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u0442\u0438\u043f\u044b, \u043a\u0430\u043a \u044f \u0443\u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043b, \u0434\u0430\u0436\u0435 YUV. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 YUV \u0441\u043b\u043e\u044f \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u0434\u043b\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u043b\u043e\u0435\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0438 \u0432\u0438\u0434\u0435\u043e. \u0422\u043e\u0433\u0434\u0430 \u043e\u0431\u044a\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u044d\u043a\u0440\u0430\u043d \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u043d\u0438\u0436\u0430\u0435\u0442\u0441\u044f, \u0434\u0430 \u0438 \u043f\u0435\u0440\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c YUV \u0432 RGB \u043d\u0435 \u043d\u0443\u0436\u043d\u043e, \u0447\u0442\u043e \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442 \u0446\u0435\u043d\u043d\u044b\u0435 \u0442\u0430\u043a\u0442\u044b \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u043d\u0435\u0435 \u0445\u0430\u043d\u0434\u043b\u0435\u0440 display \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u044f-\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u043d\u0430 \u0434\u0438\u0441\u043f\u043b\u0435\u0439:  <\/p>\n<pre><code class=\"cpp\">VC_DISPMANX_ALPHA_T alpha; \talpha.flags = \t\t(DISPMANX_FLAGS_ALPHA_T)(DISPMANX_FLAGS_ALPHA_FROM_SOURCE | DISPMANX_FLAGS_ALPHA_MIX); \talpha.opacity = 255; \talpha.mask = 0; int OutLayer = 200; DISPMANX_ELEMENT_HANDLE_T vc_element = vc_dispmanx_element_add( \t\tupdate, \t\tdisplay, \t\tOutLayer, \t\t&amp;dst_rect, resource, &amp;src_rect, DISPMANX_PROTECTION_NONE, &amp;alpha, NULL, DISPMANX_NO_ROTATE );<\/code><\/pre>\n<p>  \u0422\u0443\u0442 \u0435\u0441\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0432\u0435\u0441\u044c\u043c\u0430 \u0432\u0430\u0436\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0435\u0440 update. \u041a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0434\u0438\u0441\u043f\u043b\u0435\u044f, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0438\u043b\u0438 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u043b\u043e\u0439, \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0435\u0433\u043e, \u0438\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u043e\u0432\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432 \u0441\u043b\u043e\u0439, \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u043d\u0430\u0447\u0430\u043b\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0438 \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439.<\/p>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0430 \u0434\u0438\u0441\u043f\u043b\u0435\u0435 \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c  <\/p>\n<pre><code class=\"cpp\">DISPMANX_UPDATE_HANDLE_T update =  vc_dispmanx_update_start( Priority );<\/code><\/pre>\n<p>  \u0417\u0430\u0442\u0435\u043c \u043c\u0435\u043d\u044f\u0435\u0442\u0435, \u0432\u0441\u0435 \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e, \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0435 \u0441\u043b\u043e\u0439 \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u0442\u0435, \u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u0441\u043b\u043e\u0439 \u043d\u043e\u0432\u044b\u0435 \u043f\u0438\u043a\u0441\u0435\u043b\u0438 \u0438 \u043f\u043e\u0442\u043e\u043c \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438  <\/p>\n<pre><code class=\"cpp\">vc_dispmanx_update_submit_sync( update );<\/code><\/pre>\n<p>  \u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u0438\u0437 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u0441\u0442\u0443\u043f\u044f\u0442 \u0432 \u0441\u0438\u043b\u0443 \u043f\u043e\u0441\u043b\u0435 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0433\u043e \u043a\u0430\u0434\u0440\u043e\u0432\u043e\u0433\u043e \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u0430 \u0432\u0438\u0434\u0435\u043e\u0440\u0430\u0437\u0432\u0435\u0440\u0442\u043a\u0438.<\/p>\n<p>  \u0417\u0430\u043f\u0438\u0441\u044c \u043f\u0438\u043a\u0441\u0435\u043b\u043e\u0432 \u0432 \u0441\u043b\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439   <\/p>\n<pre><code class=\"cpp\">vc_dispmanx_resource_write_data( \t\tresource, \t\ttype, \t\tpitch, \t\tPixels, \/\/pointer to ARGB pixels \t\t&amp;rect );<\/code><\/pre>\n<p>  \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 rect, \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u041c\u043e\u0436\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u00ab\u043f\u043e\u043b\u043e\u0441\u0443\u00bb, \u0442\u043e \u0435\u0441\u0442\u044c top \u0438 bottom \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c, \u043d\u043e left \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 0 \u0438 right \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e \u0448\u0438\u0440\u0438\u043d\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u041a\u0430\u043a \u043d\u0438 \u0441\u0442\u0440\u0430\u043d\u043d\u043e, \u044d\u0442\u043e \u043f\u043e\u0436\u0430\u043b\u0443\u0439 \u0438 \u0432\u0435\u0441\u044c \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0437\u043d\u0430\u043d\u0438\u0439, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u0434\u043b\u044f \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043b\u043e\u044f\u043c\u0438.<\/p>\n<p>  \u0412 \u0441\u0432\u043e\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043e\u0431\u0435\u0440\u0442\u043a\u0443 \u043d\u0430\u0434 DispmanX API. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043c\u043d\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u043b\u043e\u0439 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439   <\/p>\n<pre><code class=\"cpp\">struct DISPMANX_ELEMENT {     DISPMANX_RESOURCE_HANDLE_T  res_;     DISPMANX_ELEMENT_HANDLE_T   vc_element_;     VC_IMAGE_TYPE_T type_;     uint32_t src_width_;     uint32_t src_height_;     uint32_t dst_layer_;     uint32_t dst_width_;     uint32_t dst_height_;     int32_t  dst_x_;     int32_t  dst_y_; };<\/code><\/pre>\n<p>  \u041d\u0443 \u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u043c\u043e\u0438 \u043e\u0431\u0435\u0440\u0442\u043e\u0447\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0442\u0430\u043a\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443:   <\/p>\n<pre><code class=\"cpp\">void dispmanx_init(); void dispmanx_element_init(struct DISPMANX_ELEMENT* Element); struct DISPMANX_ELEMENT dispmanx_element_create( VC_IMAGE_TYPE_T type, int SrcW, int SrcH, int OutX, int OutY, int OutW, int OutH, int OutLayer ); void dispmanx_element_delete(struct DISPMANX_ELEMENT* Element); void dispmanx_element_write(struct DISPMANX_ELEMENT* Element, char* Pixels); void dispmanx_element_move( DISPMANX_UPDATE_HANDLE_T update, struct DISPMANX_ELEMENT* Element, int32_t NewX, int32_t NewY ); DISPMANX_UPDATE_HANDLE_T dispmanx_start_update( int Priority ); void dispmanx_sync( DISPMANX_UPDATE_HANDLE_T Update );<\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u044f \u043c\u043e\u0433\u0443 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0435\u0432 \u0438 \u0441 \u043b\u0435\u0433\u043a\u043e\u0441\u0442\u044c\u044e \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u0438.<\/p>\n<p>  \u0422\u0430\u043a \u0436\u0435 \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0431\u0438\u0442\u043c\u0430\u043f\u0430. \u041f\u0440\u0438\u0447\u0435\u043c, \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0445\u0438\u0442\u0440\u0430\u044f \u2014 \u0435\u0441\u043b\u0438 \u0432 \u0431\u0438\u0442\u043c\u0430\u043f\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0447\u0438\u0441\u0442\u043e \u0437\u0435\u043b\u0435\u043d\u044b\u0439 \u043f\u0438\u043a\u0441\u0435\u043b 0x00FF00, \u0442\u043e \u044f \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e \u0435\u0433\u043e \u043a\u0430\u043a \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u044b\u0439 \u043f\u0438\u043a\u0441\u0435\u043b \u0432 \u043c\u043e\u0435\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u0431\u0430\u0439\u0442 Alpha \u044d\u0442\u043e\u0433\u043e \u043f\u0438\u043a\u0441\u0435\u043b\u044f \u0432 \u043d\u043e\u043b\u044c.<\/p>\n<p>  \u0412 \u043f\u0430\u0438\u043d\u0442\u0435 \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u043b \u0442\u0440\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f:<br \/>  \u041e\u0431\u043b\u0430\u043a\u0430:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/d2\/67\/bj\/d267bjptz5o4trqey6sl_npz2fm.jpeg\"><\/p>\n<p>  \u0421\u043e\u043b\u043d\u0446\u0435:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/hx\/ni\/e6\/hxnie6k12u7n5jep_sae5e_z-qu.jpeg\"><\/p>\n<p>  \u0412\u043e\u0437\u0434\u0443\u0448\u043d\u044b\u0435 \u0448\u0430\u0440\u044b:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/pw\/6h\/d1\/pw6hd11k8jwwojd2ti_mkgfdzaw.jpeg\"><\/p>\n<p>  \u0412 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0447\u0435\u0442\u044b\u0440\u0435 \u0441\u043b\u043e\u044f. \u041f\u0435\u0440\u0432\u044b\u0435 \u0434\u0432\u0430 \u0441\u043b\u043e\u044f \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u0442\u043e\u0433\u043e \u0436\u0435 \u0431\u0438\u0442\u043c\u0430\u043f\u0430 \u043e\u0431\u043b\u0430\u043a\u0430, \u043d\u043e \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u043b\u043e\u044f \u0434\u0435\u043b\u0430\u044e \u0440\u0430\u0437\u043d\u044b\u043c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0432\u0442\u043e\u0440\u044b\u0435 \u043e\u0431\u043b\u0430\u043a\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0435\u0440\u0432\u044b\u0445. \u0422\u0440\u0435\u0442\u0438\u0439 \u0441\u043b\u043e\u0439 \u2014 \u044d\u0442\u043e \u0432\u043e\u0437\u0434\u0443\u0448\u043d\u044b\u0435 \u0448\u0430\u0440\u044b \u0438 \u0432 \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u044b\u0439 \u0441\u043b\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044e \u0441\u043e\u043b\u043d\u0446\u0435:  <\/p>\n<pre><code class=\"cpp\">typedef struct OBJ{ \tint width_; \tint height_; \tint x_; \tint y_; \tint layer_; \tint speed_; \tchar* pixels_; } OBJ_;  int main(int argc , char *argv[]) { \tcout &lt;&lt; &quot;Hello Raspberry DispmanX API!\\n&quot;; \tdispmanx_init();  \tOBJ_ cloud1; \tcloud1.pixels_ = LoadBitmap( (char*)&quot;clouds.bmp&quot;, &amp;cloud1.width_, &amp;cloud1.height_ ); \tcloud1.layer_ = 100; \tcloud1.x_ = 100; \tcloud1.y_ = 120; \tcloud1.speed_ = 3;  \tstruct DISPMANX_ELEMENT cloud1_element = dispmanx_element_create( \t\tVC_IMAGE_ARGB8888, cloud1.width_, cloud1.height_, cloud1.x_, cloud1.y_, cloud1.width_, cloud1.height_, cloud1.layer_ ); \tdispmanx_element_write( &amp;cloud1_element, cloud1.pixels_ );  \tOBJ_ cloud2; \tcloud2.pixels_ = LoadBitmap( (char*)&quot;clouds.bmp&quot;, &amp;cloud2.width_, &amp;cloud2.height_ ); \tcloud2.layer_ = 101; \tcloud2.x_ = 10; \tcloud2.y_ = 230; \tcloud2.speed_ = 2;  \tstruct DISPMANX_ELEMENT cloud2_element = dispmanx_element_create( \t\tVC_IMAGE_ARGB8888, cloud2.width_, cloud2.height_, cloud2.x_, cloud2.y_, cloud2.width_*1.3, cloud2.height_*1.4, cloud2.layer_ ); \tdispmanx_element_write( &amp;cloud2_element, cloud2.pixels_ );  \tOBJ_ balls; \tballs.pixels_ = LoadBitmap( (char*)&quot;balls.bmp&quot;, &amp;balls.width_, &amp;balls.height_ ); \tballs.layer_ = 102; \tballs.x_ = -100; \tballs.y_ = 351; \tballs.speed_ = 5;  \tstruct DISPMANX_ELEMENT balls_element = dispmanx_element_create( \t\tVC_IMAGE_ARGB8888, balls.width_, balls.height_, balls.x_, balls.y_, balls.width_, balls.height_, balls.layer_ ); \tdispmanx_element_write( &amp;balls_element, balls.pixels_ );  \tOBJ_ sun; \tsun.pixels_ = LoadBitmap( (char*)&quot;sun.bmp&quot;, &amp;sun.width_, &amp;sun.height_ ); \tsun.layer_ = 99; \tsun.x_ = -250; \tsun.y_ = 10; \tsun.speed_ = 1;  \tstruct DISPMANX_ELEMENT sun_element = dispmanx_element_create( \t\tVC_IMAGE_ARGB8888, sun.width_, sun.height_, sun.x_, sun.y_, sun.width_, sun.height_, sun.layer_ ); \tdispmanx_element_write( &amp;sun_element, sun.pixels_ ); ....................... <\/code><\/pre>\n<p>  \u0412 \u0432\u0435\u0447\u043d\u043e\u043c \u0446\u0438\u043a\u043b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u044e \u0441\u043b\u043e\u0438 \u043f\u043e \u044d\u043a\u0440\u0430\u043d\u0443 \u0441 \u0440\u0430\u0437\u043d\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e:  <\/p>\n<pre><code class=\"cpp\"> while(1) \t{ \t\tthis_thread::sleep_for( chrono::milliseconds(20) ); \t\tcloud1.x_ += cloud1.speed_; \t\tif( cloud1.x_&gt;= 1920 ) \t\t\tcloud1.x_ = 10 - cloud1.width_;  \t\tcloud2.x_ += cloud2.speed_; \t\tif( cloud2.x_&gt;= 1920 ) \t\t\tcloud2.x_ = 133 - cloud2.width_;  \t\tballs.x_ += balls.speed_; \t\tif( balls.x_&gt;= 1920 ) \t\t\tballs.x_ = 200 - balls.width_;  \t\tsun.x_ += sun.speed_; \t\tif( sun.x_&gt;= 1920 ) \t\t\tsun.x_ = 250 - sun.width_;  \t\tDISPMANX_UPDATE_HANDLE_T update = dispmanx_start_update(10); \t\tdispmanx_element_move( update, &amp;cloud1_element, cloud1.x_, cloud1.y_ ); \t\tdispmanx_element_move( update, &amp;cloud2_element, cloud2.x_, cloud2.y_ ); \t\tdispmanx_element_move( update, &amp;balls_element, balls.x_, balls.y_ ); \t\tdispmanx_element_move( update, &amp;sun_element,   sun.x_,   sun.y_ ); \t\tdispmanx_sync( update ); \t} <\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u0438 \u0432\u0441\u0435.<br \/>  \u0412\u0435\u0441\u044c \u043a\u043e\u0434 \u043c\u043e\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u043d\u0430 github: <a href=\"https:\/\/github.com\/random-prj\/dispmanx-demo\" rel=\"nofollow\">github.com\/random-prj\/dispmanx-demo<\/a><br \/>  \u041a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043d\u0430 raspberry \u2014 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 make. \u041f\u043e\u0442\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0438\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438: .\/demo \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0442\u043e, \u0447\u0442\u043e \u0432\u044b \u0432\u0438\u0434\u0438\u0442\u0435 \u0432\u044b\u0448\u0435 \u043d\u0430 \u0432\u0438\u0434\u0435\u043e \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438.<\/p>\n<p>  \u041a\u0441\u0442\u0430\u0442\u0438 \u0433\u043e\u0432\u043e\u0440\u044f, \u043d\u0430 Raspberry \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0432\u0438\u0434\u0435\u043e\u0441\u043b\u043e\u0435\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 vcgencmd \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c dispmanx_list. \u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432\u044b\u0432\u043e\u0434 \u044d\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043d\u0430 Pi4 \u0434\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043c\u043e\u0435\u0433\u043e \u0434\u0435\u043c\u043e:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/33\/mz\/0d\/33mz0dtr_honwwqorlt-wori6ie.png\"><br \/>  \u041a\u0430\u043a \u0438 \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u0441\u043b\u043e\u044f: \u0441\u043b\u043e\u0439 \u0434\u043b\u044f Xorg \u0438 \u0441\u043b\u043e\u0439 \u0434\u043b\u044f \u043c\u044b\u0448\u0438.<\/p>\n<p>  \u0410 \u0432\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u043e\u0435\u0432 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043c\u043e\u0435\u0433\u043e demo:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/1i\/ln\/zy\/1ilnzyta7p3l5jcrznrcp8owsjk.png\"><\/p>\n<p>  \u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0431\u044b\u043b\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043e \u0447\u0435\u0442\u044b\u0440\u0435 \u043d\u043e\u0432\u044b\u0445 \u0441\u043b\u043e\u044f. \u042f \u0434\u0435\u043b\u0430\u043b \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u044b \u043d\u0430 \u0440\u0430\u0441\u043f\u0431\u0435\u0440\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 scrot. \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0447\u0442\u043e \u043e\u043d\u0430 \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0438\u0436\u043d\u0438\u0439 \u0438\u043a\u0441\u043e\u0432\u044b\u0439 \u0441\u043b\u043e\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435 \u043d\u0435 \u0432\u0438\u0434\u043d\u043e \u043d\u0438 \u043e\u0431\u043b\u0430\u043a\u043e\u0432 \u043d\u0438 \u0432\u043e\u0437\u0434\u0443\u0448\u043d\u044b\u0445 \u0448\u0430\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u043b\u043e\u044f\u0445.<\/p>\n<p>  \u042f \u0437\u043d\u0430\u044e, \u0447\u0442\u043e \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u044b Raspberry \u0438\u043d\u043e\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043a\u0438\u043e\u0441\u043a\u043e\u0432. \u0418 \u0434\u043b\u044f \u043a\u0438\u043e\u0441\u043a\u043e\u0432 \u0438\u043d\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c OSD, On Screen Display \u2014 \u0442\u043e \u0435\u0441\u0442\u044c \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u043e\u0434\u043d\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0432\u0435\u0440\u0445 \u0434\u0440\u0443\u0433\u043e\u0433\u043e. \u041c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e DispmanX API \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u044d\u0442\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0439. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043c\u0443-\u0442\u043e \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0442\u0430\u043a\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435.<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/493610\/\"> https:\/\/habr.com\/ru\/post\/493610\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/493610\/\">\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.25%;\"><iframe src=\"https:\/\/www.youtube.com\/embed\/05cqFhJtHaA?rel=0&amp;showinfo=1&amp;hl=en-US\" style=\"border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;\" allowfullscreen scrolling=\"no\" allow=\"encrypted-media; accelerometer; gyroscope; picture-in-picture\"><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0445\u043e\u0447\u0443 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 DispmanX API \u043e\u0434\u043d\u043e\u043f\u043b\u0430\u0442\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u0432 Raspberry. DispmanX API \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0430 \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u0435 Raspberry \u043d\u043e\u0432\u044b\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c\u044b\u0435 \u0441\u043b\u043e\u0438. \u0421\u043b\u043e\u0438 \u0432\u0438\u0441\u044f\u0442 \u043d\u0430\u0434 \u0441\u043b\u043e\u044f\u043c\u0438. \u0418\u0445 \u043c\u043e\u0436\u043d\u043e \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c, \u0443\u0434\u0430\u043b\u044f\u0442\u044c, \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0442\u044c, \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u0441\u0430\u043c \u0432\u0438\u0434\u0435\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u0438\u0445 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0430. \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0447\u0442\u043e \u0441\u043b\u043e\u0438 \u043c\u043e\u0433\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u0430\u043b\u044c\u0444\u0430 \u043a\u0430\u043d\u0430\u043b, \u0438 \u0442\u043e\u0433\u0434\u0430, \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0441\u043b\u043e\u0435\u0432 \u0431\u0443\u0434\u0443\u0442 \u0441\u0430\u043c\u0438 \u0441\u043e\u0431\u043e\u0439 \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u0442\u044c\u0441\u044f. \u0422\u0430\u043a \u0436\u0435, \u043a\u0440\u043e\u043c\u0435 32-\u0442\u0438 \u0434\u0432\u0443\u0445\u0431\u0438\u0442\u043d\u044b\u0445 ARGB \u0441\u043b\u043e\u0435\u0432 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, YUV420 \u0441\u043b\u043e\u0438, \u0438\u043b\u0438 \u0441\u043b\u043e\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0442\u0438\u043f\u043e\u0432. \u0412 Raspberry \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u0441\u043b\u043e\u044f. \u0421\u0430\u043c\u044b\u0439 \u043d\u0438\u0436\u043d\u0438\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u0430. \u0412\u0435\u0441\u044c \u0432\u044b\u0432\u043e\u0434 \u0447\u0435\u0440\u0435\u0437 \u0438\u043a\u0441\u044b \u0438\u0434\u0435\u0442 \u0432 \u044d\u0442\u043e\u0442 \u0441\u043b\u043e\u0439. \u0418 \u0435\u0441\u0442\u044c \u0432\u0442\u043e\u0440\u043e\u0439, \u0441\u0430\u043c\u044b\u0439 \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u0441\u043b\u043e\u0439, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0436\u0438\u0432\u0435\u0442 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043a\u0443\u0440\u0441\u043e\u0440\u0430 \u043c\u044b\u0448\u0438.<\/p>\n<p>  \u042f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0441\u043b\u043e\u0439, \u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u043d\u0435\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0438 \u043a\u0430\u043a \u0435\u0433\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0442\u044c \u043f\u043e \u044d\u043a\u0440\u0430\u043d\u0443. \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u043d\u0430 \u0434\u0435\u043c\u043e \u0432\u0438\u0434\u0435\u043e \u0432\u044b\u0448\u0435 \u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430 \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u0417\u0434\u0435\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0447\u0435\u0442\u044b\u0440\u0435 \u043d\u043e\u0432\u044b\u0445 32-\u0445 \u0431\u0438\u0442\u043d\u044b\u0445 \u0441\u043b\u043e\u044f ARGB. \u0412 \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u0441\u043b\u043e\u0435\u0432 \u044f \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e \u043f\u0438\u043a\u0441\u0435\u043b\u044b \u0438\u0437 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0431\u0438\u0442\u043c\u0430\u043f\u043e\u0432. \u041c\u043e\u0438 \u0431\u0438\u0442\u043c\u0430\u043f\u044b \u044d\u0442\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043e\u0431\u043b\u0430\u043a\u043e\u0432, \u0441\u043e\u043b\u043d\u0446\u0430 \u0438 \u0432\u043e\u0437\u0434\u0443\u0448\u043d\u044b\u0445 \u0448\u0430\u0440\u043e\u0432. \u0421\u043b\u043e\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u044e\u0442\u0441\u044f \u043f\u043e \u044d\u043a\u0440\u0430\u043d\u0443 \u0441 \u0440\u0430\u0437\u043d\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e, \u043d\u0430\u0432\u0438\u0441\u0430\u044f \u043d\u0430\u0434 \u0441\u0430\u043c\u044b\u043c \u043d\u0438\u0436\u043d\u0438\u043c \u0438\u043a\u0441\u043e\u0432\u044b\u043c \u0441\u043b\u043e\u0435\u043c.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-300700","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/300700","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=300700"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/300700\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=300700"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=300700"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=300700"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}