oldrc: the value read from atoi is in seconds not mtime_t
[vlc.git] / include / vlc_vout.h
blob89d9821438975023b521270cb0cbde9ddd7a3bcd
1 /*****************************************************************************
2 * vlc_vout.h: common video definitions
3 *****************************************************************************
4 * Copyright (C) 1999 - 2008 VLC authors and VideoLAN
5 * $Id$
7 * Authors: Vincent Seguin <seguin@via.ecp.fr>
8 * Samuel Hocevar <sam@via.ecp.fr>
9 * Olivier Aubert <oaubert 47 videolan d07 org>
11 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU Lesser General Public License as published by
13 * the Free Software Foundation; either version 2.1 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License for more details.
21 * You should have received a copy of the GNU Lesser General Public License
22 * along with this program; if not, write to the Free Software Foundation,
23 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
24 *****************************************************************************/
26 #ifndef VLC_VOUT_H_
27 #define VLC_VOUT_H_ 1
29 #include <vlc_es.h>
30 #include <vlc_picture.h>
31 #include <vlc_subpicture.h>
33 /**
34 * \defgroup output Output
35 * \ingroup vlc
36 * \defgroup video_output Video output
37 * \ingroup output
38 * Video rendering, output and window management
40 * This module describes the programming interface for video output threads.
41 * It includes functions allowing to open a new thread, send pictures to a
42 * thread, and destroy a previously opened video output thread.
43 * @{
44 * \file
45 * Video output thread interface
48 /**
49 * Video output thread private structure
51 typedef struct vout_thread_sys_t vout_thread_sys_t;
53 /**
54 * Video output thread descriptor
56 * Any independent video output device, such as an X11 window or a GGI device,
57 * is represented by a video output thread, and described using the following
58 * structure.
60 struct vout_thread_t {
61 struct vlc_common_members obj;
63 /* Private vout_thread data */
64 vout_thread_sys_t *p;
67 /* Alignment flags */
68 #define VOUT_ALIGN_LEFT 0x0001
69 #define VOUT_ALIGN_RIGHT 0x0002
70 #define VOUT_ALIGN_HMASK 0x0003
71 #define VOUT_ALIGN_TOP 0x0004
72 #define VOUT_ALIGN_BOTTOM 0x0008
73 #define VOUT_ALIGN_VMASK 0x000C
75 /*****************************************************************************
76 * Prototypes
77 *****************************************************************************/
79 /**
80 * This function will handle a snapshot request.
82 * pp_image, pp_picture and p_fmt can be NULL otherwise they will be
83 * set with returned value in case of success.
85 * pp_image will hold an encoded picture in psz_format format.
87 * p_fmt can be NULL otherwise it will be set with the format used for the
88 * picture before encoding.
90 * i_timeout specifies the time the function will wait for a snapshot to be
91 * available.
94 VLC_API int vout_GetSnapshot( vout_thread_t *p_vout,
95 block_t **pp_image, picture_t **pp_picture,
96 video_format_t *p_fmt,
97 const char *psz_format, mtime_t i_timeout );
99 VLC_API void vout_ChangeAspectRatio( vout_thread_t *p_vout,
100 unsigned int i_num, unsigned int i_den );
102 /* */
103 VLC_API picture_t * vout_GetPicture( vout_thread_t * );
104 VLC_API void vout_PutPicture( vout_thread_t *, picture_t * );
106 /* Subpictures channels ID */
107 #define VOUT_SPU_CHANNEL_OSD 1 /* OSD channel is automatically cleared */
108 #define VOUT_SPU_CHANNEL_AVAIL_FIRST 8 /* Registerable channels from this offset */
110 /* */
111 VLC_API void vout_PutSubpicture( vout_thread_t *, subpicture_t * );
112 VLC_API int vout_RegisterSubpictureChannel( vout_thread_t * );
113 VLC_API void vout_FlushSubpictureChannel( vout_thread_t *, int );
115 /**@}*/
117 #endif /* _VLC_VOUT_H */