Commit 8eae3e87 authored by Romain Vimont's avatar Romain Vimont
Browse files

opengl: simplify renderer format

The interop may modify its own copy of the video_format_t.

These changes must be reported to the core (by writing to the provided
video_format_t), except for the orientation: it is managed internally by
OpenGL, so from the core point of view, the orientation does not change.

Handle the format to report to the core outside of the renderer. This
paves the way to pass only the interop to the renderer, without an
additional video_format_t instance.
parent 736be666
......@@ -490,10 +490,7 @@ vlc_gl_renderer_New(vlc_gl_t *gl, const struct vlc_gl_api *api,
getViewpointMatrixes(renderer, interop->fmt.projection_mode);
/* Update the fmt to main program one */
renderer->fmt = interop->fmt;
/* The orientation is handled by the orientation matrix */
renderer->fmt.orientation = fmt->orientation;
renderer->fmt = *fmt;
/* Texture size */
for (unsigned j = 0; j < interop->tex_count; j++) {
......@@ -187,7 +187,12 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
return NULL;
*fmt = renderer->fmt;
video_orientation_t orientation = fmt->orientation;
*fmt = vgl->interop->fmt;
/* The orientation is handled by the orientation matrix: from the core
* point of view, it does not change. */
fmt->orientation = orientation;
if (subpicture_chromas) {
*subpicture_chromas = gl_subpicture_chromas;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment