vlc_vout_wrapper.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * vlc_vout_wrapper.h: definitions for vout wrappers (temporary)
00003  *****************************************************************************
00004  * Copyright (C) 2009 Laurent Aimar
00005  * $Id: c249d3929d9dcc6bb76913759496c3447456bc2c $
00006  *
00007  * Authors: Laurent Aimar <fenrir _AT_ videolan _DOT_ org>
00008  *
00009  * This program is free software; you can redistribute it and/or modify it
00010  * under the terms of the GNU Lesser General Public License as published by
00011  * the Free Software Foundation; either version 2.1 of the License, or
00012  * (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00017  * GNU Lesser General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU Lesser General Public License
00020  * along with this program; if not, write to the Free Software Foundation,
00021  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
00022  *****************************************************************************/
00023 
00024 #ifndef VLC_VOUT_WRAPPER_H
00025 #define VLC_VOUT_WRAPPER_H 1
00026 
00027 #include <vlc_vout_display.h>
00028 
00029 /* XXX DO NOT use it outside the vout module wrapper XXX */
00030 
00031 /**
00032  * It retreives a picture pool from the display
00033  */
00034 static inline picture_pool_t *vout_display_Pool(vout_display_t *vd, unsigned count)
00035 {
00036     return vd->pool(vd, count);
00037 }
00038 
00039 /**
00040  * It preparse a picture for display.
00041  */
00042 static inline void vout_display_Prepare(vout_display_t *vd,
00043                                         picture_t *picture,
00044                                         subpicture_t *subpicture)
00045 {
00046     if (vd->prepare )
00047         vd->prepare(vd, picture, subpicture);
00048 }
00049 
00050 /**
00051  * It display a picture.
00052  */
00053 static inline void vout_display_Display(vout_display_t *vd,
00054                                         picture_t *picture,
00055                                         subpicture_t *subpicture)
00056 {
00057     vd->display(vd, picture, subpicture);
00058 }
00059 
00060 /**
00061  * It holds a state for a vout display.
00062  */
00063 typedef struct {
00064     vout_display_cfg_t cfg;
00065     unsigned wm_state;
00066     struct {
00067         int num;
00068         int den;
00069     } sar;
00070 } vout_display_state_t;
00071 
00072 /**
00073  * It creates a vout managed display.
00074  */
00075 VLC_API vout_display_t * vout_NewDisplay( vout_thread_t *, const video_format_t *, const vout_display_state_t *, const char *psz_module, mtime_t i_double_click_timeout, mtime_t i_hide_timeout );
00076 /**
00077  * It destroy a vout managed display.
00078  */
00079 VLC_API void vout_DeleteDisplay(vout_display_t *, vout_display_state_t *);
00080 
00081 VLC_API bool vout_IsDisplayFiltered(vout_display_t *);
00082 VLC_API picture_t * vout_FilterDisplay(vout_display_t *, picture_t *);
00083 VLC_API bool vout_AreDisplayPicturesInvalid(vout_display_t *);
00084 
00085 VLC_API void vout_ManageDisplay(vout_display_t *, bool allow_reset_pictures);
00086 
00087 VLC_API void vout_SetDisplayFullscreen(vout_display_t *, bool is_fullscreen);
00088 VLC_API void vout_SetDisplayFilled(vout_display_t *, bool is_filled);
00089 VLC_API void vout_SetDisplayZoom(vout_display_t *, int num, int den);
00090 VLC_API void vout_SetWindowState(vout_display_t *, unsigned state);
00091 VLC_API void vout_SetDisplayAspect(vout_display_t *, unsigned dar_num, unsigned dar_den);
00092 VLC_API void vout_SetDisplayCrop(vout_display_t *, unsigned crop_num, unsigned crop_den, unsigned left, unsigned top, int right, int bottom);
00093 
00094 struct vlc_gl_t;
00095 VLC_API struct vlc_gl_t * vout_GetDisplayOpengl(vout_display_t *);
00096 
00097 #endif /* VLC_VOUT_WRAPPER_H */
00098 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines