mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
eglglessink: Assorted doc and reordering fixes
This commit is contained in:
parent
031b6a57ac
commit
d97b3dba60
2 changed files with 25 additions and 29 deletions
|
@ -1582,12 +1582,10 @@ gst_eglglessink_init_egl_surface (GstEglGlesSink * eglglessink)
|
||||||
eglglessink->have_surface = TRUE;
|
eglglessink->have_surface = TRUE;
|
||||||
g_mutex_unlock (eglglessink->flow_lock);
|
g_mutex_unlock (eglglessink->flow_lock);
|
||||||
|
|
||||||
/* Init vertex and fragment progs.
|
/* Init vertex and fragment GLSL shaders. This entire block might need to be
|
||||||
* XXX: Need to be runtime conditional or ifdefed
|
* runtime conditional once the fast rendering path gets fully implemented.
|
||||||
*/
|
*
|
||||||
|
* Note: Shader compiler support is optional but we currently rely on it.
|
||||||
/* Shader compiler support is optional but we
|
|
||||||
* currently rely on it.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
glGetBooleanv (GL_SHADER_COMPILER, &ret);
|
glGetBooleanv (GL_SHADER_COMPILER, &ret);
|
||||||
|
@ -1805,10 +1803,10 @@ gst_eglglessink_init_egl_surface (GstEglGlesSink * eglglessink)
|
||||||
/* Set 2D resizing params */
|
/* Set 2D resizing params */
|
||||||
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||||
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||||
/* The following two calls are for non-POT width/height cases. If these
|
/* If these are not set the texture image unit will return
|
||||||
* are not set the texture image unit returns (R, G, B, A) = black
|
* (R, G, B, A) = black on glTexImage2D for non-POT width/height
|
||||||
* on glTexImage2D. For a deeper explanation take a look at
|
* frames. For a deeper explanation take a look at the OpenGL ES
|
||||||
* the OpenGl ES docs for glTexParameter */
|
* documentation for glTexParameter */
|
||||||
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||||
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||||
if (got_gl_error ("glTexParameteri"))
|
if (got_gl_error ("glTexParameteri"))
|
||||||
|
@ -1949,7 +1947,7 @@ gst_eglglessink_set_render_rectangle (GstXOverlay * overlay, gint x, gint y,
|
||||||
g_mutex_lock (eglglessink->flow_lock);
|
g_mutex_lock (eglglessink->flow_lock);
|
||||||
|
|
||||||
if (width == -1 && height == -1) {
|
if (width == -1 && height == -1) {
|
||||||
/* This is the set_defaults condition according to
|
/* This is the set-defaults condition according to
|
||||||
* the xOverlay interface docs
|
* the xOverlay interface docs
|
||||||
*/
|
*/
|
||||||
eglglessink->display_region.w = 0;
|
eglglessink->display_region.w = 0;
|
||||||
|
@ -2161,7 +2159,8 @@ gst_eglglessink_render_and_display (GstEglGlesSink * eglglessink,
|
||||||
* 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%. We
|
* interface we are supposed to fill the overlay 100%. We
|
||||||
* do this trying to take PAR/DAR into account unless the
|
* do this trying to take PAR/DAR into account unless the
|
||||||
* calling party explicitly ask us not to.
|
* calling party explicitly ask us not to by setting
|
||||||
|
* force_aspect_ratio to FALSE.
|
||||||
*/
|
*/
|
||||||
if (gst_eglglessink_update_surface_dimensions (eglglessink) ||
|
if (gst_eglglessink_update_surface_dimensions (eglglessink) ||
|
||||||
!eglglessink->display_region.w || !eglglessink->display_region.h) {
|
!eglglessink->display_region.w || !eglglessink->display_region.h) {
|
||||||
|
@ -2285,7 +2284,6 @@ gst_eglglessink_getcaps (GstBaseSink * bsink)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX: WIP renego logic */
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_eglglessink_setcaps (GstBaseSink * bsink, GstCaps * caps)
|
gst_eglglessink_setcaps (GstBaseSink * bsink, GstCaps * caps)
|
||||||
{
|
{
|
||||||
|
@ -2449,7 +2447,6 @@ SUCCEED:
|
||||||
GST_INFO_OBJECT (eglglessink, "Setcaps succeed");
|
GST_INFO_OBJECT (eglglessink, "Setcaps succeed");
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
/* Errors */
|
|
||||||
HANDLE_ERROR:
|
HANDLE_ERROR:
|
||||||
GST_ERROR_OBJECT (eglglessink, "Setcaps failed");
|
GST_ERROR_OBJECT (eglglessink, "Setcaps failed");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -2652,7 +2649,7 @@ gst_eglglessink_init (GstEglGlesSink * eglglessink,
|
||||||
GstEglGlesSinkClass * gclass)
|
GstEglGlesSinkClass * gclass)
|
||||||
{
|
{
|
||||||
/* Init defaults */
|
/* Init defaults */
|
||||||
|
|
||||||
/** Flags */
|
/** Flags */
|
||||||
eglglessink->have_window = FALSE;
|
eglglessink->have_window = FALSE;
|
||||||
eglglessink->have_surface = FALSE;
|
eglglessink->have_surface = FALSE;
|
||||||
|
|
|
@ -77,8 +77,8 @@ typedef struct _GstEglGlesRenderContext GstEglGlesRenderContext;
|
||||||
|
|
||||||
typedef struct _GstEglGlesImageFmt GstEglGlesImageFmt;
|
typedef struct _GstEglGlesImageFmt GstEglGlesImageFmt;
|
||||||
|
|
||||||
/* Should be extended when new rendering methods
|
/* Should be extended if new rendering methods
|
||||||
* get implemented.
|
* get implemented.
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
|
@ -145,21 +145,22 @@ struct _GstEglGlesBuffer
|
||||||
|
|
||||||
struct _GstEglGlesSink
|
struct _GstEglGlesSink
|
||||||
{
|
{
|
||||||
GstVideoSink videosink;
|
|
||||||
GstVideoFormat format;
|
|
||||||
GstCaps *current_caps;
|
|
||||||
|
|
||||||
int par_n, par_d; /* Aspect ratio from caps */
|
int par_n, par_d; /* Aspect ratio from caps */
|
||||||
|
|
||||||
|
GstVideoSink videosink;
|
||||||
|
GstVideoFormat format;
|
||||||
|
GstVideoRectangle display_region;
|
||||||
|
GstCaps *sinkcaps;
|
||||||
|
GstCaps *current_caps;
|
||||||
|
|
||||||
|
GstEglGlesImageFmt *selected_fmt;
|
||||||
|
GstEglGlesSinkRenderingPath rendering_path;
|
||||||
GstEglGlesRenderContext *eglglesctx;
|
GstEglGlesRenderContext *eglglesctx;
|
||||||
|
|
||||||
GstVideoRectangle display_region;
|
|
||||||
GList *supported_fmts;
|
|
||||||
GstEglGlesImageFmt *selected_fmt;
|
|
||||||
GstCaps *sinkcaps;
|
|
||||||
|
|
||||||
GMutex *flow_lock;
|
GMutex *flow_lock;
|
||||||
|
GList *supported_fmts;
|
||||||
|
|
||||||
|
/* Runtime flags */
|
||||||
gboolean have_window;
|
gboolean have_window;
|
||||||
gboolean using_own_window;
|
gboolean using_own_window;
|
||||||
gboolean have_surface;;
|
gboolean have_surface;;
|
||||||
|
@ -167,9 +168,7 @@ struct _GstEglGlesSink
|
||||||
gboolean have_texture;
|
gboolean have_texture;
|
||||||
gboolean egl_started;
|
gboolean egl_started;
|
||||||
|
|
||||||
GstEglGlesSinkRenderingPath rendering_path;
|
/* Properties */
|
||||||
|
|
||||||
/* props */
|
|
||||||
gboolean create_window;
|
gboolean create_window;
|
||||||
gboolean force_rendering_slow;
|
gboolean force_rendering_slow;
|
||||||
gboolean force_aspect_ratio;
|
gboolean force_aspect_ratio;
|
||||||
|
|
Loading…
Reference in a new issue