vout: opengl: handle VOUT_DISPLAY_CHANGE_VIEWPOINT
authorSteve Lhomme <robux4@videolabs.io>
Tue, 15 Nov 2016 16:43:33 +0000 (17:43 +0100)
committerThomas Guillem <thomas@gllm.fr>
Tue, 15 Nov 2016 17:13:46 +0000 (18:13 +0100)
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
modules/video_output/caopengllayer.m
modules/video_output/gl.c
modules/video_output/ios2.m
modules/video_output/macosx.m
modules/video_output/win32/glwin32.c
modules/video_output/xcb/glx.c

index 0c39fde..1be3ee6 100644 (file)
@@ -405,6 +405,10 @@ static int Control (vout_display_t *vd, int query, va_list ap)
             return VLC_SUCCESS;
         }
 
+        case VOUT_DISPLAY_CHANGE_VIEWPOINT:
+            return vout_display_opengl_SetViewpoint(sys->vgl,
+                &va_arg (ap, const vout_display_cfg_t* )->viewpoint);
+
         case VOUT_DISPLAY_RESET_PICTURES:
             vlc_assert_unreachable ();
         default:
index d9e48d3..e272396 100644 (file)
@@ -250,6 +250,9 @@ static int Control (vout_display_t *vd, int query, va_list ap)
         vlc_gl_ReleaseCurrent (sys->gl);
         return VLC_SUCCESS;
       }
+      case VOUT_DISPLAY_CHANGE_VIEWPOINT:
+        return vout_display_opengl_SetViewpoint (sys->vgl,
+            &va_arg (ap, const vout_display_cfg_t* )->viewpoint);
       default:
         msg_Err (vd, "Unknown request %d", query);
     }
index 1f7c24b..3e1c8b4 100644 (file)
@@ -426,6 +426,10 @@ static int Control(vout_display_t *vd, int query, va_list ap)
             return VLC_SUCCESS;
         }
 
+        case VOUT_DISPLAY_CHANGE_VIEWPOINT:
+            return vout_display_opengl_SetViewpoint(sys->vgl,
+                &va_arg (ap, const vout_display_cfg_t* )->viewpoint);
+
         case VOUT_DISPLAY_RESET_PICTURES:
             vlc_assert_unreachable ();
         default:
index 0e7a67c..3ba8fd0 100644 (file)
@@ -435,7 +435,11 @@ static int Control (vout_display_t *vd, int query, va_list ap)
                 [NSCursor setHiddenUntilMouseMoves: YES];
                 return VLC_SUCCESS;
             }
-                
+
+            case VOUT_DISPLAY_CHANGE_VIEWPOINT:
+                return vout_display_opengl_SetViewpoint (sys->vgl,
+                    &va_arg (ap, const vout_display_cfg_t* )->viewpoint);
+
             case VOUT_DISPLAY_RESET_PICTURES:
                 vlc_assert_unreachable ();
             default:
index 810c063..07c2425 100644 (file)
@@ -147,6 +147,17 @@ static void DestroyGPUAffinityDC(vout_display_t *vd) {
     fncDeleteDCNV(vd->sys->affinityHDC);
 }
 
+static int Control(vout_display_t *vd, int query, va_list args)
+{
+    vout_display_sys_t *sys = vd->sys;
+
+    if (query == VOUT_DISPLAY_CHANGE_VIEWPOINT)
+        return vout_display_opengl_SetViewpoint(sys->vgl,
+            &va_arg (args, const vout_display_cfg_t* )->viewpoint);
+
+    return CommonControl(vd, query, args);
+}
+
 /**
  * It creates an OpenGL vout display.
  */
@@ -228,7 +239,7 @@ static int Open(vlc_object_t *object)
     vd->pool    = Pool;
     vd->prepare = Prepare;
     vd->display = Display;
-    vd->control = CommonControl;
+    vd->control = Control;
     vd->manage  = Manage;
 
     return VLC_SUCCESS;
index 7919311..a7fb71b 100644 (file)
@@ -248,6 +248,10 @@ static int Control (vout_display_t *vd, int query, va_list ap)
         xcb_flush (sys->conn);
         return VLC_SUCCESS;
 
+    case VOUT_DISPLAY_CHANGE_VIEWPOINT:
+        return vout_display_opengl_SetViewpoint (sys->vgl,
+            &va_arg (ap, const vout_display_cfg_t* )->viewpoint);
+
     case VOUT_DISPLAY_RESET_PICTURES:
         vlc_assert_unreachable ();
     default: