@@ -87,20 +87,18 @@ class Videoio_Test_Base
87
87
// TODO: fix this backend
88
88
std::cout << " SKIP test: AVFoundation backend returns invalid frame count" << std::endl;
89
89
return ;
90
- } else if (apiPref == CAP_VFW) {
90
+ }
91
+ else if (apiPref == CAP_VFW)
92
+ {
91
93
// TODO: fix this backend
92
94
std::cout << " SKIP test: Video for Windows backend not open files" << std::endl;
93
95
return ;
94
- } else if (apiPref == CAP_GSTREAMER) {
95
- // TODO: fix this backend
96
- std::cout << " SKIP test: Gstreamer failed with read critical error" << std::endl;
97
- return ;
98
96
}
99
97
100
98
VideoCapture cap (video_file, apiPref);
101
99
if (!cap.isOpened ())
102
100
{
103
- std::cout << " SKIP test: Can 't open video: " << video_file << std::endl;
101
+ std::cout << " SKIP test: backend " << apiPref << " can 't open the video: " << video_file << std::endl;
104
102
return ;
105
103
}
106
104
int n_frames = (int )cap.get (CAP_PROP_FRAME_COUNT);
@@ -171,20 +169,18 @@ class Videoio_Bunny : public Videoio_Test_Base, public testing::TestWithParam<Ba
171
169
// TODO: fix this backend
172
170
std::cout << " SKIP test: AVFoundation backend returns invalid frame count" << std::endl;
173
171
return ;
174
- } else if (apiPref == CAP_VFW) {
172
+ }
173
+ else if (apiPref == CAP_VFW)
174
+ {
175
175
// TODO: fix this backend
176
176
std::cout << " SKIP test: Video for Windows backend not open files" << std::endl;
177
177
return ;
178
- } else if (apiPref == CAP_GSTREAMER) {
179
- // TODO: fix this backend
180
- std::cout << " SKIP test: Gstreamer failed with read critical error" << std::endl;
181
- return ;
182
178
}
183
179
184
180
VideoCapture cap (video_file, apiPref);
185
181
if (!cap.isOpened ())
186
182
{
187
- std::cout << " SKIP test: Can 't open video: " << video_file << std::endl;
183
+ std::cout << " SKIP test: backend " << apiPref << " can 't open the video: " << video_file << std::endl;
188
184
return ;
189
185
}
190
186
@@ -266,14 +262,12 @@ class Videoio_Synthetic : public Videoio_Test_Base, public testing::TestWithPara
266
262
// TODO: fix this backend
267
263
std::cout << " SKIP test: AVFoundation backend can not write video" << std::endl;
268
264
return ;
269
- } else if (apiPref == CAP_VFW) {
265
+ }
266
+ else if (apiPref == CAP_VFW)
267
+ {
270
268
// TODO: fix this backend
271
269
std::cout << " SKIP test: Video for Windows backend not open files" << std::endl;
272
270
return ;
273
- } else if (apiPref == CAP_GSTREAMER) {
274
- // TODO: fix this backend
275
- std::cout << " SKIP test: Gstreamer failed with write critical error" << std::endl;
276
- return ;
277
271
}
278
272
Mat img (frame_size, CV_8UC3);
279
273
VideoWriter writer (video_file, apiPref, fourcc, fps, frame_size, true );
@@ -309,11 +303,6 @@ class Videoio_Synthetic : public Videoio_Test_Base, public testing::TestWithPara
309
303
if (fourcc == VideoWriter::fourcc (' M' , ' P' , ' E' , ' G' ) && ext == " mkv" )
310
304
expected_frame_count.end += 1 ;
311
305
312
- // Hack! Some GStreamer encoding pipelines drop last frame in the video
313
- // #ifdef HAVE_GSTREAMER
314
- // expected_frame_count.start -= 1;
315
- // #endif
316
-
317
306
ASSERT_LE (expected_frame_count.start , actual);
318
307
ASSERT_GE (expected_frame_count.end , actual);
319
308
@@ -439,13 +428,13 @@ Ext_Fourcc_PSNR synthetic_params[] = {
439
428
#endif
440
429
441
430
#ifdef HAVE_GSTREAMER
442
- makeParam (" avi" , " XVID" , 30 .f , CAP_GSTREAMER),
431
+ // makeParam("avi", "XVID", 30.f, CAP_GSTREAMER), - corrupted frames, broken indexes
443
432
makeParam (" avi" , " MPEG" , 30 .f , CAP_GSTREAMER),
444
433
makeParam (" avi" , " IYUV" , 30 .f , CAP_GSTREAMER),
445
434
makeParam (" avi" , " MJPG" , 30 .f , CAP_GSTREAMER),
446
435
makeParam (" avi" , " H264" , 30 .f , CAP_GSTREAMER),
447
436
448
- makeParam (" mkv" , " XVID" , 30 .f , CAP_GSTREAMER),
437
+ // makeParam("mkv", "XVID", 30.f, CAP_GSTREAMER),
449
438
makeParam (" mkv" , " MPEG" , 30 .f , CAP_GSTREAMER),
450
439
makeParam (" mkv" , " MJPG" , 30 .f , CAP_GSTREAMER),
451
440
0 commit comments