home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2010 November / maximum-cd-2010-11.iso / DiscContents / vlc-1.1.2-win32.exe / sdk / include / vlc / plugins / vlc_vout_opengl.h < prev    next >
Encoding:
C/C++ Source or Header  |  2010-07-30  |  1.8 KB  |  62 lines

  1. /*****************************************************************************
  2.  * vlc_vout_opengl.h: vout_opengl_t definitions
  3.  *****************************************************************************
  4.  * Copyright (C) 2009 Laurent Aimar
  5.  * $Id: 94c09153e43744e88dcc5c6894fa57690ac8ad7c $
  6.  *
  7.  * Authors: Laurent Aimar <fenrir _AT_ videolan _DOT_ org>
  8.  *
  9.  * This program is free software; you can redistribute it and/or modify
  10.  * it under the terms of the GNU General Public License as published by
  11.  * the Free Software Foundation; either version 2 of the License, or
  12.  * (at your option) any later version.
  13.  *
  14.  * This program is distributed in the hope that it will be useful,
  15.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17.  * GNU General Public License for more details.
  18.  *
  19.  * You should have received a copy of the GNU General Public License
  20.  * along with this program; if not, write to the Free Software
  21.  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  22.  *****************************************************************************/
  23.  
  24. #ifndef VLC_VOUT_OPENGL_H
  25. #define VLC_VOUT_OPENGL_H 1
  26.  
  27. /**
  28.  * \file
  29.  * This file defines vout opengl structures and functions in vlc
  30.  */
  31.  
  32. #include <vlc_common.h>
  33.  
  34. typedef struct vout_opengl_t vout_opengl_t;
  35. struct vout_opengl_t {
  36.     /* */
  37.     int  (*lock)(vout_opengl_t *);
  38.     void (*swap)(vout_opengl_t *);
  39.     void (*unlock)(vout_opengl_t *);
  40.     /* */
  41.     void *sys;
  42. };
  43.  
  44. static inline int vout_opengl_Lock(vout_opengl_t *gl)
  45. {
  46.     if (!gl->lock)
  47.         return VLC_SUCCESS;
  48.     return gl->lock(gl);
  49. }
  50. static inline void vout_opengl_Unlock(vout_opengl_t *gl)
  51. {
  52.     if (gl->unlock)
  53.         gl->unlock(gl);
  54. }
  55. static inline void vout_opengl_Swap(vout_opengl_t *gl)
  56. {
  57.     gl->swap(gl);
  58. }
  59.  
  60. #endif /* VLC_VOUT_OPENGL_H */
  61.  
  62.