hlsdemux: Enable support for external subtitles
[platform/upstream/gstreamer.git] / ext / closedcaption / io-sim.h
1 /*
2  *  libzvbi -- VBI device simulation
3  *
4  *  Copyright (C) 2004, 2007 Michael H. Schimek
5  *
6  *  This library is free software; you can redistribute it and/or
7  *  modify it under the terms of the GNU Library General Public
8  *  License as published by the Free Software Foundation; either
9  *  version 2 of the License, or (at your option) any later version.
10  *
11  *  This library is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  *  Library General Public License for more details.
15  *
16  *  You should have received a copy of the GNU Library General Public
17  *  License along with this library; if not, write to the 
18  *  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 
19  *  Boston, MA  02110-1301  USA.
20  */
21
22 /* $Id: io-sim.h,v 1.11 2013-08-28 14:45:23 mschimek Exp $ */
23
24 #ifndef __ZVBI_IO_SIM_H__
25 #define __ZVBI_IO_SIM_H__
26
27 #include "macros.h"
28 #include "sampling_par.h"
29
30 VBI_BEGIN_DECLS
31
32 /* Public */
33
34 /**
35  * @addtogroup Rawenc
36  * @{
37  */
38 extern vbi_bool
39 vbi_raw_video_image             (uint8_t *              raw,
40                                  unsigned long          raw_size,
41                                  const vbi_sampling_par *sp,
42                                  int                    blank_level,
43                                  int                    black_level,
44                                  int                    white_level,
45                                  unsigned int           pixel_mask,
46                                  vbi_bool               swap_fields,
47                                  const vbi_sliced *     sliced,
48                                  unsigned int           n_sliced_lines);
49 extern vbi_bool
50 vbi_raw_add_noise               (uint8_t *              raw,
51                                  const vbi_sampling_par *sp,
52                                  unsigned int           min_freq,
53                                  unsigned int           max_freq,
54                                  unsigned int           amplitude,
55                                  unsigned int           seed);
56 extern vbi_bool
57 vbi_raw_vbi_image               (uint8_t *              raw,
58                                  unsigned long          raw_size,
59                                  const vbi_sampling_par *sp,
60                                  int                    blank_level,
61                                  int                    white_level,
62                                  vbi_bool               swap_fields,
63                                  const vbi_sliced *     sliced,
64                                  unsigned int           n_sliced_lines);
65
66 #define _VBI_RAW_SWAP_FIELDS    (1 << 0)
67 #define _VBI_RAW_SHIFT_CC_CRI   (1 << 1)
68 #define _VBI_RAW_LOW_AMP_CC     (1 << 2)
69
70 /* NB. Currently this flag has no effect in _vbi_raw_*_image().
71    Call vbi_raw_add_noise() instead. */
72 #define _VBI_RAW_NOISE_2        (1 << 17)
73
74 extern vbi_bool
75 _vbi_raw_video_image            (uint8_t *              raw,
76                                  unsigned long          raw_size,
77                                  const vbi_sampling_par *sp,
78                                  int                    blank_level,
79                                  int                    black_level,
80                                  int                    white_level,
81                                  unsigned int           pixel_mask,
82                                  unsigned int           flags,
83                                  const vbi_sliced *     sliced,
84                                  unsigned int           n_sliced_lines);
85 extern vbi_bool
86 _vbi_raw_vbi_image              (uint8_t *              raw,
87                                  unsigned long          raw_size,
88                                  const vbi_sampling_par *sp,
89                                  int                    blank_level,
90                                  int                    white_level,
91                                  unsigned int           flags,
92                                  const vbi_sliced *     sliced,
93                                  unsigned int           n_sliced_lines);
94
95 VBI_END_DECLS
96
97 #endif /* __ZVBI_IO_SIM_H__ */
98
99 /*
100 Local variables:
101 c-set-style: K&R
102 c-basic-offset: 8
103 End:
104 */