vlc_vout.h 3.96 KB
Newer Older
1
/*****************************************************************************
Pere Orga's avatar
Pere Orga committed
2
 * vlc_vout.h: common video definitions
3
 *****************************************************************************
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
4
 * Copyright (C) 1999 - 2008 VLC authors and VideoLAN
5
 * $Id$
6
 *
7
 * Authors: Vincent Seguin <seguin@via.ecp.fr>
8 9
 *          Samuel Hocevar <sam@via.ecp.fr>
 *          Olivier Aubert <oaubert 47 videolan d07 org>
10
 *
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
11 12 13
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 2.1 of the License, or
14
 * (at your option) any later version.
15
 *
16 17
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
18 19
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License for more details.
20
 *
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
21 22 23
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
24
 *****************************************************************************/
25

26 27
#ifndef VLC_VOUT_H_
#define VLC_VOUT_H_ 1
28

29
#include <vlc_es.h>
30 31
#include <vlc_picture.h>
#include <vlc_subpicture.h>
32

33
/**
34
 * \defgroup output Output
35
 * \ingroup vlc
36
 * \defgroup video_output Video output
37
 * \ingroup output
38 39
 * Video rendering, output and window management
 *
40 41 42 43
 * This module describes the programming interface for video output threads.
 * It includes functions allowing to open a new thread, send pictures to a
 * thread, and destroy a previously opened video output thread.
 * @{
44 45
 * \file
 * Video output thread interface
46 47
 */

48
/**
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
49
 * Video output thread private structure
50 51 52
 */
typedef struct vout_thread_sys_t vout_thread_sys_t;

53
/**
54
 * Video output thread descriptor
55
 *
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
56
 * Any independent video output device, such as an X11 window or a GGI device,
57 58
 * is represented by a video output thread, and described using the following
 * structure.
59
 */
60
struct vout_thread_t {
61
    struct vlc_common_members obj;
62

63 64
    /* Private vout_thread data */
    vout_thread_sys_t *p;
65 66 67 68 69 70 71 72 73 74 75 76 77
};

/* Alignment flags */
#define VOUT_ALIGN_LEFT         0x0001
#define VOUT_ALIGN_RIGHT        0x0002
#define VOUT_ALIGN_HMASK        0x0003
#define VOUT_ALIGN_TOP          0x0004
#define VOUT_ALIGN_BOTTOM       0x0008
#define VOUT_ALIGN_VMASK        0x000C

/*****************************************************************************
 * Prototypes
 *****************************************************************************/
78

79 80 81 82 83 84 85 86
/**
 * This function will handle a snapshot request.
 *
 * pp_image, pp_picture and p_fmt can be NULL otherwise they will be
 * set with returned value in case of success.
 *
 * pp_image will hold an encoded picture in psz_format format.
 *
87 88 89
 * p_fmt can be NULL otherwise it will be set with the format used for the
 * picture before encoding.
 *
90 91 92 93
 * i_timeout specifies the time the function will wait for a snapshot to be
 * available.
 *
 */
94 95 96 97
VLC_API int vout_GetSnapshot( vout_thread_t *p_vout,
                              block_t **pp_image, picture_t **pp_picture,
                              video_format_t *p_fmt,
                              const char *psz_format, mtime_t i_timeout );
98

99 100 101
VLC_API void vout_ChangeAspectRatio( vout_thread_t *p_vout,
                                     unsigned int i_num, unsigned int i_den );

102
/* */
103 104
VLC_API picture_t * vout_GetPicture( vout_thread_t * );
VLC_API void vout_PutPicture( vout_thread_t *, picture_t * );
105

106 107 108 109
/* Subpictures channels ID */
#define VOUT_SPU_CHANNEL_OSD            1 /* OSD channel is automatically cleared */
#define VOUT_SPU_CHANNEL_AVAIL_FIRST    8 /* Registerable channels from this offset */

110
/* */
111 112 113
VLC_API void vout_PutSubpicture( vout_thread_t *, subpicture_t * );
VLC_API int vout_RegisterSubpictureChannel( vout_thread_t * );
VLC_API void vout_FlushSubpictureChannel( vout_thread_t *, int );
114

115
/**@}*/
116

117
#endif /* _VLC_VOUT_H */