replay: add stop() function (#32673)

add stop() func
pull/32679/head
Dean Lee 11 months ago committed by GitHub
parent 6688d7b91c
commit 3f84fe3557
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      tools/cabana/streams/replaystream.cc
  2. 4
      tools/replay/replay.cc
  3. 1
      tools/replay/replay.h

@ -65,7 +65,9 @@ void ReplayStream::start() {
}
void ReplayStream::stop() {
replay.reset(nullptr);
if (replay) {
replay->stop();
}
}
bool ReplayStream::eventFilter(const Event *event) {

@ -46,6 +46,10 @@ Replay::Replay(QString route, QStringList allow, QStringList block, SubMaster *s
}
Replay::~Replay() {
stop();
}
void Replay::stop() {
if (!stream_thread_ && segments_.empty()) return;
rInfo("shutdown: in progress...");

@ -54,6 +54,7 @@ public:
~Replay();
bool load();
void start(int seconds = 0);
void stop();
void pause(bool pause);
void seekToFlag(FindFlag flag);
void seekTo(double seconds, bool relative);

Loading…
Cancel
Save