gst_gl_context_clear_shader (gl_sink->context);
gl->BindTexture (gl_target, 0);
- if (!gst_gl_window_controls_viewport (window))
+ if (!gst_gl_window_controls_viewport (window)) {
gl->Viewport (gl_sink->display_rect.x, gl_sink->display_rect.y,
gl_sink->display_rect.w, gl_sink->display_rect.h);
+ GST_DEBUG_OBJECT (gl_sink, "GL output area now %u,%u %ux%u",
+ gl_sink->display_rect.x, gl_sink->display_rect.y,
+ gl_sink->display_rect.w, gl_sink->display_rect.h);
+ }
sample = gst_sample_new (gl_sink->stored_buffer[0],
gl_sink->out_caps, &GST_BASE_SINK (gl_sink)->segment, NULL);
static gboolean gst_gl_window_gbm_init_surface (GstGLWindowGBMEGL * window_egl);
-
static void
gst_gl_window_gbm_egl_class_init (GstGLWindowGBMEGLClass * klass)
{
}
}
+ if (window->queue_resize) {
+ guint width, height;
+
+ gst_gl_window_get_surface_dimensions (window, &width, &height);
+ gst_gl_window_resize (window, width, height);
+ }
+
/* Do the actual drawing */
if (window->draw)
window->draw (window->draw_data);
GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING);
gst_gl_window_resize (window, hdisplay, vdisplay);
+ gst_gl_window_queue_resize (window);
- GST_DEBUG ("Successfully created GBM surface");
+ GST_DEBUG ("Successfully created GBM surface %ix%i from info %p", hdisplay,
+ vdisplay, drm_mode_info);
cleanup:
return ret;
}
-
/* Must be called in the gl thread */
GstGLWindowGBMEGL *
gst_gl_window_gbm_egl_new (GstGLDisplay * display)