vout_internal.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * vout_internal.h : Internal vout definitions
00003  *****************************************************************************
00004  * Copyright (C) 2008 VLC authors and VideoLAN
00005  * Copyright (C) 2008 Laurent Aimar
00006  * $Id: 1f7184590c557d57d187dfe6767ab5f846d62017 $
00007  *
00008  * Authors: Laurent Aimar < fenrir _AT_ videolan _DOT_ org >
00009  *
00010  * This program is free software; you can redistribute it and/or modify it
00011  * under the terms of the GNU Lesser General Public License as published by
00012  * the Free Software Foundation; either version 2.1 of the License, or
00013  * (at your option) any later version.
00014  *
00015  * This program is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00018  * GNU Lesser General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU Lesser General Public License
00021  * along with this program; if not, write to the Free Software Foundation,
00022  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
00023  *****************************************************************************/
00024 
00025 #ifndef LIBVLC_VOUT_INTERNAL_H
00026 #define LIBVLC_VOUT_INTERNAL_H 1
00027 
00028 #include <vlc_picture_fifo.h>
00029 #include <vlc_picture_pool.h>
00030 #include <vlc_vout_display.h>
00031 #include <vlc_vout_wrapper.h>
00032 #include "vout_control.h"
00033 #include "control.h"
00034 #include "snapshot.h"
00035 #include "statistic.h"
00036 #include "chrono.h"
00037 
00038 /* It should be high enough to absorbe jitter due to difficult picture(s)
00039  * to decode but not too high as memory is not that cheap.
00040  *
00041  * It can be made lower at compilation time if needed, but performance
00042  * may be degraded.
00043  */
00044 #define VOUT_MAX_PICTURES (20)
00045 
00046 /* */
00047 struct vout_thread_sys_t
00048 {
00049     /* Splitter module if used */
00050     char            *splitter_name;
00051 
00052     /* Input thread for dvd menu interactions */
00053     vlc_object_t    *input;
00054 
00055     /* */
00056     video_format_t  original;   /* Original format ie coming from the decoder */
00057     unsigned        dpb_size;
00058 
00059     /* Snapshot interface */
00060     vout_snapshot_t snapshot;
00061 
00062     /* Statistics */
00063     vout_statistic_t statistic;
00064 
00065     /* Subpicture unit */
00066     vlc_mutex_t     spu_lock;
00067     spu_t           *spu;
00068     vlc_fourcc_t    spu_blend_chroma;
00069     filter_t        *spu_blend;
00070 
00071     /* Video output window */
00072     struct {
00073         bool              is_unused;
00074         vout_window_cfg_t cfg;
00075         vout_window_t     *object;
00076     } window;
00077 
00078     /* Thread & synchronization */
00079     vlc_thread_t    thread;
00080     bool            dead;
00081     vout_control_t  control;
00082 
00083     /* */
00084     struct {
00085         char           *title;
00086         vout_display_t *vd;
00087         bool           use_dr;
00088         picture_t      *filtered;
00089     } display;
00090 
00091     struct {
00092         mtime_t     date;
00093         mtime_t     timestamp;
00094         int         qtype;
00095         bool        is_interlaced;
00096         picture_t   *decoded;
00097         picture_t   *current;
00098         picture_t   *next;
00099     } displayed;
00100 
00101     struct {
00102         mtime_t     last;
00103         mtime_t     timestamp;
00104     } step;
00105 
00106     struct {
00107         bool        is_on;
00108         mtime_t     date;
00109     } pause;
00110 
00111     /* OSD title configuration */
00112     struct {
00113         bool        show;
00114         mtime_t     timeout;
00115         int         position;
00116     } title;
00117 
00118     /* */
00119     bool            is_late_dropped;
00120 
00121     /* Video filter2 chain */
00122     struct {
00123         vlc_mutex_t     lock;
00124         char            *configuration;
00125         video_format_t  format;
00126         filter_chain_t  *chain_static;
00127         filter_chain_t  *chain_interactive;
00128     } filter;
00129 
00130     /* */
00131     vlc_mouse_t     mouse;
00132 
00133     /* */
00134     vlc_mutex_t     picture_lock;                 /**< picture heap lock */
00135     picture_pool_t  *private_pool;
00136     picture_pool_t  *display_pool;
00137     picture_pool_t  *decoder_pool;
00138     picture_fifo_t  *decoder_fifo;
00139     vout_chrono_t   render;           /**< picture render time estimator */
00140 };
00141 
00142 /* TODO to move them to vlc_vout.h */
00143 void vout_ControlChangeFullscreen(vout_thread_t *, bool fullscreen);
00144 void vout_ControlChangeOnTop(vout_thread_t *, bool is_on_top);
00145 void vout_ControlChangeDisplayFilled(vout_thread_t *, bool is_filled);
00146 void vout_ControlChangeZoom(vout_thread_t *, int num, int den);
00147 void vout_ControlChangeSampleAspectRatio(vout_thread_t *, unsigned num, unsigned den);
00148 void vout_ControlChangeCropRatio(vout_thread_t *, unsigned num, unsigned den);
00149 void vout_ControlChangeCropWindow(vout_thread_t *, int x, int y, int width, int height);
00150 void vout_ControlChangeCropBorder(vout_thread_t *, int left, int top, int right, int bottom);
00151 void vout_ControlChangeFilters(vout_thread_t *, const char *);
00152 void vout_ControlChangeSubSources(vout_thread_t *, const char *);
00153 void vout_ControlChangeSubFilters(vout_thread_t *, const char *);
00154 void vout_ControlChangeSubMargin(vout_thread_t *, int);
00155 
00156 /* */
00157 void vout_IntfInit( vout_thread_t * );
00158 
00159 /* */
00160 int  vout_OpenWrapper (vout_thread_t *, const char *, const vout_display_state_t *);
00161 void vout_CloseWrapper(vout_thread_t *, vout_display_state_t *);
00162 int  vout_InitWrapper(vout_thread_t *);
00163 void vout_EndWrapper(vout_thread_t *);
00164 void vout_ManageWrapper(vout_thread_t *);
00165 
00166 /* */
00167 int spu_ProcessMouse(spu_t *, const vlc_mouse_t *, const video_format_t *);
00168 void spu_Attach( spu_t *, vlc_object_t *input, bool );
00169 void spu_ChangeMargin(spu_t *, int);
00170 
00171 #endif
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines