From fa9f1e6dcb8446aca625f7ec5a4d8f48c33524d8 Mon Sep 17 00:00:00 2001 From: pigeatgarlic <64737125+pigeatgarlic@users.noreply.github.com> Date: Thu, 24 Oct 2024 10:21:47 +0700 Subject: [PATCH] signal capture failure --- src/main.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index f6511138..07d23225 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -25,6 +25,11 @@ #include #endif +enum StatusCode { + NORMAL_EXIT, + NO_ENCODER_AVAILABLE = 7777 +}; + using namespace std::literals; using namespace boost::interprocess; @@ -149,7 +154,7 @@ main(int argc, char *argv[]) { queuetype != QueueType::Microphone) { if (video::probe_encoders()) { BOOST_LOG(error) << "Video failed to find working encoder"sv; - return -1; + return StatusCode::NO_ENCODER_AVAILABLE; } } @@ -310,5 +315,5 @@ main(int argc, char *argv[]) { } #endif - return 0; + return StatusCode::NORMAL_EXIT; }