feat(mcap): add paced replay tooling
This commit is contained in:
@@ -331,15 +331,6 @@ int run_pipeline(const RuntimeConfig &config) {
|
||||
rtp_publisher.emplace(std::move(*created));
|
||||
}
|
||||
|
||||
if (config.record.mcap.enabled) {
|
||||
auto created = record::McapRecordSink::create(config);
|
||||
if (!created) {
|
||||
spdlog::error("pipeline MCAP sink init failed: {}", created.error());
|
||||
return exit_code(PipelineExitCode::InitializationError);
|
||||
}
|
||||
mcap_sink.emplace(std::move(*created));
|
||||
}
|
||||
|
||||
PipelineStats stats{};
|
||||
metrics::IngestEmitLatencyTracker latency_tracker{};
|
||||
bool producer_offline{false};
|
||||
@@ -386,6 +377,30 @@ int run_pipeline(const RuntimeConfig &config) {
|
||||
}
|
||||
rtmp_output.emplace(std::move(*created));
|
||||
}
|
||||
if (config.record.mcap.enabled) {
|
||||
auto stream_info = (*backend)->stream_info();
|
||||
if (!stream_info) {
|
||||
return unexpected_error(
|
||||
stream_info.error().code,
|
||||
"pipeline MCAP stream info unavailable: " + format_error(stream_info.error()));
|
||||
}
|
||||
if (!mcap_sink) {
|
||||
auto created = record::McapRecordSink::create(config, *stream_info);
|
||||
if (!created) {
|
||||
return unexpected_error(
|
||||
ERR_INTERNAL,
|
||||
"pipeline MCAP sink init failed: " + created.error());
|
||||
}
|
||||
mcap_sink.emplace(std::move(*created));
|
||||
} else {
|
||||
auto updated = mcap_sink->update_stream_info(*stream_info);
|
||||
if (!updated) {
|
||||
return unexpected_error(
|
||||
ERR_INTERNAL,
|
||||
"pipeline MCAP stream update failed: " + updated.error());
|
||||
}
|
||||
}
|
||||
}
|
||||
started = true;
|
||||
restart_pending = false;
|
||||
restart_target_info.reset();
|
||||
|
||||
Reference in New Issue
Block a user