mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 08:17:01 +00:00
eglglessink: Close the dispman display on RPi after usage
This commit is contained in:
parent
3876a7f9e6
commit
d875858167
1 changed files with 4 additions and 1 deletions
|
@ -673,6 +673,7 @@ platform_free_eglimage (EGLDisplay display, EGLContext context, GLuint tex_id,
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
EGL_DISPMANX_WINDOW_T w;
|
EGL_DISPMANX_WINDOW_T w;
|
||||||
|
DISPMANX_DISPLAY_HANDLE_T d;
|
||||||
} RPIWindowData;
|
} RPIWindowData;
|
||||||
|
|
||||||
EGLNativeWindowType
|
EGLNativeWindowType
|
||||||
|
@ -715,6 +716,7 @@ platform_create_native_window (gint width, gint height, gpointer * window_data)
|
||||||
DISPMANX_PROTECTION_NONE, 0, 0, 0);
|
DISPMANX_PROTECTION_NONE, 0, 0, 0);
|
||||||
|
|
||||||
*window_data = data = g_slice_new0 (RPIWindowData);
|
*window_data = data = g_slice_new0 (RPIWindowData);
|
||||||
|
data->d = dispman_display;
|
||||||
data->w.element = dispman_element;
|
data->w.element = dispman_element;
|
||||||
data->w.width = width;
|
data->w.width = width;
|
||||||
data->w.height = height;
|
data->w.height = height;
|
||||||
|
@ -731,10 +733,11 @@ platform_destroy_native_window (EGLNativeDisplayType display,
|
||||||
DISPMANX_UPDATE_HANDLE_T dispman_update;
|
DISPMANX_UPDATE_HANDLE_T dispman_update;
|
||||||
RPIWindowData *data = *window_data;
|
RPIWindowData *data = *window_data;
|
||||||
|
|
||||||
dispman_display = vc_dispmanx_display_open (0);
|
dispman_display = data->d;
|
||||||
dispman_update = vc_dispmanx_update_start (0);
|
dispman_update = vc_dispmanx_update_start (0);
|
||||||
vc_dispmanx_element_remove (dispman_update, data->w.element);
|
vc_dispmanx_element_remove (dispman_update, data->w.element);
|
||||||
vc_dispmanx_update_submit_sync (dispman_update);
|
vc_dispmanx_update_submit_sync (dispman_update);
|
||||||
|
vc_dispmanx_display_close (dispman_display);
|
||||||
|
|
||||||
g_slice_free (RPIWindowData, data);
|
g_slice_free (RPIWindowData, data);
|
||||||
*window_data = NULL;
|
*window_data = NULL;
|
||||||
|
|
Loading…
Reference in a new issue