playlist demuxer: remove tabs
[vlc.git] / include / vlc_vout.h
blobf2b0f24f50d37fbdecf4deb365dfc17ddc7a466f
1 /*****************************************************************************
2 * vlc_vout.h: common video definitions
3 *****************************************************************************
4 * Copyright (C) 1999 - 2008 VLC authors and VideoLAN
6 * Authors: Vincent Seguin <seguin@via.ecp.fr>
7 * Samuel Hocevar <sam@via.ecp.fr>
8 * Olivier Aubert <oaubert 47 videolan d07 org>
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU Lesser General Public License as published by
12 * the Free Software Foundation; either version 2.1 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with this program; if not, write to the Free Software Foundation,
22 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23 *****************************************************************************/
25 #ifndef VLC_VOUT_H_
26 #define VLC_VOUT_H_ 1
28 #include <vlc_es.h>
29 #include <vlc_picture.h>
30 #include <vlc_subpicture.h>
32 /**
33 * \defgroup output Output
34 * \ingroup vlc
35 * \defgroup video_output Video output
36 * \ingroup output
37 * Video rendering, output and window management
39 * This module describes the programming interface for video output threads.
40 * It includes functions allowing to open a new thread, send pictures to a
41 * thread, and destroy a previously opened video output thread.
42 * @{
43 * \file
44 * Video output thread interface
47 /**
48 * Video output thread private structure
50 typedef struct vout_thread_sys_t vout_thread_sys_t;
52 /**
53 * Video output thread descriptor
55 * Any independent video output device, such as an X11 window or a GGI device,
56 * is represented by a video output thread, and described using the following
57 * structure.
59 struct vout_thread_t {
60 struct vlc_common_members obj;
62 /* Private vout_thread data */
63 vout_thread_sys_t *p;
66 /* Alignment flags */
67 #define VOUT_ALIGN_LEFT 0x0001
68 #define VOUT_ALIGN_RIGHT 0x0002
69 #define VOUT_ALIGN_HMASK 0x0003
70 #define VOUT_ALIGN_TOP 0x0004
71 #define VOUT_ALIGN_BOTTOM 0x0008
72 #define VOUT_ALIGN_VMASK 0x000C
74 /*****************************************************************************
75 * Prototypes
76 *****************************************************************************/
78 /**
79 * Destroys a vout.
81 * This function closes and releases a vout created by vout_Request().
83 * \param vout the vout to close
85 VLC_API void vout_Close(vout_thread_t *vout);
87 /**
88 * This function will handle a snapshot request.
90 * pp_image, pp_picture and p_fmt can be NULL otherwise they will be
91 * set with returned value in case of success.
93 * pp_image will hold an encoded picture in psz_format format.
95 * p_fmt can be NULL otherwise it will be set with the format used for the
96 * picture before encoding.
98 * i_timeout specifies the time the function will wait for a snapshot to be
99 * available.
102 VLC_API int vout_GetSnapshot( vout_thread_t *p_vout,
103 block_t **pp_image, picture_t **pp_picture,
104 video_format_t *p_fmt,
105 const char *psz_format, vlc_tick_t i_timeout );
107 /* */
108 VLC_API picture_t * vout_GetPicture( vout_thread_t * );
109 VLC_API void vout_PutPicture( vout_thread_t *, picture_t * );
111 /* Subpictures channels ID */
112 #define VOUT_SPU_CHANNEL_INVALID (-1) /* Always fails in comparison */
113 #define VOUT_SPU_CHANNEL_OSD 1 /* OSD channel is automatically cleared */
114 #define VOUT_SPU_CHANNEL_OSD_HSLIDER 2
115 #define VOUT_SPU_CHANNEL_OSD_VSLIDER 3
116 #define VOUT_SPU_CHANNEL_AVAIL_FIRST 8 /* Registerable channels from this offset */
118 /* */
119 VLC_API void vout_PutSubpicture( vout_thread_t *, subpicture_t * );
120 VLC_API int vout_RegisterSubpictureChannel( vout_thread_t * );
121 VLC_API void vout_FlushSubpictureChannel( vout_thread_t *, int );
123 /**@}*/
125 #endif /* _VLC_VOUT_H */