eglglessink: Update surface dimensions on every buffer
This commit is contained in:
parent
2b2ae0fd6f
commit
3fcea0dc5e
@ -1384,6 +1384,22 @@ HANDLE_ERROR_LOCKED:
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gst_eglglessink_update_surface_dimensions (GstEglGlesSink * eglglessink)
|
||||||
|
{
|
||||||
|
/* Save surface dims */
|
||||||
|
eglQuerySurface (eglglessink->eglglesctx->display,
|
||||||
|
eglglessink->eglglesctx->surface, EGL_WIDTH,
|
||||||
|
&eglglessink->eglglesctx->surface_width);
|
||||||
|
eglQuerySurface (eglglessink->eglglesctx->display,
|
||||||
|
eglglessink->eglglesctx->surface, EGL_HEIGHT,
|
||||||
|
&eglglessink->eglglesctx->surface_height);
|
||||||
|
|
||||||
|
GST_INFO_OBJECT (eglglessink, "Got surface of %dx%d pixels",
|
||||||
|
eglglessink->eglglesctx->surface_width,
|
||||||
|
eglglessink->eglglesctx->surface_height);
|
||||||
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_eglglessink_init_egl_surface (GstEglGlesSink * eglglessink)
|
gst_eglglessink_init_egl_surface (GstEglGlesSink * eglglessink)
|
||||||
{
|
{
|
||||||
@ -1417,16 +1433,7 @@ gst_eglglessink_init_egl_surface (GstEglGlesSink * eglglessink)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Save surface dims */
|
/* Save surface dims */
|
||||||
eglQuerySurface (eglglessink->eglglesctx->display,
|
gst_eglglessink_update_surface_dimensions (eglglessink);
|
||||||
eglglessink->eglglesctx->surface, EGL_WIDTH,
|
|
||||||
&eglglessink->eglglesctx->surface_width);
|
|
||||||
eglQuerySurface (eglglessink->eglglesctx->display,
|
|
||||||
eglglessink->eglglesctx->surface, EGL_HEIGHT,
|
|
||||||
&eglglessink->eglglesctx->surface_height);
|
|
||||||
|
|
||||||
GST_INFO_OBJECT (eglglessink, "Got surface of %dx%d pixels",
|
|
||||||
eglglessink->eglglesctx->surface_width,
|
|
||||||
eglglessink->eglglesctx->surface_height);
|
|
||||||
|
|
||||||
/* We have a surface! */
|
/* We have a surface! */
|
||||||
eglglessink->have_surface = TRUE;
|
eglglessink->have_surface = TRUE;
|
||||||
@ -2002,6 +2009,9 @@ gst_eglglessink_render_and_display (GstEglGlesSink * eglglessink,
|
|||||||
goto HANDLE_ERROR;
|
goto HANDLE_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Update surface dims */
|
||||||
|
gst_eglglessink_update_surface_dimensions (eglglessink);
|
||||||
|
|
||||||
/* If no one has set a display rectangle on us initialize
|
/* If no one has set a display rectangle on us initialize
|
||||||
* a sane default. According to the docs on the xOverlay
|
* a sane default. According to the docs on the xOverlay
|
||||||
* interface we are supposed to fill the overlay 100%
|
* interface we are supposed to fill the overlay 100%
|
||||||
|
Loading…
x
Reference in New Issue
Block a user