@@ -79,13 +79,17 @@ public static List<Object[]> params() {
79
79
@ Test
80
80
public void sample () throws Exception {
81
81
assertExtractorBehavior (
82
- /* closedCaptionFormats= */ ImmutableList .of (), "media/mp4/sample_fragmented.mp4" );
82
+ /* closedCaptionFormats= */ ImmutableList .of (),
83
+ "media/mp4/sample_fragmented.mp4" ,
84
+ /* peekLimit= */ 1100 );
83
85
}
84
86
85
87
@ Test
86
88
public void sampleSeekable () throws Exception {
87
89
assertExtractorBehavior (
88
- /* closedCaptionFormats= */ ImmutableList .of (), "media/mp4/sample_fragmented_seekable.mp4" );
90
+ /* closedCaptionFormats= */ ImmutableList .of (),
91
+ "media/mp4/sample_fragmented_seekable.mp4" ,
92
+ /* peekLimit= */ 260 );
89
93
}
90
94
91
95
@ Test
@@ -101,6 +105,7 @@ public void sampleSeekable_multipleSidx_noMerging() throws Exception {
101
105
/* closedCaptionFormats= */ ImmutableList .of (),
102
106
/* additionalEmsgTrackOutput= */ null ),
103
107
file ,
108
+ /* peekLimit= */ 700 ,
104
109
new ExtractorAsserts .AssertionConfig .Builder ()
105
110
.setDumpFilesPrefix (
106
111
file .replaceFirst ("media" , "extractordumps" ) + ".no-merge-fragmented-sidx" )
@@ -121,6 +126,7 @@ public void sampleSeekable_multipleSidx_mergingEnabled() throws Exception {
121
126
/* closedCaptionFormats= */ ImmutableList .of (),
122
127
/* additionalEmsgTrackOutput= */ null ),
123
128
file ,
129
+ /* peekLimit= */ 700 ,
124
130
new ExtractorAsserts .AssertionConfig .Builder ()
125
131
.setDumpFilesPrefix (
126
132
file .replaceFirst ("media" , "extractordumps" ) + ".merge-fragmented-sidx" )
@@ -135,7 +141,8 @@ public void sampleWithSeiPayloadInputHasNoCaptions() throws Exception {
135
141
Collections .singletonList (
136
142
new Format .Builder ().setSampleMimeType (MimeTypes .APPLICATION_CEA608 ).build ());
137
143
138
- assertExtractorBehavior (closedCaptions , "media/mp4/sample_fragmented_sei.mp4" );
144
+ assertExtractorBehavior (
145
+ closedCaptions , "media/mp4/sample_fragmented_sei.mp4" , /* peekLimit= */ 1100 );
139
146
}
140
147
141
148
@ Test
@@ -145,99 +152,121 @@ public void sampleWithSeiPayloadInputHasCaptions() throws Exception {
145
152
Collections .singletonList (
146
153
new Format .Builder ().setSampleMimeType (MimeTypes .APPLICATION_CEA608 ).build ());
147
154
148
- assertExtractorBehavior (closedCaptions , "media/mp4/fragmented_captions.mp4" );
155
+ assertExtractorBehavior (
156
+ closedCaptions , "media/mp4/fragmented_captions.mp4" , /* peekLimit= */ 660 );
149
157
}
150
158
151
159
@ Test
152
160
public void sampleWithAc3Track () throws Exception {
153
161
assertExtractorBehavior (
154
- /* closedCaptionFormats= */ ImmutableList .of (), "media/mp4/sample_ac3_fragmented.mp4" );
162
+ /* closedCaptionFormats= */ ImmutableList .of (),
163
+ "media/mp4/sample_ac3_fragmented.mp4" ,
164
+ /* peekLimit= */ 550 );
155
165
}
156
166
157
167
@ Test
158
168
public void sampleWithAc4Track () throws Exception {
159
169
assertExtractorBehavior (
160
- /* closedCaptionFormats= */ ImmutableList .of (), "media/mp4/sample_ac4_fragmented.mp4" );
170
+ /* closedCaptionFormats= */ ImmutableList .of (),
171
+ "media/mp4/sample_ac4_fragmented.mp4" ,
172
+ /* peekLimit= */ 600 );
161
173
}
162
174
163
175
@ Test
164
176
public void sampleWithAc4Level4Track () throws Exception {
165
177
assertExtractorBehavior (
166
178
/* closedCaptionFormats= */ ImmutableList .of (),
167
- "media/mp4/sample_ac4_level4_fragmented.mp4" );
179
+ "media/mp4/sample_ac4_level4_fragmented.mp4" ,
180
+ /* peekLimit= */ 580 );
168
181
}
169
182
170
183
@ Test
171
184
public void sampleWithProtectedAc4Track () throws Exception {
172
185
assertExtractorBehavior (
173
- /* closedCaptionFormats= */ ImmutableList .of (), "media/mp4/sample_ac4_protected.mp4" );
186
+ /* closedCaptionFormats= */ ImmutableList .of (),
187
+ "media/mp4/sample_ac4_protected.mp4" ,
188
+ /* peekLimit= */ 810 );
174
189
}
175
190
176
191
@ Test
177
192
public void sampleWithEac3Track () throws Exception {
178
193
assertExtractorBehavior (
179
- /* closedCaptionFormats= */ ImmutableList .of (), "media/mp4/sample_eac3_fragmented.mp4" );
194
+ /* closedCaptionFormats= */ ImmutableList .of (),
195
+ "media/mp4/sample_eac3_fragmented.mp4" ,
196
+ /* peekLimit= */ 550 );
180
197
}
181
198
182
199
@ Test
183
200
public void sampleWithEac3jocTrack () throws Exception {
184
201
assertExtractorBehavior (
185
- /* closedCaptionFormats= */ ImmutableList .of (), "media/mp4/sample_eac3joc_fragmented.mp4" );
202
+ /* closedCaptionFormats= */ ImmutableList .of (),
203
+ "media/mp4/sample_eac3joc_fragmented.mp4" ,
204
+ /* peekLimit= */ 550 );
186
205
}
187
206
188
207
@ Test
189
208
public void sampleWithOpusTrack () throws Exception {
190
209
assertExtractorBehavior (
191
- /* closedCaptionFormats= */ ImmutableList .of (), "media/mp4/sample_opus_fragmented.mp4" );
210
+ /* closedCaptionFormats= */ ImmutableList .of (),
211
+ "media/mp4/sample_opus_fragmented.mp4" ,
212
+ /* peekLimit= */ 540 );
192
213
}
193
214
194
215
@ Test
195
216
public void samplePartiallyFragmented () throws Exception {
196
217
assertExtractorBehavior (
197
218
/* closedCaptionFormats= */ ImmutableList .of (),
198
- "media/mp4/sample_partially_fragmented.mp4" );
219
+ "media/mp4/sample_partially_fragmented.mp4" ,
220
+ /* peekLimit= */ 1300 );
199
221
}
200
222
201
223
/** https://github.com/google/ExoPlayer/issues/10381 */
202
224
@ Test
203
225
public void sampleWithLargeBitrates () throws Exception {
204
226
assertExtractorBehavior (
205
227
/* closedCaptionFormats= */ ImmutableList .of (),
206
- "media/mp4/sample_fragmented_large_bitrates.mp4" );
228
+ "media/mp4/sample_fragmented_large_bitrates.mp4" ,
229
+ /* peekLimit= */ 260 );
207
230
}
208
231
209
232
@ Test
210
233
public void sampleWithMhm1BlCicp1Track () throws Exception {
211
234
assertExtractorBehavior (
212
235
/* closedCaptionFormats= */ ImmutableList .of (),
213
- "media/mp4/sample_mhm1_bl_cicp1_fragmented.mp4" );
236
+ "media/mp4/sample_mhm1_bl_cicp1_fragmented.mp4" ,
237
+ /* peekLimit= */ 610 );
214
238
}
215
239
216
240
@ Test
217
241
public void sampleWithMhm1LcblCicp1Track () throws Exception {
218
242
assertExtractorBehavior (
219
243
/* closedCaptionFormats= */ ImmutableList .of (),
220
- "media/mp4/sample_mhm1_lcbl_cicp1_fragmented.mp4" );
244
+ "media/mp4/sample_mhm1_lcbl_cicp1_fragmented.mp4" ,
245
+ /* peekLimit= */ 620 );
221
246
}
222
247
223
248
@ Test
224
249
public void sampleWithMhm1BlConfigChangeTrack () throws Exception {
225
250
assertExtractorBehavior (
226
251
/* closedCaptionFormats= */ ImmutableList .of (),
227
- "media/mp4/sample_mhm1_bl_configchange_fragmented.mp4" );
252
+ "media/mp4/sample_mhm1_bl_configchange_fragmented.mp4" ,
253
+ /* peekLimit= */ 610 );
228
254
}
229
255
230
256
@ Test
231
257
public void sampleWithMhm1LcblConfigChangeTrack () throws Exception {
232
258
assertExtractorBehavior (
233
259
/* closedCaptionFormats= */ ImmutableList .of (),
234
- "media/mp4/sample_mhm1_lcbl_configchange_fragmented.mp4" );
260
+ "media/mp4/sample_mhm1_lcbl_configchange_fragmented.mp4" ,
261
+ /* peekLimit= */ 620 );
235
262
}
236
263
237
264
@ Test
238
265
public void sampleWithIamfTrack () throws Exception {
239
266
assertExtractorBehavior (
240
- /* closedCaptionFormats= */ ImmutableList .of (), "media/mp4/sample_fragmented_iamf.mp4" );
267
+ /* closedCaptionFormats= */ ImmutableList .of (),
268
+ "media/mp4/sample_fragmented_iamf.mp4" ,
269
+ /* peekLimit= */ 150 );
241
270
}
242
271
243
272
@ Test
@@ -247,11 +276,12 @@ public void sampleWithNonReferenceH265FramesAndCaptions() throws Exception {
247
276
Collections .singletonList (
248
277
new Format .Builder ().setSampleMimeType (MimeTypes .APPLICATION_CEA608 ).build ());
249
278
250
- assertExtractorBehavior (closedCaptions , "media/mp4/fragmented_captions_h265.mp4" );
279
+ assertExtractorBehavior (
280
+ closedCaptions , "media/mp4/fragmented_captions_h265.mp4" , /* peekLimit= */ 3100 );
251
281
}
252
282
253
- private void assertExtractorBehavior (List < Format > closedCaptionFormats , String file )
254
- throws IOException {
283
+ private void assertExtractorBehavior (
284
+ List < Format > closedCaptionFormats , String file , int peekLimit ) throws IOException {
255
285
ExtractorAsserts .AssertionConfig .Builder assertionConfigBuilder =
256
286
new ExtractorAsserts .AssertionConfig .Builder ();
257
287
if (readWithinGopSampleDependencies ) {
@@ -263,6 +293,7 @@ private void assertExtractorBehavior(List<Format> closedCaptionFormats, String f
263
293
getExtractorFactory (
264
294
closedCaptionFormats , subtitlesParsedDuringExtraction , readWithinGopSampleDependencies ),
265
295
file ,
296
+ peekLimit ,
266
297
assertionConfigBuilder .build (),
267
298
simulationConfig );
268
299
}
0 commit comments