From fc68c18c92bba22c4fae1ecae518b416cc2b976e Mon Sep 17 00:00:00 2001 From: Alexander Shishkov Date: Thu, 22 Mar 2012 13:36:07 +0000 Subject: [PATCH] unrolled changes from r7601 (problems with Android,...) --- modules/highgui/test/test_framecount.cpp | 6 ++++++ modules/highgui/test/test_positioning.cpp | 12 ++++++++++++ modules/highgui/test/test_video_io.cpp | 18 ++++++++++++++++++ 3 files changed, 36 insertions(+) diff --git a/modules/highgui/test/test_framecount.cpp b/modules/highgui/test/test_framecount.cpp index 095fe31b6d..cdf05901c8 100644 --- a/modules/highgui/test/test_framecount.cpp +++ b/modules/highgui/test/test_framecount.cpp @@ -55,6 +55,9 @@ public: void CV_FramecountTest::run(int) { +#if defined WIN32 || (defined __linux__ && !defined ANDROID) +#if !defined HAVE_GSTREAMER || defined HAVE_GSTREAMER_APP + const int time_sec = 5, fps = 25; const string ext[] = {"avi", "mov", "mp4", "mpg", "wmv"}; @@ -123,6 +126,9 @@ void CV_FramecountTest::run(int) ts->printf(cvtest::TS::LOG, "\nSuccessfull experiments: %d (%d%%)\n", n-failed, (n - failed)*100/n); ts->printf(cvtest::TS::LOG, "Failed experiments: %d (%d%%)\n", failed, failed*100/n); + +#endif +#endif } TEST(HighguiFramecount, regression) {CV_FramecountTest test; test.safe_run();} diff --git a/modules/highgui/test/test_positioning.cpp b/modules/highgui/test/test_positioning.cpp index 249dce3bee..358145a264 100644 --- a/modules/highgui/test/test_positioning.cpp +++ b/modules/highgui/test/test_positioning.cpp @@ -209,12 +209,24 @@ void CV_VideoPositioningTest::run_test(int method) void CV_VideoProgressivePositioningTest::run(int) { +#if defined WIN32 || (defined __linux__ && !defined ANDROID) +#if !defined HAVE_GSTREAMER || defined HAVE_GSTREAMER_APP + run_test(PROGRESSIVE); + +#endif +#endif } void CV_VideoRandomPositioningTest::run(int) { +#if defined WIN32 || (defined __linux__ && !defined ANDROID) +#if !defined HAVE_GSTREAMER || defined HAVE_GSTREAMER_APP + run_test(RANDOM); + +#endif +#endif } TEST (HighguiPositioning, progressive) { CV_VideoProgressivePositioningTest test; test.safe_run(); } diff --git a/modules/highgui/test/test_video_io.cpp b/modules/highgui/test/test_video_io.cpp index f39f523943..029361e16f 100644 --- a/modules/highgui/test/test_video_io.cpp +++ b/modules/highgui/test/test_video_io.cpp @@ -633,6 +633,9 @@ void CV_SpecificImageTest::run(int) void CV_VideoTest::run(int) { +#if defined WIN32 || (defined __linux__ && !defined ANDROID) +#if !defined HAVE_GSTREAMER || defined HAVE_GSTREAMER_APP + const char codecs[][4] = { {'I', 'Y', 'U', 'V'}, {'X', 'V', 'I', 'D'}, {'M', 'P', 'G', '2'}, @@ -646,10 +649,16 @@ void CV_VideoTest::run(int) { VideoTest(ts->get_data_path(), CV_FOURCC(codecs[i][0], codecs[i][1], codecs[i][2], codecs[i][3])); } + +#endif +#endif } void CV_SpecificVideoFileTest::run(int) { +#if defined WIN32 || (defined __linux__ && !defined ANDROID) +#if !defined HAVE_GSTREAMER || defined HAVE_GSTREAMER_APP + const char codecs[][4] = { {'M', 'P', 'G', '2'}, {'X', 'V', 'I', 'D'}, {'M', 'J', 'P', 'G'}, @@ -661,10 +670,16 @@ void CV_SpecificVideoFileTest::run(int) { SpecificVideoFileTest(ts->get_data_path(), codecs[i]); } + +#endif +#endif } void CV_SpecificVideoCameraTest::run(int) { +#if defined WIN32 || (defined __linux__ && !defined ANDROID) +#if !defined HAVE_GSTREAMER || defined HAVE_GSTREAMER_APP + const char codecs[][4] = { {'M', 'P', 'G', '2'}, {'X', 'V', 'I', 'D'}, {'M', 'J', 'P', 'G'}, @@ -676,6 +691,9 @@ void CV_SpecificVideoCameraTest::run(int) { SpecificVideoCameraTest(ts->get_data_path(), codecs[i]); } + +#endif +#endif } TEST(Highgui_Image, regression) { CV_ImageTest test; test.safe_run(); }