112 explicit VCAPReader(
const std::string& path,
bool read_only =
true,
bool try_to_fix =
false);
189 void jump(int64_t begin_time,
double rate,
int times,
bool force_to_play =
false)
override;
211 std::future<bool>
fix(
bool rebuild =
false)
override;
218 void tag(
const std::string& tag_name)
override;
288 bool prepare_cursor_view(
int file_index);
290 void update_status(
Status status);
296 bool prepare_file(
void* file);
298 void open(
const std::string& path);
302 int get_reset_index(
const Config& config);
304 void read(
const Config& config);
307 std::unique_ptr<Impl> impl_;
Abstract player for VLink bag recordings with seek, loop and rate control.
Format-agnostic VLink bag player driven by an internal MessageLoop.
Definition: bag_reader.h:114
Status
Coarse playback state observable through get_status().
Definition: bag_reader.h:130
Move-only type-erased callable analogue of std::move_only_function with pool spill.
Definition: functional.h:134
Concrete MCAP-format BagReader implementation with index-driven seek.
Definition: vcap_reader.h:103
void jump(int64_t begin_time, double rate, int times, bool force_to_play=false) override
Seeks to begin_time and resumes playback at the new position.
void bind_plugin_interface(const std::shared_ptr< BagPluginInterface > &plugin_interface) override
Attaches a BagPluginInterface for custom URL or type rewriting.
bool is_split_mode() const override
Reports whether the bag is split across multiple .vcap files.
void register_output_callback(OutputCallback &&output_callback) override
Registers the message-delivery callback consumed during playback.
void tag(const std::string &tag_name) override
Updates the .vcapx manifest tag. Single .vcap files are left untouched.
std::future< bool > fix(bool rebuild=false) override
Unsupported MCAP repair operation.
bool is_jumping() const override
Reports whether a jump() seek is currently being processed.
void play(const Config &config) override
Starts playback with the given configuration.
void pause_to_next() override
Emits one more message and then pauses again.
void register_ready_callback(ReadyCallback &&ready_callback) override
Registers a callback fired once the file is open, parsed, and ready to play.
bool do_read_next(Frame &out, bool &is_error) override
VCAPReader(const std::string &path, bool read_only=true, bool try_to_fix=false)
Opens an MCAP file for playback.
std::future< bool > reindex() override
Unsupported MCAP reindex operation.
void on_end() override
Hook invoked once on the loop thread after the last task runs.
void stop() override
Stops playback and rewinds to the recording start.
void pause() override
Pauses playback at the current position.
void on_begin() override
Hook invoked once on the loop thread before the first task runs.
bool do_open_cursor(const Config &config) override
~VCAPReader() override
Stops playback and releases the MCAP file handle.
std::future< bool > check() override
Verifies the integrity of the MCAP file asynchronously.
size_t get_max_task_count() const override
Returns the maximum queue depth.
int64_t get_timestamp() const override
Returns the current playback cursor in milliseconds.
void register_finish_callback(FinishCallback &&finish_callback) override
Registers a callback fired when playback ends naturally or is interrupted.
void resume() override
Resumes paused playback from the current position.
void register_status_callback(StatusCallback &&status_callback) override
Registers a callback invoked on every playback state transition.
const Info & get_info() const override
Returns the bag metadata populated when the file was opened.
std::vector< SchemaData > detect_schema() override
Enumerates every schema embedded in the MCAP file.
int get_split_index() const override
Returns the index of the split part currently under playback.
int64_t get_real_timestamp() const override
Returns the timestamp of the last delivered message.
Status get_status() const override
Returns the playback status.
#define VLINK_EXPORT
Definition: macros.h:81
#define VLINK_DISALLOW_COPY_AND_ASSIGN(classname)
Deletes the copy constructor and copy-assignment operator of classname.
Definition: macros.h:174
Playback parameters consumed by play().
Definition: bag_reader.h:204
Aggregated metadata extracted from the bag header, summary and URL index.
Definition: bag_reader.h:144
One recorded or replayed message as it flows through the bag pipeline.
Definition: types.h:230