VLC 4.0.0-dev
vlc_vout_osd.h
Go to the documentation of this file.
1/*****************************************************************************
2 * vlc_vout_osd.h: vout OSD
3 *****************************************************************************
4 * Copyright (C) 1999-2010 VLC authors and VideoLAN
5 * Copyright (C) 2004-2005 M2X
6 *
7 * Authors: Jean-Paul Saman <jpsaman #_at_# m2x dot nl>
8 * Gildas Bazin <gbazin@videolan.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_OSD_H
26#define VLC_VOUT_OSD_H 1
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
32/**
33 * \defgroup osd On-screen display
34 * \ingroup spu
35 * @{
36 * \file
37 * Overlay text and widgets
38 */
39
40/**
41 * OSD menu position and picture type defines
42 */
43enum
44{
45 /* Icons */
46 OSD_PLAY_ICON = 1,
50 /* Sliders */
53};
54
55/**
56 * \brief Show EPG information about the current program of an input item
57 * \param vout pointer to the vout the information is to be showed on
58 * \param input pointer to the input item the information is to be showed
59 */
61
62/**
63 * \brief Write an informative message if the OSD option is enabled.
64 * \param vout The vout on which the message will be displayed
65 * \param channel Subpicture channel
66 * \param position Position of the text
67 * \param duration Duration of the text being displayed
68 * \param text Text to be displayed
69 */
70VLC_API void vout_OSDText( vout_thread_t *vout, int channel, int position, vlc_tick_t duration, const char *text );
71
72/**
73 * Write an informative message at the default location, for the default duration and only
74 * if the OSD option is enabled.
75 *
76 * \param vout The vout on which the message will be displayed
77 * \param channel Subpicture channel
78 * \param format printf style formatting
79 * \param args format argument list
80 *
81 * Provided for convenience.
82 */
83VLC_API void vout_OSDMessageVa(vout_thread_t *vout, int channel, const char *format, va_list args);
84
85static inline void
86vout_OSDMessage(vout_thread_t *vout, int channel, const char *format, ...)
88 va_list args;
89 va_start(args, format);
90 vout_OSDMessageVa(vout, channel, format, args);
91 va_end(args);
92}
93
94/**
95 * Display a slider on the video output.
96 * \param p_this The object that called the function.
97 * \param i_channel Subpicture channel
98 * \param i_position Current position in the slider
99 * \param i_type Types are: OSD_HOR_SLIDER and OSD_VERT_SLIDER.
100 */
101VLC_API void vout_OSDSlider( vout_thread_t *p_this, int i_channel,
102 int i_position, short i_type);
103
104/**
105 * Display an Icon on the video output.
106 * \param p_this The object that called the function.
107 * \param i_channel Subpicture channel
108 * \param i_type Types are: OSD_PLAY_ICON, OSD_PAUSE_ICON, OSD_SPEAKER_ICON, OSD_MUTE_ICON
109 */
110VLC_API void vout_OSDIcon( vout_thread_t *p_this, int i_channel,
111 short i_type);
112
113/** @} */
114#ifdef __cplusplus
115}
116#endif
117
118#endif /* VLC_VOUT_OSD_H */
#define VLC_API
Definition: fourcc_gen.c:31
void vout_OSDText(vout_thread_t *vout, int channel, int position, vlc_tick_t duration, const char *text)
Write an informative message if the OSD option is enabled.
Definition: video_text.c:106
static void vout_OSDMessage(vout_thread_t *vout, int channel, const char *format,...)
Definition: vlc_vout_osd.h:87
void vout_OSDSlider(vout_thread_t *p_this, int i_channel, int i_position, short i_type)
Display a slider on the video output.
Definition: video_widgets.c:333
int vout_OSDEpg(vout_thread_t *vout, input_item_t *input)
Show EPG information about the current program of an input item.
Definition: video_epg.c:546
void vout_OSDIcon(vout_thread_t *p_this, int i_channel, short i_type)
Display an Icon on the video output.
Definition: video_widgets.c:338
void vout_OSDMessageVa(vout_thread_t *vout, int channel, const char *format, va_list args)
Write an informative message at the default location, for the default duration and only if the OSD op...
Definition: video_text.c:142
@ OSD_PAUSE_ICON
Definition: vlc_vout_osd.h:48
@ OSD_MUTE_ICON
Definition: vlc_vout_osd.h:50
@ OSD_PLAY_ICON
Definition: vlc_vout_osd.h:47
@ OSD_SPEAKER_ICON
Definition: vlc_vout_osd.h:49
@ OSD_VERT_SLIDER
Definition: vlc_vout_osd.h:53
@ OSD_HOR_SLIDER
Definition: vlc_vout_osd.h:52
int i_type
Definition: httpd.c:1282
Describes an input and is used to spawn input_thread_t objects.
Definition: vlc_input_item.h:89
Video output thread descriptor.
Definition: vlc_vout.h:55
This file is a collection of common definitions and types.
int64_t vlc_tick_t
High precision date or time interval.
Definition: vlc_tick.h:45