diff --git a/build/bytetrack-counter b/build/bytetrack-counter index 4e5677d..d35c911 100755 Binary files a/build/bytetrack-counter and b/build/bytetrack-counter differ diff --git a/build/version.hpp b/build/version.hpp index 9279197..6e66457 100644 --- a/build/version.hpp +++ b/build/version.hpp @@ -4,11 +4,11 @@ namespace version { -const std::string GIT_COMMIT = "bb7d08ab"; +const std::string GIT_COMMIT = "eefff489"; const std::string GIT_BRANCH = "main"; const std::string GIT_TAG = ""; -const std::string BUILD_DATE = "2026-07-29"; -const std::string BUILD_TIME = "00:00:24"; +const std::string BUILD_DATE = "2026-08-04"; +const std::string BUILD_TIME = "23:35:10"; const int BUILD_YEAR = 2026; const bool BUILD_RKNN = 1; diff --git a/src/main.cpp b/src/main.cpp index fc8030b..b0e98f0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -100,6 +100,21 @@ int main(int argc, char* argv[]) { signal(SIGINT, signal_handler); signal(SIGTERM, signal_handler); + std::string cli_source; + for (int i = 2; i < argc; ++i) { + std::string a = argv[i]; + if (a == "--source" || a == "-s") { + if (i + 1 < argc) { + cli_source = argv[++i]; + } else { + std::cerr << "Error: --source requires a value" << std::endl; + return 1; + } + } else if (a.rfind("--source=", 0) == 0) { + cli_source = a.substr(9); + } + } + if (argc < 2) { std::cout << "ByteTrack Counter (C++)" << std::endl; std::cout << "Version: " << version::GIT_COMMIT @@ -109,13 +124,19 @@ int main(int argc, char* argv[]) { if (!version::GIT_TAG.empty()) std::cout << " | tag: " << version::GIT_TAG; std::cout << std::endl; - std::cout << "Usage: bytetrack-counter " << std::endl; + std::cout << "Usage: bytetrack-counter [--source ]" << std::endl; std::cout << " config.env path to environment configuration file (required)" << std::endl; + std::cout << " --source, -s override video source (rtsp://, http://, or local file)" << std::endl; return 1; } g_config.load_from_env(argv[1]); + if (!cli_source.empty()) { + g_config.source = cli_source; + std::cout << "Source overridden by CLI: " << g_config.source << std::endl; + } + std::cout << "Starting ByteTrack Counter (C++)" << std::endl; std::cout << "Version: " << version::GIT_COMMIT << " | branch: " << version::GIT_BRANCH