MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / seedStreamingPlaybackFromDrop

Method seedStreamingPlaybackFromDrop

pj_app/src/MainWindow.cpp:2241–2261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2239}
2240
2241void MainWindow::seedStreamingPlaybackFromDrop() {
2242 if (active_streaming_dataset_id_ == 0) {
2243 return;
2244 }
2245 // One-shot per streaming session: a drop may seed the range before the next
2246 // ingest tick, but later drops must not re-snap a paused scrub. Playback state
2247 // decides whether this also moves the cursor to the live edge.
2248 if (streaming_playback_seeded_) {
2249 return;
2250 }
2251 streaming_playback_seeded_ = true;
2252 if (const auto range = session_->sessionManager().datasetDisplayRange(active_streaming_dataset_id_);
2253 range.has_value()) {
2254 auto& engine = session_->playbackEngine();
2255 if (engine.isPlaying()) {
2256 engine.setRangeAndCurrentTime(*range, range->max);
2257 } else {
2258 engine.setRange(*range);
2259 }
2260 }
2261}
2262
2263void MainWindow::setSourceTimelineStreamingLock(bool locked) {
2264 if (source_timeline_ != nullptr) {

Callers

nothing calls this directly

Calls 5

datasetDisplayRangeMethod · 0.80
isPlayingMethod · 0.80
sessionManagerMethod · 0.45
setRangeMethod · 0.45

Tested by

no test coverage detected