lib: media: fix libvlc_media_duplicate() behavior
[vlc.git] / include / vlc_spu.h
blobe4fb9a7ec18a1d617fbbb7483a51bfc0b189ce42
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
7 * Authors: Gildas Bazin <gbazin@videolan.org>
8 * Laurent Aimar <fenrir _AT_ videolan _DOT_ org>
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.
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.
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 *****************************************************************************/
25 #ifndef VLC_SPU_H
26 #define VLC_SPU_H 1
28 #include <vlc_subpicture.h>
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
34 /**
35 * \defgroup spu Sub-picture channels
36 * \ingroup video_output
37 * @{
38 * \file
41 typedef struct spu_private_t spu_private_t;
43 /**
44 * Subpicture unit descriptor
46 struct spu_t
48 struct vlc_object_t obj;
50 spu_private_t *p;
53 VLC_API spu_t * spu_Create( vlc_object_t *, vout_thread_t * );
54 #define spu_Create(a,b) spu_Create(VLC_OBJECT(a),b)
55 VLC_API void spu_Destroy( spu_t * );
57 /**
58 * This function sends a subpicture to the spu_t core.
60 * You cannot use the provided subpicture anymore. The spu_t core
61 * will destroy it at its convenience.
63 VLC_API void spu_PutSubpicture( spu_t *, subpicture_t * );
65 /**
66 * This function will return an unique subpicture containing the OSD and
67 * subtitles visibles at the requested date.
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.
73 * The returned value if non NULL must be released by subpicture_Delete().
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 );
80 /**
81 * It registers a new SPU channel.
83 VLC_API ssize_t spu_RegisterChannel( spu_t * );
84 VLC_API void spu_UnregisterChannel( spu_t *, size_t );
86 /**
87 * It clears all subpictures associated to a SPU channel.
89 VLC_API void spu_ClearChannel( spu_t *, size_t );
91 /**
92 * It changes the sub sources list
94 VLC_API void spu_ChangeSources( spu_t *, const char * );
96 /**
97 * It changes the sub filters list
99 VLC_API void spu_ChangeFilters( spu_t *, const char * );
101 /** @}*/
103 #ifdef __cplusplus
105 #endif
107 #endif /* VLC_SPU_H */