VLC  4.0.0-dev
vlc_spu.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * vlc_spu.h: spu_t definition and functions.
3  *****************************************************************************
4  * Copyright (C) 1999-2010 VLC authors and VideoLAN
5  * Copyright (C) 2010 Laurent Aimar
6  *
7  * Authors: Gildas Bazin <gbazin@videolan.org>
8  * Laurent Aimar <fenrir _AT_ videolan _DOT_ 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_SPU_H
26 #define VLC_SPU_H 1
27 
28 #include <vlc_subpicture.h>
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 /**
35  * \defgroup spu Sub-picture channels
36  * \ingroup video_output
37  * @{
38  * \file
39  */
40 
41 typedef struct spu_private_t spu_private_t;
42 
43 /**
44  * Subpicture unit descriptor
45  */
46 struct spu_t
47 {
48  struct vlc_object_t obj;
49 
51 };
52 
54 #define spu_Create(a,b) spu_Create(VLC_OBJECT(a),b)
56 
57 /**
58  * This function sends a subpicture to the spu_t core.
59  *
60  * You cannot use the provided subpicture anymore. The spu_t core
61  * will destroy it at its convenience.
62  */
64 
65 /**
66  * This function will return an unique subpicture containing the OSD and
67  * subtitles visibles at the requested date.
68  *
69  * \param p_chroma_list is a list of supported chroma for the output (can be NULL)
70  * \param p_fmt_dst is the format of the picture on which the return subpicture will be rendered.
71  * \param p_fmt_src is the format of the original(source) video.
72  *
73  * The returned value if non NULL must be released by subpicture_Delete().
74  */
75 VLC_API subpicture_t * spu_Render( spu_t *, const vlc_fourcc_t *p_chroma_list,
76  const video_format_t *p_fmt_dst, const video_format_t *p_fmt_src,
77  vlc_tick_t system_now, vlc_tick_t pts,
78  bool ignore_osd, bool external_scale );
79 
80 /**
81  * It registers a new SPU channel.
82  */
83 VLC_API ssize_t spu_RegisterChannel( spu_t * );
84 VLC_API void spu_UnregisterChannel( spu_t *, size_t );
85 
86 /**
87  * It clears all subpictures associated to a SPU channel.
88  */
89 VLC_API void spu_ClearChannel( spu_t *, size_t );
90 
91 /**
92  * It changes the sub sources list
93  */
94 VLC_API void spu_ChangeSources( spu_t *, const char * );
95 
96 /**
97  * It changes the sub filters list
98  */
99 VLC_API void spu_ChangeFilters( spu_t *, const char * );
100 
101 /** @}*/
102 
103 #ifdef __cplusplus
104 }
105 #endif
106 
107 #endif /* VLC_SPU_H */
108 
Subpictures functions.
void spu_PutSubpicture(spu_t *, subpicture_t *)
This function sends a subpicture to the spu_t core.
Definition: vout_subpictures.c:1787
void spu_ChangeSources(spu_t *, const char *)
It changes the sub sources list.
Definition: vout_subpictures.c:2069
void spu_ChangeFilters(spu_t *, const char *)
It changes the sub filters list.
Definition: vout_subpictures.c:2088
ssize_t spu_RegisterChannel(spu_t *)
It registers a new SPU channel.
Definition: vout_subpictures.c:2028
Video subtitle.
Definition: vlc_subpicture.h:166
#define spu_Create(a, b)
Definition: vlc_spu.h:55
Definition: vout_subpictures.c:78
int64_t vlc_tick_t
High precision date or time interval.
Definition: vlc_tick.h:45
void spu_UnregisterChannel(spu_t *, size_t)
Definition: vout_subpictures.c:2058
uint32_t vlc_fourcc_t
Definition: fourcc_gen.c:33
Video output thread descriptor.
Definition: vlc_vout.h:60
video format description
Definition: vlc_es.h:349
subpicture_t * spu_Render(spu_t *, const vlc_fourcc_t *p_chroma_list, const video_format_t *p_fmt_dst, const video_format_t *p_fmt_src, vlc_tick_t system_now, vlc_tick_t pts, bool ignore_osd, bool external_scale)
This function will return an unique subpicture containing the OSD and subtitles visibles at the reque...
Definition: vout_subpictures.c:1890
#define VLC_API
Definition: fourcc_gen.c:31
Subpicture unit descriptor.
Definition: vlc_spu.h:47
spu_private_t * p
Definition: vlc_spu.h:51
void spu_ClearChannel(spu_t *, size_t)
It clears all subpictures associated to a SPU channel.
Definition: vout_subpictures.c:2044
VLC object common members.
Definition: vlc_objects.h:43
void spu_Destroy(spu_t *)
Destroy the subpicture unit.
Definition: vout_subpictures.c:1622