From ec68267cf796d4d61895a8c1436866b158c4e37f Mon Sep 17 00:00:00 2001 From: Raphael <68374617+raphaelscholle@users.noreply.github.com> Date: Mon, 6 Jan 2025 19:04:08 +0100 Subject: [PATCH] Update QOpenHDVideoHelper.hpp --- .../vscommon/QOpenHDVideoHelper.hpp | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/app/videostreaming/vscommon/QOpenHDVideoHelper.hpp b/app/videostreaming/vscommon/QOpenHDVideoHelper.hpp index 031d4ccb6..41e035122 100644 --- a/app/videostreaming/vscommon/QOpenHDVideoHelper.hpp +++ b/app/videostreaming/vscommon/QOpenHDVideoHelper.hpp @@ -199,20 +199,26 @@ static VideoStreamConfig read_config_from_settings(){ return ret; } - - // For OpenHD images, these files are copied over by the image builder and therefore can // be used for testing / validation -static std::string get_default_openhd_test_file(const VideoCodec video_codec){ +static std::string get_default_openhd_test_file(const VideoCodec video_codec) { std::stringstream in_filename; - in_filename<<"/usr/local/share/testvideos/"; - if(video_codec==QOpenHDVideoHelper::VideoCodecH264){ - in_filename<<"rpi_1080.h264"; - }else if(video_codec==QOpenHDVideoHelper::VideoCodecH265){ - in_filename<<"jetson_test.h265"; - }else{ - in_filename<<"uv_640x480.mjpeg"; +#ifdef _WIN32 + // Use Windows path + in_filename << "C:\\\\testvideos\\\\"; +#else + // Use Linux path + in_filename << "/usr/local/share/testvideos/"; +#endif + + if (video_codec == QOpenHDVideoHelper::VideoCodecH264) { + in_filename << "rpi_1080.h264"; + } else if (video_codec == QOpenHDVideoHelper::VideoCodecH265) { + in_filename << "jetson_test.h265"; + } else { + in_filename << "uv_640x480.mjpeg"; } + return in_filename.str(); }