gl: Fix indentation

This commit is contained in:
Sebastian Dröge 2017-05-25 13:06:03 +03:00
parent 2434305ec5
commit be08f0f9a8
4 changed files with 30 additions and 22 deletions

View file

@ -130,7 +130,8 @@ gst_gl_window_dispmanx_egl_close (GstGLWindow * window)
window_egl = GST_GL_WINDOW_DISPMANX_EGL (window); window_egl = GST_GL_WINDOW_DISPMANX_EGL (window);
if (window_egl->native.element && window_egl->native.element != window_egl->foreign.element) { if (window_egl->native.element
&& window_egl->native.element != window_egl->foreign.element) {
dispman_update = vc_dispmanx_update_start (0); dispman_update = vc_dispmanx_update_start (0);
vc_dispmanx_element_remove (dispman_update, window_egl->native.element); vc_dispmanx_element_remove (dispman_update, window_egl->native.element);
vc_dispmanx_update_submit_sync (dispman_update); vc_dispmanx_update_submit_sync (dispman_update);
@ -184,10 +185,11 @@ gst_gl_window_dispmanx_egl_set_window_handle (GstGLWindow * window,
guintptr handle) guintptr handle)
{ {
GstGLWindowDispmanxEGL *window_egl = GST_GL_WINDOW_DISPMANX_EGL (window); GstGLWindowDispmanxEGL *window_egl = GST_GL_WINDOW_DISPMANX_EGL (window);
EGL_DISPMANX_WINDOW_T *foreign_window = (EGL_DISPMANX_WINDOW_T *)handle; EGL_DISPMANX_WINDOW_T *foreign_window = (EGL_DISPMANX_WINDOW_T *) handle;
DISPMANX_UPDATE_HANDLE_T dispman_update; DISPMANX_UPDATE_HANDLE_T dispman_update;
GST_DEBUG_OBJECT (window, "set window handle with size %dx%d", foreign_window->width, foreign_window->height); GST_DEBUG_OBJECT (window, "set window handle with size %dx%d",
foreign_window->width, foreign_window->height);
if (window_egl->native.element) { if (window_egl->native.element) {
dispman_update = vc_dispmanx_update_start (0); dispman_update = vc_dispmanx_update_start (0);
@ -195,9 +197,11 @@ gst_gl_window_dispmanx_egl_set_window_handle (GstGLWindow * window,
vc_dispmanx_update_submit_sync (dispman_update); vc_dispmanx_update_submit_sync (dispman_update);
} }
window_egl->native.element = window_egl->foreign.element = foreign_window->element; window_egl->native.element = window_egl->foreign.element =
window_egl->native.width = window_egl->foreign.width = foreign_window->width; foreign_window->element;
window_egl->native.height = window_egl->foreign.height = foreign_window->height; window_egl->native.width = window_egl->foreign.width = foreign_window->width;
window_egl->native.height = window_egl->foreign.height =
foreign_window->height;
} }
static void static void

View file

@ -515,7 +515,8 @@ gst_gl_framebuffer_get_effective_dimensions (GstGLFramebuffer * fb,
* Since: 1.10 * Since: 1.10
*/ */
gboolean gboolean
gst_gl_context_check_framebuffer_status (GstGLContext * context, GLenum fbo_target) gst_gl_context_check_framebuffer_status (GstGLContext * context,
GLenum fbo_target)
{ {
g_return_val_if_fail (GST_IS_GL_CONTEXT (context), FALSE); g_return_val_if_fail (GST_IS_GL_CONTEXT (context), FALSE);

View file

@ -684,7 +684,8 @@ gst_gl_memory_copy_teximage (GstGLMemory * src, guint tex_id,
gl->FramebufferTexture2D (GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, gl->FramebufferTexture2D (GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
gst_gl_texture_target_to_gl (src->tex_target), src_tex_id, 0); gst_gl_texture_target_to_gl (src->tex_target), src_tex_id, 0);
if (!gst_gl_context_check_framebuffer_status (src->mem.context, GL_FRAMEBUFFER)) if (!gst_gl_context_check_framebuffer_status (src->mem.context,
GL_FRAMEBUFFER))
goto fbo_error; goto fbo_error;
gl->BindTexture (out_tex_target, tex_id); gl->BindTexture (out_tex_target, tex_id);
@ -713,7 +714,8 @@ gst_gl_memory_copy_teximage (GstGLMemory * src, guint tex_id,
gl->FramebufferTexture2D (GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, gl->FramebufferTexture2D (GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
gst_gl_texture_target_to_gl (src->tex_target), src_tex_id, 0); gst_gl_texture_target_to_gl (src->tex_target), src_tex_id, 0);
if (!gst_gl_context_check_framebuffer_status (src->mem.context, GL_READ_FRAMEBUFFER)) if (!gst_gl_context_check_framebuffer_status (src->mem.context,
GL_READ_FRAMEBUFFER))
goto fbo_error; goto fbo_error;
gl->BindFramebuffer (GL_DRAW_FRAMEBUFFER, fbo[1]); gl->BindFramebuffer (GL_DRAW_FRAMEBUFFER, fbo[1]);
@ -721,7 +723,8 @@ gst_gl_memory_copy_teximage (GstGLMemory * src, guint tex_id,
gl->FramebufferTexture2D (GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, gl->FramebufferTexture2D (GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
gst_gl_texture_target_to_gl (src->tex_target), tex_id, 0); gst_gl_texture_target_to_gl (src->tex_target), tex_id, 0);
if (!gst_gl_context_check_framebuffer_status (src->mem.context, GL_DRAW_FRAMEBUFFER)) if (!gst_gl_context_check_framebuffer_status (src->mem.context,
GL_DRAW_FRAMEBUFFER))
goto fbo_error; goto fbo_error;
gl->BindTexture (out_tex_target, tex_id); gl->BindTexture (out_tex_target, tex_id);

View file

@ -49,22 +49,22 @@
typedef struct _GstGLShaderVTable typedef struct _GstGLShaderVTable
{ {
GLuint (GSTGLAPI *CreateProgram) (void); GLuint (GSTGLAPI * CreateProgram) (void);
void (GSTGLAPI *DeleteProgram) (GLuint program); void (GSTGLAPI * DeleteProgram) (GLuint program);
void (GSTGLAPI *UseProgram) (GLuint program); void (GSTGLAPI * UseProgram) (GLuint program);
void (GSTGLAPI *GetAttachedShaders) (GLuint program, GLsizei maxcount, void (GSTGLAPI * GetAttachedShaders) (GLuint program, GLsizei maxcount,
GLsizei * count, GLuint * shaders); GLsizei * count, GLuint * shaders);
GLuint (GSTGLAPI *CreateShader) (GLenum shaderType); GLuint (GSTGLAPI * CreateShader) (GLenum shaderType);
void (GSTGLAPI *DeleteShader) (GLuint shader); void (GSTGLAPI * DeleteShader) (GLuint shader);
void (GSTGLAPI *AttachShader) (GLuint program, GLuint shader); void (GSTGLAPI * AttachShader) (GLuint program, GLuint shader);
void (GSTGLAPI *DetachShader) (GLuint program, GLuint shader); void (GSTGLAPI * DetachShader) (GLuint program, GLuint shader);
void (GSTGLAPI *GetShaderiv) (GLuint program, GLenum pname, GLint * params); void (GSTGLAPI * GetShaderiv) (GLuint program, GLenum pname, GLint * params);
void (GSTGLAPI *GetProgramiv) (GLuint program, GLenum pname, GLint * params); void (GSTGLAPI * GetProgramiv) (GLuint program, GLenum pname, GLint * params);
void (GSTGLAPI *GetShaderInfoLog) (GLuint shader, GLsizei maxLength, void (GSTGLAPI * GetShaderInfoLog) (GLuint shader, GLsizei maxLength,
GLsizei * length, char *log); GLsizei * length, char *log);
void (GSTGLAPI *GetProgramInfoLog) (GLuint shader, GLsizei maxLength, void (GSTGLAPI * GetProgramInfoLog) (GLuint shader, GLsizei maxLength,
GLsizei * length, char *log); GLsizei * length, char *log);
} GstGLShaderVTable; } GstGLShaderVTable;