VLC 4.0.0-dev
Loading...
Searching...
No Matches
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_common.h>
29#include <vlc_tick.h>
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
36
37/**
38 * \defgroup spu Sub-picture channels
39 * \ingroup video_output
40 * @{
41 * \file
42 */
43
44typedef struct spu_private_t spu_private_t;
46
47/**
48 * Subpicture unit descriptor
49 */
50struct spu_t
52 struct vlc_object_t obj;
55};
56
58#define spu_Create(a,b) spu_Create(VLC_OBJECT(a),b)
60
61/**
62 * This function sends a subpicture to the spu_t core.
63 *
64 * You cannot use the provided subpicture anymore. The spu_t core
65 * will destroy it at its convenience.
66 */
68
69/**
70 * This function will return an unique subpicture containing the OSD and
71 * subtitles visible at the requested date.
72 *
73 * \param spu the subpicture unit instance
74 * \param p_chroma_list is a list of supported chroma for the output (can be NULL)
75 * \param p_fmt_dst is the format of the picture on which the return subpicture will be rendered.
76 * \param p_fmt_src is the format of the original(source) video.
77 * \param video_position position of the video inside the display or NULL to fit in p_fmt_dst
78 * \param system_now the reference current time
79 * \param pts the timestamp of the rendered frame
80 * \param ignore_osd whether we display the OSD or not
81 *
82 * The returned value if non NULL must be released by subpicture_Delete().
83 */
84VLC_API struct vlc_render_subpicture * spu_Render( spu_t *spu, const vlc_fourcc_t *p_chroma_list,
85 const video_format_t *p_fmt_dst, const video_format_t *p_fmt_src,
86 bool spu_in_full_window,
87 const struct vout_display_place_t *video_position,
88 vlc_tick_t system_now, vlc_tick_t pts,
89 bool ignore_osd );
90
91/**
92 * It registers a new SPU channel.
93 */
95VLC_API void spu_UnregisterChannel( spu_t *, size_t );
96
97/**
98 * It clears all subpictures associated to a SPU channel.
99 */
100VLC_API void spu_ClearChannel( spu_t *, size_t );
101
102/**
103 * It changes the sub sources list
104 */
105VLC_API void spu_ChangeSources( spu_t *, const char * );
106
107/**
108 * It changes the sub filters list
109 */
110VLC_API void spu_ChangeFilters( spu_t *, const char * );
111
112/** @}*/
113
114#ifdef __cplusplus
115}
116#endif
117
118#endif /* VLC_SPU_H */
#define VLC_API
Definition fourcc_gen.c:31
uint32_t vlc_fourcc_t
Definition fourcc_gen.c:33
void spu_ClearChannel(spu_t *, size_t)
It clears all subpictures associated to a SPU channel.
Definition vout_subpictures.c:2351
void spu_UnregisterChannel(spu_t *, size_t)
Definition vout_subpictures.c:2367
void spu_ChangeFilters(spu_t *, const char *)
It changes the sub filters list.
Definition vout_subpictures.c:2398
void spu_PutSubpicture(spu_t *, subpicture_t *)
This function sends a subpicture to the spu_t core.
Definition vout_subpictures.c:2040
struct vlc_render_subpicture * spu_Render(spu_t *spu, const vlc_fourcc_t *p_chroma_list, const video_format_t *p_fmt_dst, const video_format_t *p_fmt_src, bool spu_in_full_window, const struct vout_display_place_t *video_position, vlc_tick_t system_now, vlc_tick_t pts, bool ignore_osd)
This function will return an unique subpicture containing the OSD and subtitles visible at the reques...
#define spu_Create(a, b)
Definition vlc_spu.h:59
void spu_ChangeSources(spu_t *, const char *)
It changes the sub sources list.
Definition vout_subpictures.c:2379
void spu_Destroy(spu_t *)
Destroy the subpicture unit.
Definition vout_subpictures.c:1858
ssize_t spu_RegisterChannel(spu_t *)
It registers a new SPU channel.
Definition vout_subpictures.c:2345
Definition vout_subpictures.c:87
Subpicture unit descriptor.
Definition vlc_spu.h:52
spu_private_t * p
Definition vlc_spu.h:55
struct vlc_object_t obj
Definition vlc_spu.h:53
Video subtitle.
Definition vlc_subpicture.h:234
video format description
Definition vlc_es.h:356
VLC object common members.
Definition vlc_objects.h:53
Definition vlc_subpicture.h:218
Video placement.
Definition vlc_vout_display.h:334
Video output thread descriptor.
Definition vlc_vout.h:54
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:48