31
31
32
32
#include "../../libvlc/test.h"
33
33
34
- static void Parse (vlc_object_t * obj , void * priv , block_t * data )
34
+ static void Parse (vlc_object_t * obj , void * priv , block_t * data , stime_t t )
35
35
{
36
36
VLC_UNUSED (obj );
37
+ VLC_UNUSED (t );
37
38
block_t * * pp_append = (block_t * * ) priv ;
38
39
fprintf (stderr , "recv: " );
39
40
data = block_ChainGather (data );
@@ -95,7 +96,7 @@ int main()
95
96
0x00 , 0x00 , 0x01 , 0xe0 , 0x00 , 0x03 , 0x80 , 0x00 , 0x00 ,
96
97
};
97
98
PKT_FROM (aligned0 );
98
- ASSERT (ts_pes_Gather (& cb , & pes , pkt , true, true));
99
+ ASSERT (ts_pes_Gather (& cb , & pes , pkt , true, true, 0 ));
99
100
ASSERT (output );
100
101
block_ChainProperties (output , & outputcount , & outputsize , NULL );
101
102
ASSERT (outputcount == 1 );
@@ -104,13 +105,13 @@ int main()
104
105
RESET ;
105
106
/* no output if not unit start */
106
107
PKT_FROM (aligned0 );
107
- ASSERT (!ts_pes_Gather (& cb , & pes , pkt , false, true));
108
+ ASSERT (!ts_pes_Gather (& cb , & pes , pkt , false, true, 0 ));
108
109
ASSERT (!output );
109
110
RESET ;
110
111
/* no output if not unit start */
111
112
PKT_FROM (aligned0 );
112
113
pkt -> i_buffer = 1 ;
113
- ASSERT (!ts_pes_Gather (& cb , & pes , pkt , false, true));
114
+ ASSERT (!ts_pes_Gather (& cb , & pes , pkt , false, true, 0 ));
114
115
ASSERT (!output );
115
116
RESET ;
116
117
@@ -120,7 +121,7 @@ int main()
120
121
0xAA , 0xBB , 0xAA , 0xBB , 0xAA , 0xBB ,
121
122
};
122
123
PKT_FROM (aligned1 );
123
- ASSERT (ts_pes_Gather (& cb , & pes , pkt , true, true));
124
+ ASSERT (ts_pes_Gather (& cb , & pes , pkt , true, true, 0 ));
124
125
ASSERT (output );
125
126
block_ChainProperties (output , & outputcount , & outputsize , NULL );
126
127
ASSERT (outputcount == 1 );
@@ -129,25 +130,25 @@ int main()
129
130
RESET ;
130
131
/* no output if not unit start */
131
132
PKT_FROM (aligned1 );
132
- ASSERT (!ts_pes_Gather (& cb , & pes , pkt , false, true));
133
+ ASSERT (!ts_pes_Gather (& cb , & pes , pkt , false, true, 0 ));
133
134
ASSERT (!output );
134
135
RESET ;
135
136
136
137
/* payload == 30, uncomplete */
137
138
PKT_FROM (aligned1 );
138
139
SetWBE (& pkt -> p_buffer [4 ], 30 );
139
- ASSERT (!ts_pes_Gather (& cb , & pes , pkt , true, true));
140
+ ASSERT (!ts_pes_Gather (& cb , & pes , pkt , true, true, 0 ));
140
141
ASSERT (!output );
141
142
RESET ;
142
143
143
144
/* packets assembly, payload > 188 - 6 - 4 */
144
145
PKT_FROMSZ (aligned1 , 188 - sizeof (aligned1 ));
145
146
SetWBE (& pkt -> p_buffer [4 ], 250 );
146
- ASSERT (!ts_pes_Gather (& cb , & pes , pkt , true, true));
147
+ ASSERT (!ts_pes_Gather (& cb , & pes , pkt , true, true, 0 ));
147
148
ASSERT (!output );
148
149
ASSERT (pes .gather .i_data_size == 256 );
149
150
PKT_FROMSZ (aligned1 , 188 - sizeof (aligned1 ));
150
- ASSERT (ts_pes_Gather (& cb , & pes , pkt , false, true));
151
+ ASSERT (ts_pes_Gather (& cb , & pes , pkt , false, true, 0 ));
151
152
ASSERT (output );
152
153
block_ChainProperties (output , & outputcount , & outputsize , NULL );
153
154
ASSERT (outputcount == 1 );
@@ -157,11 +158,11 @@ int main()
157
158
/* no packets assembly from unit start */
158
159
PKT_FROMSZ (aligned1 , 188 - sizeof (aligned1 ));
159
160
SetWBE (& pkt -> p_buffer [4 ], 250 );
160
- ASSERT (!ts_pes_Gather (& cb , & pes , pkt , true, true));
161
+ ASSERT (!ts_pes_Gather (& cb , & pes , pkt , true, true, 0 ));
161
162
ASSERT (!output );
162
163
ASSERT (pes .gather .i_data_size == 256 );
163
164
PKT_FROMSZ (aligned1 , 188 - sizeof (aligned1 ));
164
- ASSERT (ts_pes_Gather (& cb , & pes , pkt , true, true));
165
+ ASSERT (ts_pes_Gather (& cb , & pes , pkt , true, true, 0 ));
165
166
ASSERT (output );
166
167
block_ChainProperties (output , & outputcount , & outputsize , NULL );
167
168
ASSERT (outputcount == 2 );
@@ -170,12 +171,12 @@ int main()
170
171
/* packets assembly, payload undef, use next sync code from another payload undef */
171
172
PKT_FROMSZ (aligned1 , 188 - sizeof (aligned1 ));
172
173
SetWBE (& pkt -> p_buffer [4 ], 0 );
173
- ASSERT (!ts_pes_Gather (& cb , & pes , pkt , true, true));
174
+ ASSERT (!ts_pes_Gather (& cb , & pes , pkt , true, true, 0 ));
174
175
ASSERT (!output );
175
176
ASSERT (pes .gather .i_data_size == 0 );
176
177
PKT_FROMSZ (aligned1 , 188 - sizeof (aligned1 ));
177
178
SetWBE (& pkt -> p_buffer [4 ], 0 );
178
- ASSERT (ts_pes_Gather (& cb , & pes , pkt , true, true));
179
+ ASSERT (ts_pes_Gather (& cb , & pes , pkt , true, true, 0 ));
179
180
ASSERT (output );
180
181
block_ChainProperties (output , & outputcount , & outputsize , NULL );
181
182
ASSERT (outputcount == 1 );
@@ -185,11 +186,11 @@ int main()
185
186
/* packets assembly, payload undef, use next sync code from fixed size */
186
187
PKT_FROMSZ (aligned1 , 188 - sizeof (aligned1 ));
187
188
SetWBE (& pkt -> p_buffer [4 ], 0 );
188
- ASSERT (!ts_pes_Gather (& cb , & pes , pkt , true, true));
189
+ ASSERT (!ts_pes_Gather (& cb , & pes , pkt , true, true, 0 ));
189
190
ASSERT (!output );
190
191
ASSERT (pes .gather .i_data_size == 0 );
191
192
PKT_FROMSZ (aligned1 , 188 - sizeof (aligned1 ));
192
- ASSERT (ts_pes_Gather (& cb , & pes , pkt , true, true));
193
+ ASSERT (ts_pes_Gather (& cb , & pes , pkt , true, true, 0 ));
193
194
ASSERT (output );
194
195
block_ChainProperties (output , & outputcount , & outputsize , NULL );
195
196
ASSERT (outputcount == 2 ); /* secondary */
@@ -198,17 +199,17 @@ int main()
198
199
/* packets assembly, payload undef, use next sync code from fixed size but uncomplete */
199
200
PKT_FROMSZ (aligned1 , 188 - sizeof (aligned1 ));
200
201
SetWBE (& pkt -> p_buffer [4 ], 0 );
201
- ASSERT (!ts_pes_Gather (& cb , & pes , pkt , true, true));
202
+ ASSERT (!ts_pes_Gather (& cb , & pes , pkt , true, true, 0 ));
202
203
ASSERT (!output );
203
204
ASSERT (pes .gather .i_data_size == 0 );
204
205
PKT_FROM (aligned1 );
205
206
pkt -> i_buffer = 6 ;
206
- ASSERT (ts_pes_Gather (& cb , & pes , pkt , true, true));
207
+ ASSERT (ts_pes_Gather (& cb , & pes , pkt , true, true, 0 ));
207
208
ASSERT (output );
208
209
block_ChainProperties (output , & outputcount , & outputsize , NULL );
209
210
ASSERT (outputcount == 1 ); /* can't output */
210
211
PKT_FROM (aligned1 );
211
- ASSERT (ts_pes_Gather (& cb , & pes , pkt , false, true)); /* add data for last output */
212
+ ASSERT (ts_pes_Gather (& cb , & pes , pkt , false, true, 0 )); /* add data for last output */
212
213
ASSERT (output ); /* output */
213
214
RESET ;
214
215
@@ -225,7 +226,7 @@ int main()
225
226
/* If the payload_unit_start_indicator is set to '1', then one and only one
226
227
* PES packet starts in this transport stream packet. */
227
228
PKT_FROM (aligned2 );
228
- ASSERT (ts_pes_Gather (& cb , & pes , pkt , true, true));
229
+ ASSERT (ts_pes_Gather (& cb , & pes , pkt , true, true, 0 ));
229
230
ASSERT (output );
230
231
block_ChainProperties (output , & outputcount , & outputsize , NULL );
231
232
ASSERT (outputcount == 1 );
@@ -234,7 +235,7 @@ int main()
234
235
/* Broken PUSI tests */
235
236
pes .b_broken_PUSI_conformance = true;
236
237
PKT_FROM (aligned2 );
237
- ASSERT (ts_pes_Gather (& cb , & pes , pkt , true, true));
238
+ ASSERT (ts_pes_Gather (& cb , & pes , pkt , true, true, 0 ));
238
239
ASSERT (output );
239
240
block_ChainProperties (output , & outputcount , & outputsize , NULL );
240
241
ASSERT (outputcount == 3 );
@@ -243,7 +244,7 @@ int main()
243
244
pes .b_broken_PUSI_conformance = true;
244
245
PKT_FROM (aligned2 );
245
246
pkt -> p_buffer [0 ] = 0xFF ;
246
- ASSERT (ts_pes_Gather (& cb , & pes , pkt , true, true));
247
+ ASSERT (ts_pes_Gather (& cb , & pes , pkt , true, true, 0 ));
247
248
ASSERT (output );
248
249
block_ChainProperties (output , & outputcount , & outputsize , NULL );
249
250
ASSERT (outputcount == 2 );
@@ -254,13 +255,13 @@ int main()
254
255
pes .b_broken_PUSI_conformance = true;
255
256
PKT_FROM (aligned2 );
256
257
pkt -> i_buffer = split ;
257
- ASSERT (ts_pes_Gather (& cb , & pes , pkt , true, true));
258
+ ASSERT (ts_pes_Gather (& cb , & pes , pkt , true, true, 0 ));
258
259
ASSERT (output );
259
260
260
261
PKT_FROM (aligned2 );
261
262
pkt -> p_buffer += split ;
262
263
pkt -> i_buffer -= split ;
263
- ASSERT (ts_pes_Gather (& cb , & pes , pkt , true, true));
264
+ ASSERT (ts_pes_Gather (& cb , & pes , pkt , true, true, 0 ));
264
265
ASSERT (output );
265
266
266
267
RESET ;
0 commit comments