Coverage Report

Created: 2025-07-11 07:16

/src/vlc/include/vlc_vout_osd.h
Line
Count
Source (jump to first uncovered line)
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
#include <vlc_tick.h>
29
30
#ifdef __cplusplus
31
extern "C" {
32
#endif
33
34
/**
35
 * \defgroup osd On-screen display
36
 * \ingroup spu
37
 * @{
38
 * \file
39
 * Overlay text and widgets
40
 */
41
42
/**
43
 * OSD menu position and picture type defines
44
 */
45
enum
46
{
47
    /* Icons */
48
    OSD_PLAY_ICON = 1,
49
    OSD_PAUSE_ICON,
50
    OSD_SPEAKER_ICON,
51
    OSD_MUTE_ICON,
52
    /* Sliders */
53
    OSD_HOR_SLIDER,
54
    OSD_VERT_SLIDER,
55
};
56
57
/**
58
 * \brief Show EPG information about the current program of an input item
59
 * \param vout pointer to the vout the information is to be showed on
60
 * \param input pointer to the input item the information is to be showed
61
 */
62
VLC_API int vout_OSDEpg( vout_thread_t *vout, input_item_t *input);
63
64
/**
65
 * \brief Write an informative message if the OSD option is enabled.
66
 * \param vout The vout on which the message will be displayed
67
 * \param channel Subpicture channel
68
 * \param position Position of the text
69
 * \param duration Duration of the text being displayed
70
 * \param text Text to be displayed
71
 */
72
VLC_API void vout_OSDText( vout_thread_t *vout, int channel, int position, vlc_tick_t duration, const char *text );
73
74
/**
75
 * Write an informative message at the default location, for the default duration and only
76
 * if the OSD option is enabled.
77
 *
78
 * \param vout The vout on which the message will be displayed
79
 * \param channel Subpicture channel
80
 * \param format printf style formatting
81
 * \param args format argument list
82
 *
83
 * Provided for convenience.
84
 */
85
VLC_API void vout_OSDMessageVa(vout_thread_t *vout, int channel, const char *format, va_list args);
86
87
static inline void
88
vout_OSDMessage(vout_thread_t *vout, int channel, const char *format, ...)
89
0
{
90
0
    va_list args;
91
0
    va_start(args, format);
92
0
    vout_OSDMessageVa(vout, channel, format, args);
93
0
    va_end(args);
94
0
}
Unexecuted instantiation: player.c:vout_OSDMessage
Unexecuted instantiation: osd.c:vout_OSDMessage
Unexecuted instantiation: video_output.c:vout_OSDMessage
Unexecuted instantiation: video_text.c:vout_OSDMessage
Unexecuted instantiation: video_widgets.c:vout_OSDMessage
Unexecuted instantiation: vout_intf.c:vout_OSDMessage
95
96
/**
97
 * Display a slider on the video output.
98
 * \param p_this    The object that called the function.
99
 * \param i_channel Subpicture channel
100
 * \param i_position Current position in the slider
101
 * \param i_type    Types are: OSD_HOR_SLIDER and OSD_VERT_SLIDER.
102
 */
103
VLC_API void vout_OSDSlider( vout_thread_t *p_this, int i_channel,
104
                             int i_position, short i_type);
105
106
/**
107
 * Display an Icon on the video output.
108
 * \param p_this    The object that called the function.
109
 * \param i_channel Subpicture channel
110
 * \param i_type    Types are: OSD_PLAY_ICON, OSD_PAUSE_ICON, OSD_SPEAKER_ICON, OSD_MUTE_ICON
111
 */
112
VLC_API void vout_OSDIcon( vout_thread_t *p_this, int i_channel,
113
                           short i_type);
114
115
/** @} */
116
#ifdef __cplusplus
117
}
118
#endif
119
120
#endif /* VLC_VOUT_OSD_H */