From a51b9608861bb1a7a42af6f0f20e80e0abf2e52b Mon Sep 17 00:00:00 2001 From: Laurent Aimar Date: Sun, 6 Dec 2009 22:02:44 +0100 Subject: [PATCH] Added vout_opengl_t definitions. --- include/vlc_vout_opengl.h | 61 +++++++++++++++++++++++++++++++++++++++ src/Makefile.am | 1 + 2 files changed, 62 insertions(+) create mode 100644 include/vlc_vout_opengl.h diff --git a/include/vlc_vout_opengl.h b/include/vlc_vout_opengl.h new file mode 100644 index 0000000000..016ee9b18a --- /dev/null +++ b/include/vlc_vout_opengl.h @@ -0,0 +1,61 @@ +/***************************************************************************** + * vlc_vout_opengl.h: vout_opengl_t definitions + ***************************************************************************** + * Copyright (C) 2009 Laurent Aimar + * $Id$ + * + * Authors: Laurent Aimar + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. + *****************************************************************************/ + +#ifndef VLC_VOUT_OPENGL_H +#define VLC_VOUT_OPENGL_H 1 + +/** + * \file + * This file defines vout opengl structures and functions in vlc + */ + +#include + +typedef struct vout_opengl_t vout_opengl_t; +struct vout_opengl_t { + /* */ + int (*lock)(vout_opengl_t *); + void (*swap)(vout_opengl_t *); + void (*unlock)(vout_opengl_t *); + /* */ + void *sys; +}; + +static inline int vout_opengl_Lock(vout_opengl_t *gl) +{ + if (!gl->lock) + return VLC_SUCCESS; + return gl->lock(gl); +} +static inline void vout_opengl_Unlock(vout_opengl_t *gl) +{ + if (gl->unlock) + gl->unlock(gl); +} +static inline void vout_opengl_Swap(vout_opengl_t *gl) +{ + gl->swap(gl); +} + +#endif /* VLC_VOUT_OPENGL_H */ + diff --git a/src/Makefile.am b/src/Makefile.am index b1eff241f5..3084e3f229 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -102,6 +102,7 @@ pluginsinclude_HEADERS = \ ../include/vlc_video_splitter.h \ ../include/vlc_vout.h \ ../include/vlc_vout_display.h \ + ../include/vlc_vout_opengl.h \ ../include/vlc_vout_window.h \ ../include/vlc_xml.h \ $(NULL) -- 2.39.2