QVisu
Qt-based visualization for smart homes
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
vlc_subpicture.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * vlc_subpicture.h: subpicture definitions
3  *****************************************************************************
4  * Copyright (C) 1999 - 2009 VLC authors and VideoLAN
5  * $Id: 6bfede171002b78b80c7635e87fdd51ea7d15ea4 $
6  *
7  * Authors: Vincent Seguin <seguin@via.ecp.fr>
8  * Samuel Hocevar <sam@via.ecp.fr>
9  * Olivier Aubert <oaubert 47 videolan d07 org>
10  *
11  * This program is free software; you can redistribute it and/or modify it
12  * under the terms of the GNU Lesser General Public License as published by
13  * the Free Software Foundation; either version 2.1 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Lesser General Public License for more details.
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * along with this program; if not, write to the Free Software Foundation,
23  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
24  *****************************************************************************/
25 
26 #ifndef VLC_SUBPICTURE_H
27 #define VLC_SUBPICTURE_H 1
28 
34 #include <vlc_picture.h>
35 #include <vlc_text_style.h>
36 
49 
58 {
62  int i_x;
63  int i_y;
64  int i_align;
65  int i_alpha;
67  char *psz_text;
68  char *psz_html;
70  bool b_renderbg;
74 };
75 
76 /* Subpicture region position flags */
77 #define SUBPICTURE_ALIGN_LEFT 0x1
78 #define SUBPICTURE_ALIGN_RIGHT 0x2
79 #define SUBPICTURE_ALIGN_TOP 0x4
80 #define SUBPICTURE_ALIGN_BOTTOM 0x8
81 #define SUBPICTURE_ALIGN_LEAVETEXT 0x10
82 #define SUBPICTURE_ALIGN_MASK ( SUBPICTURE_ALIGN_LEFT|SUBPICTURE_ALIGN_RIGHT| \
83  SUBPICTURE_ALIGN_TOP |SUBPICTURE_ALIGN_BOTTOM| \
84  SUBPICTURE_ALIGN_LEAVETEXT )
85 
91 
98 VLC_API void subpicture_region_Delete( subpicture_region_t *p_region );
99 
106 VLC_API void subpicture_region_ChainDelete( subpicture_region_t *p_head );
107 
111 typedef struct subpicture_updater_sys_t subpicture_updater_sys_t;
112 typedef struct
113 {
114  int (*pf_validate)( subpicture_t *,
115  bool has_src_changed, const video_format_t *p_fmt_src,
116  bool has_dst_changed, const video_format_t *p_fmt_dst,
117  mtime_t);
118  void (*pf_update) ( subpicture_t *,
119  const video_format_t *p_fmt_src,
120  const video_format_t *p_fmt_dst,
121  mtime_t );
122  void (*pf_destroy) ( subpicture_t * );
123  subpicture_updater_sys_t *p_sys;
125 
126 typedef struct subpicture_private_t subpicture_private_t;
127 
137 {
140  int i_channel;
146  int64_t i_order;
156  bool b_ephemer;
158  bool b_fade;
166  bool b_subtitle;
167  bool b_absolute;
170  int i_alpha;
173  subpicture_updater_t updater;
174 
175  subpicture_private_t *p_private; /* Reserved to the core */
176 };
177 
184 
189 VLC_API void subpicture_Delete( subpicture_t *p_subpic );
190 
199 
204 VLC_API void subpicture_Update( subpicture_t *, const video_format_t *src, const video_format_t *, mtime_t );
205 
208 #endif /* _VLC_VIDEO_H */
bool b_fade
Definition: vlc_subpicture.h:158
int i_alpha
Definition: vlc_subpicture.h:65
Definition: vlc_picture.h:69
video_format_t fmt
Definition: vlc_subpicture.h:59
Definition: vlc_subpicture.h:57
VLC_API void subpicture_Update(subpicture_t *, const video_format_t *src, const video_format_t *, mtime_t)
subpicture_region_t * p_next
Definition: vlc_subpicture.h:72
picture_t * p_picture
Definition: vlc_subpicture.h:60
text_style_t * p_style
Definition: vlc_subpicture.h:69
VLC_API subpicture_t * subpicture_New(const subpicture_updater_t *)
Definition: vlc_subpicture.h:136
char * psz_html
Definition: vlc_subpicture.h:68
bool b_subtitle
Definition: vlc_subpicture.h:166
bool b_ephemer
Definition: vlc_subpicture.h:156
int i_y
Definition: vlc_subpicture.h:63
bool b_absolute
Definition: vlc_subpicture.h:167
int i_original_picture_width
Definition: vlc_subpicture.h:168
mtime_t i_stop
Definition: vlc_subpicture.h:155
VLC_API void subpicture_Delete(subpicture_t *p_subpic)
subpicture_t * p_next
Definition: vlc_subpicture.h:147
mtime_t i_start
Definition: vlc_subpicture.h:154
bool b_renderbg
Definition: vlc_subpicture.h:70
VLC_API void subpicture_region_Delete(subpicture_region_t *p_region)
char * psz_text
Definition: vlc_subpicture.h:67
Definition: vlc_es.h:180
struct subpicture_region_private_t subpicture_region_private_t
Definition: vlc_subpicture.h:48
int i_original_picture_height
Definition: vlc_subpicture.h:169
Definition: vlc_text_style.h:39
subpicture_region_t * p_region
Definition: vlc_subpicture.h:150
subpicture_region_private_t * p_private
Definition: vlc_subpicture.h:73
int64_t mtime_t
Definition: vlc_common.h:153
uint32_t vlc_fourcc_t
Definition: vlc_common.h:160
VLC_API subpicture_t * subpicture_NewFromPicture(vlc_object_t *, picture_t *, vlc_fourcc_t i_chroma)
Definition: vlc_subpicture.h:112
VLC_API subpicture_region_t * subpicture_region_New(const video_format_t *p_fmt)
int i_align
Definition: vlc_subpicture.h:64
int i_alpha
Definition: vlc_subpicture.h:170
Definition: vlc_objects.h:42
int i_channel
Definition: vlc_subpicture.h:140
VLC_API void subpicture_region_ChainDelete(subpicture_region_t *p_head)
int i_x
Definition: vlc_subpicture.h:62