feat(downstream): add cvmmap downstream runtime implementation
This commit introduces the full downstream runtime implementation needed to ingest, transform, and publish streams. It preserves the original upstream request boundary by packaging the entire cvmmap-streamer module (build config, public API, protocol and IPC glue, and simulator/tester entrypoints) in one coherent core unit. Keeping this group isolated enables reviewers to validate runtime behavior and correctness without mixing test evidence or process documentation changes. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
#include "cvmmap_streamer/common.h"
|
||||
#include "cvmmap_streamer/config/runtime_config.hpp"
|
||||
|
||||
#include <spdlog/spdlog.h>
|
||||
|
||||
namespace cvmmap_streamer::core {
|
||||
|
||||
int run_ingest_loop(const RuntimeConfig &config);
|
||||
int run_nvenc_pipeline(const RuntimeConfig &config);
|
||||
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
if (argc <= 1 || cvmmap_streamer::has_help_flag(argc, argv)) {
|
||||
cvmmap_streamer::print_help("cvmmap_streamer");
|
||||
return 0;
|
||||
}
|
||||
|
||||
auto config = cvmmap_streamer::parse_runtime_config(argc, argv);
|
||||
if (!config) {
|
||||
spdlog::error("{}", config.error());
|
||||
cvmmap_streamer::print_help("cvmmap_streamer");
|
||||
return 2;
|
||||
}
|
||||
|
||||
auto validation = cvmmap_streamer::validate_runtime_config(*config);
|
||||
if (!validation) {
|
||||
spdlog::error("{}", validation.error());
|
||||
cvmmap_streamer::print_help("cvmmap_streamer");
|
||||
return 2;
|
||||
}
|
||||
|
||||
spdlog::info("runtime config: {}", cvmmap_streamer::summarize_runtime_config(*config));
|
||||
|
||||
switch (config->run_mode) {
|
||||
case cvmmap_streamer::RunMode::Pipeline:
|
||||
return cvmmap_streamer::core::run_nvenc_pipeline(*config);
|
||||
case cvmmap_streamer::RunMode::Ingest:
|
||||
return cvmmap_streamer::core::run_ingest_loop(*config);
|
||||
}
|
||||
|
||||
spdlog::error("unknown run mode");
|
||||
return 2;
|
||||
}
|
||||
Reference in New Issue
Block a user