Skip to content

Commit

Permalink
added gtk feature in opencv dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
venkat0907 committed Aug 1, 2023
1 parent a70b01f commit 76403fb
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 3 deletions.
3 changes: 2 additions & 1 deletion base/fix-vcpkg-json.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ if($removeCUDA.IsPresent)
$opencv = $v.dependencies | Where-Object { $_.name -eq 'opencv4'}
$opencv.features= $opencv.features | Where-Object { $_ -ne 'cuda' }
$opencv.features= $opencv.features | Where-Object { $_ -ne 'cudnn' }
$opencv.features= $opencv.features | Where-Object { $_ -ne 'gtk' }
}

if($removeOpenCV.IsPresent)
Expand All @@ -24,4 +25,4 @@ if($onlyOpenCV.IsPresent)
}


$v | ConvertTo-Json -depth 32| set-content $fileName
$v | ConvertTo-Json -depth 32| set-content $fileName
23 changes: 23 additions & 0 deletions base/test/webcam_source_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "PipeLine.h"
#include "WebCamSource.h"
#include "ExternalSinkModule.h"
#include "ImageViewerModule.h"

BOOST_AUTO_TEST_SUITE(webcam_tests, * boost::unit_test::disabled())

Expand Down Expand Up @@ -64,4 +65,26 @@ BOOST_AUTO_TEST_CASE(basic_small)
BOOST_TEST(sink->term());
}

BOOST_AUTO_TEST_CASE(viewer_test)
{
WebCamSourceProps webCamSourceprops(-1, 640, 480);
auto source = boost::shared_ptr<WebCamSource>(new WebCamSource(webCamSourceprops));

auto sink = boost::shared_ptr<Module>(new ImageViewerModule(ImageViewerModuleProps("imageview")));
source->setNext(sink);

PipeLine p("test");
p.appendModule(source);
p.init();

p.run_all_threaded();
boost::this_thread::sleep_for(boost::chrono::seconds(10));

LOG_INFO << "profiling done - stopping the pipeline";
p.stop();
p.term();
p.wait_for_all();

}

BOOST_AUTO_TEST_SUITE_END()
3 changes: 2 additions & 1 deletion base/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"nonfree",
"png",
"tiff",
"webp"
"webp",
"gtk"
]
},
"libjpeg-turbo",
Expand Down
2 changes: 1 addition & 1 deletion build_linux_no_cuda.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
chmod +x base/fix-vcpkg-json.sh
./base/fix-vcpkg-json.sh true fasle false
./base/fix-vcpkg-json.sh true false false
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
Expand Down

0 comments on commit 76403fb

Please sign in to comment.