From f6d21beef910adb0a466af38d635024dcbc805b1 Mon Sep 17 00:00:00 2001 From: kallaballa Date: Wed, 12 Oct 2022 16:49:02 +0200 Subject: [PATCH] update camera-demo --- debug-env.sh | 7 ++++++- src/camera/camera-demo.cpp | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/debug-env.sh b/debug-env.sh index bc2ea468c..ebe78ef10 100644 --- a/debug-env.sh +++ b/debug-env.sh @@ -1,3 +1,8 @@ +OPENCV_LOC=/home/elchaschab/devel/opencv/ +FFMPEG_LOC=/home/elchaschab/devel/cartwheel-ffmpeg/ffmpeg/ + + +export LD_LIBRARY_PATH="$OPENCV_LOC/build/lib/:$FFMPEG_LOC/libavcodec/:$FFMPEG_LOC/libavutil/:$FFMPEG_LOC/libavdevice/:$FFMPEG_LOC/libavformat/:$FFMPEG_LOC/libavfilter/:$FFMPEG_LOC/libpostproc/:$FFMPEG_LOC/libswresample/:$FFMPEG_LOC/libswscale/:$LD_LIBRARY_PATH" export OPENCV_LOG_LEVEL=DEBUG export OPENCV_FFMPEG_LOGLEVEL=trace export OPENCV_VIDEOIO_DEBUG=1 @@ -13,7 +18,7 @@ export OPENCV_OPENCL_ABORT_ON_BUILD_ERROR=1 #export OPENCV_OPENCL_SVM_DISABLE=1 export OPENCV_DUMP_ERRORS=1 export OPENCV_DUMP_CONFIG=1 -#export OPENCV_CPU_DISABLE=1 +#export OPENCV_CPU_DISABLE= export OPENCV_TRACE=1 export OPENCV_TRACE_SYNC_OPENCL=1 export OPENCV_FFMPEG_CAPTURE_OPTIONS="loglevel;debug" diff --git a/src/camera/camera-demo.cpp b/src/camera/camera-demo.cpp index 6659985ac..115f33493 100644 --- a/src/camera/camera-demo.cpp +++ b/src/camera/camera-demo.cpp @@ -22,7 +22,7 @@ int main(int argc, char **argv) { */ VA_CONTEXT = cv::ocl::OpenCLExecutionContext::getCurrent(); - cv::VideoCapture cap("example.mp4", cv::CAP_FFMPEG, { + cv::VideoCapture cap("/dev/video0", cv::CAP_FFMPEG, { cv::CAP_PROP_HW_DEVICE, 0, cv::CAP_PROP_HW_ACCELERATION, cv::VIDEO_ACCELERATION_VAAPI, cv::CAP_PROP_HW_ACCELERATION_USE_OPENCL, 1