VLC 4.0.0-dev
Loading...
Searching...
No Matches
vlc_vout.h
Go to the documentation of this file.
1/*****************************************************************************
2 * vlc_vout.h: common video definitions
3 *****************************************************************************
4 * Copyright (C) 1999 - 2008 VLC authors and VideoLAN
5 *
6 * Authors: Vincent Seguin <seguin@via.ecp.fr>
7 * Samuel Hocevar <sam@via.ecp.fr>
8 * Olivier Aubert <oaubert 47 videolan d07 org>
9 *
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.
14 *
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.
19 *
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 *****************************************************************************/
24
25#ifndef VLC_VOUT_H_
26#define VLC_VOUT_H_ 1
27
28#include <vlc_es.h>
29#include <vlc_picture.h>
30
31/**
32 * \defgroup output Output
33 * \ingroup vlc
34 * \defgroup video_output Video output
35 * \ingroup output
36 * Video rendering, output and window management
37 *
38 * This module describes the programming interface for video output threads.
39 * It includes functions allowing to open a new thread, send pictures to a
40 * thread, and destroy a previously opened video output thread.
41 * @{
42 * \file
43 * Video output thread interface
44 */
45
46/**
47 * Video output thread descriptor
48 *
49 * Any independent video output device, such as an X11 window or a GGI device,
50 * is represented by a video output thread, and described using the following
51 * structure.
52 */
53struct vout_thread_t {
55};
56
57/* Alignment flags */
58#define VOUT_ALIGN_LEFT 0x0001
59#define VOUT_ALIGN_RIGHT 0x0002
60#define VOUT_ALIGN_HMASK 0x0003
61#define VOUT_ALIGN_TOP 0x0004
62#define VOUT_ALIGN_BOTTOM 0x0008
63#define VOUT_ALIGN_VMASK 0x000C
65/**
66 * vout or spu_channel order
67 */
71 /**
72 * There is only one primary vout/spu_channel
73 * For vouts: this is the first vout, probably embedded in the UI.
74 * For spu channels: main and first SPU channel.
75 */
77 /**
78 * There can be several secondary vouts or spu_channels
79 * For vouts: a secondary vout using its own window.
80 * For spu channels: a secondary spu channel that is placed in function of
81 * the primary one. See "secondary-sub-margin" and
82 * "secondary-sub-alignment".
83 */
85};
86
87/**
88 * Stereoscopic display mode.
89 */
90typedef enum vlc_stereoscopic_mode_t
99/*****************************************************************************
100 * Prototypes
101 *****************************************************************************/
102
103/**
104 * Destroys a vout.
105 *
106 * This function closes and releases a vout created by vout_Create().
107 *
108 * \param vout the vout to close
109 */
111
112/**
113 * This function will handle a snapshot request.
114 *
115 * pp_image, pp_picture and p_fmt can be NULL otherwise they will be
116 * set with returned value in case of success.
117 *
118 * pp_image will hold an encoded picture in psz_format format.
119 *
120 * p_fmt can be NULL otherwise it will be set with the format used for the
121 * picture before encoding.
122 *
123 * i_timeout specifies the time the function will wait for a snapshot to be
124 * available.
125 *
126 */
128 block_t **pp_image, picture_t **pp_picture,
129 video_format_t *p_fmt,
130 const char *psz_format, vlc_tick_t i_timeout );
131
132/* */
134
135/* Subpictures channels ID */
136#define VOUT_SPU_CHANNEL_INVALID (-1) /* Always fails in comparison */
137#define VOUT_SPU_CHANNEL_OSD 0 /* OSD channel is automatically cleared */
138#define VOUT_SPU_CHANNEL_OSD_HSLIDER 1
139#define VOUT_SPU_CHANNEL_OSD_VSLIDER 2
140#define VOUT_SPU_CHANNEL_OSD_COUNT 3
142/* */
147/**
148 * This function will ensure that all ready/displayed pictures have at most
149 * the provided date.
150 */
151VLC_API void vout_Flush( vout_thread_t *p_vout, vlc_tick_t i_date );
152
153/**
154 * Empty all the pending pictures in the vout
155 */
156#define vout_FlushAll( vout ) vout_Flush( vout, VLC_TICK_INVALID )
158/**@}*/
159
160#endif /* _VLC_VOUT_H */
#define VLC_API
Definition fourcc_gen.c:31
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, vlc_tick_t i_timeout)
This function will handle a snapshot request.
Definition video_output.c:409
vlc_stereoscopic_mode_t
Stereoscopic display mode.
Definition vlc_vout.h:92
void vout_PutSubpicture(vout_thread_t *, subpicture_t *)
Definition video_output.c:331
void vout_Flush(vout_thread_t *p_vout, vlc_tick_t i_date)
This function will ensure that all ready/displayed pictures have at most the provided date.
Definition video_output.c:1739
ssize_t vout_RegisterSubpictureChannel(vout_thread_t *)
Definition video_output.c:342
vlc_vout_order
vout or spu_channel order
Definition vlc_vout.h:70
void vout_UnregisterSubpictureChannel(vout_thread_t *, size_t)
Definition video_output.c:368
void vout_Close(vout_thread_t *vout)
Destroys a vout.
Definition video_output.c:2091
void vout_FlushSubpictureChannel(vout_thread_t *, size_t)
Definition video_output.c:376
void vout_PutPicture(vout_thread_t *, picture_t *)
It gives to the vout a picture to be displayed.
Definition video_output.c:399
@ VIDEO_STEREO_OUTPUT_AUTO
Definition vlc_vout.h:93
@ VIDEO_STEREO_OUTPUT_RIGHT_ONLY
Definition vlc_vout.h:96
@ VIDEO_STEREO_OUTPUT_SIDE_BY_SIDE
Definition vlc_vout.h:97
@ VIDEO_STEREO_OUTPUT_LEFT_ONLY
Definition vlc_vout.h:95
@ VIDEO_STEREO_OUTPUT_STEREO
Definition vlc_vout.h:94
@ VLC_VOUT_ORDER_SECONDARY
There can be several secondary vouts or spu_channels For vouts: a secondary vout using its own window...
Definition vlc_vout.h:85
@ VLC_VOUT_ORDER_PRIMARY
There is only one primary vout/spu_channel For vouts: this is the first vout, probably embedded in th...
Definition vlc_vout.h:77
@ VLC_VOUT_ORDER_NONE
Definition vlc_vout.h:71
Video picture.
Definition vlc_picture.h:130
Video subtitle.
Definition vlc_subpicture.h:245
video format description
Definition vlc_es.h:356
Definition vlc_frame.h:123
VLC object common members.
Definition vlc_objects.h:53
Video output thread descriptor.
Definition vlc_vout.h:54
struct vlc_object_t obj
Definition vlc_vout.h:55
This file is a collection of common definitions and types.
This file defines the elementary streams format types.
This file defines picture structures and functions in vlc.
int64_t vlc_tick_t
High precision date or time interval.
Definition vlc_tick.h:48