@@ -1704,7 +1704,11 @@ TEST(GAPI_Streaming, CopyFrame)
1704
1704
cv::GComputation comp (cv::GIn (in), cv::GOut (out));
1705
1705
1706
1706
auto cc = comp.compileStreaming ();
1707
- cc.setSource <BGRSource>(filepath);
1707
+ try {
1708
+ cc.setSource <BGRSource>(filepath);
1709
+ } catch (...) {
1710
+ throw SkipTestException (" Video file can not be opened" );
1711
+ }
1708
1712
1709
1713
cv::VideoCapture cap;
1710
1714
cap.open (filepath);
@@ -1739,7 +1743,11 @@ TEST(GAPI_Streaming, Reshape)
1739
1743
cv::GComputation comp (cv::GIn (in), cv::GOut (out));
1740
1744
1741
1745
auto cc = comp.compileStreaming ();
1742
- cc.setSource <BGRSource>(filepath);
1746
+ try {
1747
+ cc.setSource <BGRSource>(filepath);
1748
+ } catch (...) {
1749
+ throw SkipTestException (" Video file can not be opened" );
1750
+ }
1743
1751
1744
1752
cv::VideoCapture cap;
1745
1753
cap.open (filepath);
@@ -1765,7 +1773,11 @@ TEST(GAPI_Streaming, Reshape)
1765
1773
// Reshape the graph meta
1766
1774
filepath = findDataFile (" cv/video/1920x1080.avi" );
1767
1775
cc.stop ();
1768
- cc.setSource <BGRSource>(filepath);
1776
+ try {
1777
+ cc.setSource <BGRSource>(filepath);
1778
+ } catch (...) {
1779
+ throw SkipTestException (" Video file can not be opened" );
1780
+ }
1769
1781
1770
1782
cap.open (filepath);
1771
1783
if (!cap.isOpened ())
@@ -1799,7 +1811,11 @@ TEST(GAPI_Streaming, AccessBGRFromBGRFrame)
1799
1811
cv::GComputation comp (cv::GIn (in), cv::GOut (out));
1800
1812
1801
1813
auto cc = comp.compileStreaming ();
1802
- cc.setSource <BGRSource>(filepath);
1814
+ try {
1815
+ cc.setSource <BGRSource>(filepath);
1816
+ } catch (...) {
1817
+ throw SkipTestException (" Video file can not be opened" );
1818
+ }
1803
1819
1804
1820
cv::VideoCapture cap;
1805
1821
cap.open (filepath);
@@ -1831,7 +1847,11 @@ TEST(GAPI_Streaming, AccessBGRFromNV12Frame)
1831
1847
cv::GComputation comp (cv::GIn (in), cv::GOut (out));
1832
1848
1833
1849
auto cc = comp.compileStreaming ();
1834
- cc.setSource <NV12Source>(filepath);
1850
+ try {
1851
+ cc.setSource <NV12Source>(filepath);
1852
+ } catch (...) {
1853
+ throw SkipTestException (" Video file can not be opened" );
1854
+ }
1835
1855
1836
1856
cv::VideoCapture cap;
1837
1857
cap.open (filepath);
0 commit comments