@@ -4,14 +4,7 @@ use crate::decoder::xds::XdsContext;
4
4
const MAXBFRAMES : usize = 50 ;
5
5
const SORTBUF : usize = 2 * MAXBFRAMES + 1 ;
6
6
7
- // #define CCX_OK 0
8
- // #define CCX_FALSE 0
9
- // #define CCX_TRUE 1
10
- // #define CCX_EAGAIN -100
11
- // #define CCX_EOF -101
12
- // #define CCX_EINVAL -102
13
- // #define CCX_ENOSUPP -103
14
- // #define CCX_ENOMEM -104
7
+
15
8
16
9
pub const CCX_OK : i32 = 0 ;
17
10
pub const CCX_FALSE : i32 = 0 ;
@@ -135,3 +128,74 @@ pub struct LibCcDecode {
135
128
pub ocr_quantmode : i32 ,
136
129
pub prev : * mut LibCcDecode ,
137
130
}
131
+ impl Default for LibCcDecode {
132
+ fn default ( ) -> Self {
133
+ LibCcDecode {
134
+ cc_stats : [ 0 ; 4 ] ,
135
+ saw_caption_block : 0 ,
136
+ processed_enough : 0 ,
137
+ context_cc608_field_1 : std:: ptr:: null_mut ( ) ,
138
+ context_cc608_field_2 : std:: ptr:: null_mut ( ) ,
139
+ no_rollup : 0 ,
140
+ noscte20 : 0 ,
141
+ fix_padding : 0 ,
142
+ write_format : lib_ccxr:: common:: OutputFormat :: Raw ,
143
+ extraction_start : None ,
144
+ extraction_end : None ,
145
+ subs_delay : 0 ,
146
+ extract : 0 ,
147
+ fullbin : 0 ,
148
+ in_bufferdatatype : lib_ccxr:: common:: BufferdataType :: Unknown ,
149
+ hauppauge_mode : 0 ,
150
+ frames_since_last_gop : 0 ,
151
+ saw_gop_header : 0 ,
152
+ max_gop_length : 0 ,
153
+ last_gop_length : 0 ,
154
+ total_pulldownfields : 0 ,
155
+ total_pulldownframes : 0 ,
156
+ program_number : 0 ,
157
+ list : crate :: demuxer:: demuxer:: HList :: default ( ) ,
158
+ timing : std:: ptr:: null_mut ( ) ,
159
+ codec : lib_ccxr:: common:: Codec :: Dvb ,
160
+ has_ccdata_buffered : 0 ,
161
+ is_alloc : 0 ,
162
+ avc_ctx : std:: ptr:: null_mut ( ) ,
163
+ private_data : std:: ptr:: null_mut ( ) ,
164
+ current_hor_size : 0 ,
165
+ current_vert_size : 0 ,
166
+ current_aspect_ratio : 0 ,
167
+ current_frame_rate : 0 ,
168
+ no_bitstream_error : 0 ,
169
+ saw_seqgoppic : 0 ,
170
+ in_pic_data : 0 ,
171
+ current_progressive_sequence : 0 ,
172
+ current_pulldownfields : 0 ,
173
+ temporal_reference : 0 ,
174
+ picture_coding_type : lib_ccxr:: common:: FrameType :: ResetOrUnknown ,
175
+ num_key_frames : 0 ,
176
+ picture_structure : 0 ,
177
+ repeat_first_field : 0 ,
178
+ progressive_frame : 0 ,
179
+ pulldownfields : 0 ,
180
+ top_field_first : 0 ,
181
+ stat_numuserheaders : 0 ,
182
+ stat_dvdccheaders : 0 ,
183
+ stat_scte20ccheaders : 0 ,
184
+ stat_replay5000headers : 0 ,
185
+ stat_replay4000headers : 0 ,
186
+ stat_dishheaders : 0 ,
187
+ stat_hdtv : 0 ,
188
+ stat_divicom : 0 ,
189
+ false_pict_header : 0 ,
190
+ current_field : 0 ,
191
+ maxtref : 0 ,
192
+ cc_data_count : [ 0 ; SORTBUF ] ,
193
+ cc_fts : [ 0 ; SORTBUF ] ,
194
+ cc_data_pkts : [ [ 0 ; 10 * 31 * 3 + 1 ] ; SORTBUF ] ,
195
+ anchor_seq_number : 0 ,
196
+ xds_ctx : std:: ptr:: null_mut ( ) ,
197
+ ocr_quantmode : 0 ,
198
+ prev : std:: ptr:: null_mut ( ) ,
199
+ }
200
+ }
201
+ }
0 commit comments