display.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * display.h: "vout display" managment
00003  *****************************************************************************
00004  * Copyright (C) 2009 Laurent Aimar
00005  * $Id: 86746fd40987b8a8a659064332fc2b7b6b56ec3f $
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 #include <vlc_vout_wrapper.h>
00025 
00026 #if 0
00027 #include <vlc_vout_display.h>
00028 #include <vlc_filter.h>
00029 
00030 /**
00031  * It retreive a picture from the display
00032  */
00033 static inline picture_pool_t *vout_display_Pool(vout_display_t *vd, unsigned count)
00034 {
00035     return vd->pool(vd, count);
00036 }
00037 
00038 /**
00039  * It preparse a picture for display.
00040  */
00041 static inline void vout_display_Prepare(vout_display_t *vd, picture_t *picture)
00042 {
00043     if (vd->prepare )
00044         vd->prepare(vd, picture);
00045 }
00046 
00047 /**
00048  * It display a picture.
00049  */
00050 static inline void vout_display_Display(vout_display_t *vd, picture_t *picture)
00051 {
00052     vd->display(vd, picture);
00053 }
00054 
00055 /**
00056  * It holds a state for a vout display.
00057  */
00058 typedef struct {
00059     vout_display_cfg_t cfg;
00060 
00061     bool is_on_top;
00062     struct {
00063         int num;
00064         int den;
00065     } sar;
00066 } vout_display_state_t;
00067 
00068 /**
00069  * It creates a vout managed display.
00070  */
00071 vout_display_t *vout_NewDisplay( vout_thread_t *,
00072                                  const video_format_t *,
00073                                  const vout_display_state_t *,
00074                                  const char *psz_module,
00075                                  mtime_t i_double_click_timeout,
00076                                  mtime_t i_hide_timeout );
00077 /**
00078  * It creates a vout managed display wrapping a video splitter.
00079  */
00080 vout_display_t *vout_NewSplitter(vout_thread_t *,
00081                                  const video_format_t *source,
00082                                  const vout_display_state_t *state,
00083                                  const char *module,
00084                                  const char *splitter,
00085                                  mtime_t double_click_timeout,
00086                                  mtime_t hide_timeout );
00087 
00088 /**
00089  * It destroy a vout managed display.
00090  */
00091 void vout_DeleteDisplay(vout_display_t *, vout_display_state_t *);
00092 
00093 picture_t *vout_FilterDisplay(vout_display_t *, picture_t *);
00094 
00095 void vout_ManageDisplay(vout_display_t *, bool allow_reset_pictures);
00096 
00097 void vout_SetDisplayFullscreen(vout_display_t *, bool is_fullscreen);
00098 void vout_SetDisplayFilled(vout_display_t *, bool is_filled);
00099 void vout_SetDisplayZoom(vout_display_t *, int num, int den);
00100 void vout_SetWindowState(vout_display_t *, unsigned state);
00101 void vout_SetDisplayAspect(vout_display_t *, unsigned sar_num, unsigned sar_den);
00102 void vout_SetDisplayCrop(vout_display_t *,
00103                          unsigned crop_num, unsigned crop_den,
00104                          unsigned x, unsigned y, unsigned width, unsigned height);
00105 
00106 #endif
00107 
00108 vout_display_t *vout_NewSplitter(vout_thread_t *vout,
00109                                  const video_format_t *source,
00110                                  const vout_display_state_t *state,
00111                                  const char *module,
00112                                  const char *splitter_module,
00113                                  mtime_t double_click_timeout,
00114                                  mtime_t hide_timeout);
00115 
00116 /* FIXME should not be there */
00117 void vout_SendDisplayEventMouse(vout_thread_t *, const vlc_mouse_t *);
00118 vout_window_t *vout_NewDisplayWindow(vout_thread_t *, vout_display_t *, const vout_window_cfg_t *);
00119 void vout_DeleteDisplayWindow(vout_thread_t *, vout_display_t *, vout_window_t *);
00120 void vout_UpdateDisplaySourceProperties(vout_display_t *vd, const video_format_t *);
00121 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines