11
11
#define CCX_DECODER_608_SCREEN_ROWS 15
12
12
#define CCX_DECODER_608_SCREEN_WIDTH 32
13
13
#define MAXBFRAMES 50
14
- #define SORTBUF (2 * MAXBFRAMES + 1)
14
+ #define SORTBUF (2*MAXBFRAMES+1)
15
+
15
16
16
17
/* flag raised when end of display marker arrives in Dvb Subtitle */
17
- #define SUB_EOD_MARKER (1 << 0)
18
+ #define SUB_EOD_MARKER (1 << 0 )
18
19
struct cc_bitmap
19
20
{
20
21
int x ;
@@ -76,22 +77,22 @@ enum ccx_decoder_608_color_code
76
77
};
77
78
78
79
/**
79
- * This structure have fields which need to be ignored according to format,
80
- * for example if format is SFORMAT_XDS then all fields other then
81
- * xds related (xds_str, xds_len and cur_xds_packet_class) should be
82
- * ignored and not to be dereferenced.
83
- *
84
- * TODO use union inside struct for each kind of fields
85
- */
80
+ * This structure have fields which need to be ignored according to format,
81
+ * for example if format is SFORMAT_XDS then all fields other then
82
+ * xds related (xds_str, xds_len and cur_xds_packet_class) should be
83
+ * ignored and not to be dereferenced.
84
+ *
85
+ * TODO use union inside struct for each kind of fields
86
+ */
86
87
struct eia608_screen // A CC buffer
87
88
{
88
89
/** format of data inside this structure */
89
90
enum ccx_eia608_format format ;
90
91
unsigned char characters [CCX_DECODER_608_SCREEN_ROWS ][CCX_DECODER_608_SCREEN_WIDTH + 1 ];
91
92
enum ccx_decoder_608_color_code colors [CCX_DECODER_608_SCREEN_ROWS ][CCX_DECODER_608_SCREEN_WIDTH + 1 ];
92
93
enum font_bits fonts [CCX_DECODER_608_SCREEN_ROWS ][CCX_DECODER_608_SCREEN_WIDTH + 1 ]; // Extra char at the end for a 0
93
- int row_used [CCX_DECODER_608_SCREEN_ROWS ]; // Any data in row?
94
- int empty ; // Buffer completely empty?
94
+ int row_used [CCX_DECODER_608_SCREEN_ROWS ]; // Any data in row?
95
+ int empty ; // Buffer completely empty?
95
96
/** start time of this CC buffer */
96
97
LLONG start_time ;
97
98
/** end time of this CC buffer */
@@ -109,20 +110,20 @@ struct eia608_screen // A CC buffer
109
110
110
111
struct ccx_decoders_common_settings_t
111
112
{
112
- LLONG subs_delay ; // ms to delay (or advance) subs
113
- enum ccx_output_format output_format ; // What kind of output format should be used?
114
- int fix_padding ; // Replace 0000 with 8080 in HDTV (needed for some cards)
113
+ LLONG subs_delay ; // ms to delay (or advance) subs
114
+ enum ccx_output_format output_format ; // What kind of output format should be used?
115
+ int fix_padding ; // Replace 0000 with 8080 in HDTV (needed for some cards)
115
116
struct ccx_boundary_time extraction_start , extraction_end ; // Segment we actually process
116
117
int cc_to_stdout ;
117
- int extract ; // Extract 1st, 2nd or both fields
118
- int fullbin ; // Disable pruning of padding cc blocks
118
+ int extract ; // Extract 1st, 2nd or both fields
119
+ int fullbin ; // Disable pruning of padding cc blocks
119
120
int no_rollup ;
120
121
int noscte20 ;
121
- struct ccx_decoder_608_settings * settings_608 ; // Contains the settings for the 608 decoder.
122
- ccx_decoder_dtvcc_settings * settings_dtvcc ; // Same for cea 708 captions decoder (dtvcc)
123
- int cc_channel ; // Channel we want to dump in srt mode
122
+ struct ccx_decoder_608_settings * settings_608 ; // Contains the settings for the 608 decoder.
123
+ ccx_decoder_dtvcc_settings * settings_dtvcc ; // Same for cea 708 captions decoder (dtvcc)
124
+ int cc_channel ; // Channel we want to dump in srt mode
124
125
unsigned send_to_srv ;
125
- unsigned int hauppauge_mode ; // If 1, use PID=1003, process specially and so on
126
+ unsigned int hauppauge_mode ; // If 1, use PID=1003, process specially and so on
126
127
int program_number ;
127
128
enum ccx_code_type codec ;
128
129
int xds_write_to_file ;
@@ -141,17 +142,17 @@ struct lib_cc_decode
141
142
void * context_cc608_field_1 ;
142
143
void * context_cc608_field_2 ;
143
144
144
- int no_rollup ; // If 1, write one line at a time
145
+ int no_rollup ; // If 1, write one line at a time
145
146
int noscte20 ;
146
- int fix_padding ; // Replace 0000 with 8080 in HDTV (needed for some cards)
147
- enum ccx_output_format write_format ; // 0 = Raw, 1 = srt, 2 = SMI
147
+ int fix_padding ; // Replace 0000 with 8080 in HDTV (needed for some cards)
148
+ enum ccx_output_format write_format ; // 0 = Raw, 1 = srt, 2 = SMI
148
149
struct ccx_boundary_time extraction_start , extraction_end ; // Segment we actually process
149
- LLONG subs_delay ; // ms to delay (or advance) subs
150
- int extract ; // Extract 1st, 2nd or both fields
151
- int fullbin ; // Disable pruning of padding cc blocks
150
+ LLONG subs_delay ; // ms to delay (or advance) subs
151
+ int extract ; // Extract 1st, 2nd or both fields
152
+ int fullbin ; // Disable pruning of padding cc blocks
152
153
struct cc_subtitle dec_sub ;
153
154
enum ccx_bufferdata_type in_bufferdatatype ;
154
- unsigned int hauppauge_mode ; // If 1, use PID=1003, process specially and so on
155
+ unsigned int hauppauge_mode ; // If 1, use PID=1003, process specially and so on
155
156
156
157
int frames_since_last_gop ;
157
158
/* GOP-based timing */
@@ -184,7 +185,7 @@ struct lib_cc_decode
184
185
int in_pic_data ;
185
186
186
187
unsigned int current_progressive_sequence ;
187
- unsigned int current_pulldownfields ;
188
+ unsigned int current_pulldownfields ;
188
189
189
190
int temporal_reference ;
190
191
enum ccx_frame_type picture_coding_type ;
@@ -196,18 +197,18 @@ struct lib_cc_decode
196
197
/* Required in es_function.c and es_userdata.c */
197
198
unsigned top_field_first ; // Needs to be global
198
199
199
- /* Stats. Modified in es_userdata.c*/
200
- int stat_numuserheaders ;
201
- int stat_dvdccheaders ;
202
- int stat_scte20ccheaders ;
203
- int stat_replay5000headers ;
204
- int stat_replay4000headers ;
205
- int stat_dishheaders ;
206
- int stat_hdtv ;
207
- int stat_divicom ;
208
- int false_pict_header ;
209
-
210
- void * dtvcc_rust ;
200
+ /* Stats. Modified in es_userdata.c*/
201
+ int stat_numuserheaders ;
202
+ int stat_dvdccheaders ;
203
+ int stat_scte20ccheaders ;
204
+ int stat_replay5000headers ;
205
+ int stat_replay4000headers ;
206
+ int stat_dishheaders ;
207
+ int stat_hdtv ;
208
+ int stat_divicom ;
209
+ int false_pict_header ;
210
+
211
+ void * dtvcc_rust ;
211
212
dtvcc_ctx * dtvcc ;
212
213
int current_field ;
213
214
// Analyse/use the picture information
@@ -217,7 +218,7 @@ struct lib_cc_decode
217
218
// Store fts;
218
219
LLONG cc_fts [SORTBUF ];
219
220
// Store HD CC packets
220
- unsigned char cc_data_pkts [SORTBUF ][10 * 31 * 3 + 1 ]; // *10, because MP4 seems to have different limits
221
+ unsigned char cc_data_pkts [SORTBUF ][10 * 31 * 3 + 1 ]; // *10, because MP4 seems to have different limits
221
222
222
223
// The sequence number of the current anchor frame. All currently read
223
224
// B-Frames belong to this I- or P-frame.
@@ -227,7 +228,7 @@ struct lib_cc_decode
227
228
228
229
int (* writedata )(const unsigned char * data , int length , void * private_data , struct cc_subtitle * sub );
229
230
230
- // dvb subtitle related
231
+ //dvb subtitle related
231
232
int ocr_quantmode ;
232
233
struct lib_cc_decode * prev ;
233
234
};
0 commit comments