]> git.sesse.net Git - vlc/commitdiff
Added a way to retreive an opengl context from a vout display.
authorLaurent Aimar <fenrir@videolan.org>
Sat, 12 Dec 2009 21:41:45 +0000 (22:41 +0100)
committerLaurent Aimar <fenrir@videolan.org>
Sun, 13 Dec 2009 12:52:36 +0000 (13:52 +0100)
include/vlc_vout_display.h
include/vlc_vout_wrapper.h
src/libvlccore.sym
src/video_output/display.c

index f7c436d48dd84a4631c0be62a63a7ceeb429ba94..5f927e0971de0da3934c8b8f5189a4f0af3ca8b1 100644 (file)
@@ -157,6 +157,9 @@ enum {
      * The cropping requested is stored by video_format_t::i_x/y_offset and
      * video_format_t::i_visible_width/height */
     VOUT_DISPLAY_CHANGE_SOURCE_CROP,   /* const video_format_t *p_source */
+
+    /* Ask an opengl interface if available. */
+    VOUT_DISPLAY_GET_OPENGL,           /* vout_opengl_t ** */
 };
 
 /**
index 13637c9a4cde09d128851be30d63e772f22a323f..d6a9e2b3ca3d677ef3ccba669c61b0a034fa7ea6 100644 (file)
@@ -25,6 +25,7 @@
 #define VLC_VOUT_WRAPPER_H 1
 
 #include <vlc_vout_display.h>
+#include <vlc_vout_opengl.h>
 
 /* XXX DO NOT use it outside the vout module wrapper XXX */
 
@@ -87,6 +88,7 @@ VLC_EXPORT(void, vout_SetDisplayZoom, (vout_display_t *, int num, int den));
 VLC_EXPORT(void, vout_SetDisplayOnTop, (vout_display_t *, bool is_on_top));
 VLC_EXPORT(void, vout_SetDisplayAspect, (vout_display_t *, unsigned sar_num, unsigned sar_den));
 VLC_EXPORT(void, vout_SetDisplayCrop, (vout_display_t *, unsigned crop_num, unsigned crop_den, unsigned x, unsigned y, unsigned width, unsigned height));
+VLC_EXPORT(vout_opengl_t *, vout_GetDisplayOpengl, (vout_display_t *));
 
 #endif /* VLC_VOUT_WRAPPER_H */
 
index 246a7394583a6adc60d2f3ab908cf20c79388488..06274d9a5338068112ca202962274e50d8fbbdbc 100644 (file)
@@ -597,6 +597,7 @@ vout_AreDisplayPicturesInvalid
 vout_IsDisplayFiltered
 vout_FilterDisplay
 vout_ManageDisplay
+vout_GetDisplayOpengl
 vout_SetDisplayFullscreen
 vout_SetDisplayFilled
 vout_SetDisplayZoom
index 5559797b0472a314d91a659e5587227155b59372..77023588fe290c5bed737fabfcaf262126a67b88 100644 (file)
@@ -1012,7 +1012,13 @@ void vout_SetDisplayCrop(vout_display_t *vd,
         osys->ch_crop = true;
     }
 }
-
+vout_opengl_t *vout_GetDisplayOpengl(vout_display_t *vd)
+{
+    vout_opengl_t *gl;
+    if (vout_display_Control(vd, VOUT_DISPLAY_GET_OPENGL, &gl))
+        return NULL;
+    return gl;
+}
 
 static vout_display_t *DisplayNew(vout_thread_t *vout,
                                   const video_format_t *source_org,