104 explicit VDBReader(
const std::string& path,
bool read_only =
true,
bool try_to_fix =
false);
181 void jump(int64_t begin_time,
double rate,
int times,
bool force_to_play =
false)
override;
203 std::future<bool>
fix(
bool rebuild =
false)
override;
210 void tag(
const std::string& tag_name)
override;
280 bool prepare_cursor_stmt(
int file_index);
282 void update_status(
Status status);
288 bool prepare_file(
void* file);
290 void open(
const std::string& path);
294 int get_reset_index(
const Config& config);
296 void read(
const Config& config);
299 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 SQLite-backed BagReader implementation with full random-access support.
Definition: vdb_reader.h:95
void on_end() override
Hook invoked once on the loop thread after the last task runs.
std::vector< SchemaData > detect_schema() override
Enumerates every schema embedded in the schemas table.
size_t get_max_task_count() const override
Returns the maximum queue depth.
bool do_open_cursor(const Config &config) override
void resume() override
Resumes paused playback from the current position.
void register_ready_callback(ReadyCallback &&ready_callback) override
Registers a callback fired once the database is open and parsed.
bool is_split_mode() const override
Reports whether the bag is split across multiple .vdb files.
int get_split_index() const override
Returns the index of the split part currently under playback.
void on_begin() override
Hook invoked once on the loop thread before the first task runs.
std::future< bool > reindex() override
Rebuilds the SQLite index tables asynchronously.
std::future< bool > fix(bool rebuild=false) override
Repairs a corrupt SQLite bag file asynchronously.
bool do_read_next(Frame &out, bool &is_error) override
Status get_status() const override
Returns the playback status.
bool is_jumping() const override
Reports whether a jump() seek is currently being processed.
std::future< bool > check() override
Verifies the integrity of the SQLite bag file asynchronously.
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.
VDBReader(const std::string &path, bool read_only=true, bool try_to_fix=false)
Opens a SQLite bag file for playback.
void bind_plugin_interface(const std::shared_ptr< BagPluginInterface > &plugin_interface) override
Attaches a BagPluginInterface for custom URL or type rewriting.
void register_output_callback(OutputCallback &&output_callback) override
Registers the message-delivery callback consumed during playback.
void register_status_callback(StatusCallback &&status_callback) override
Registers a callback invoked on every playback state transition.
void tag(const std::string &tag_name) override
Updates the tag column in the metadata table.
void stop() override
Stops playback and rewinds to the recording start.
int64_t get_real_timestamp() const override
Returns the timestamp of the last delivered message.
void pause() override
Pauses playback at the current position.
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 pause_to_next() override
Emits one more message and then pauses again.
const Info & get_info() const override
Returns the bag metadata populated when the file was opened.
~VDBReader() override
Stops playback and closes the SQLite database handle.
void play(const Config &config) override
Starts playback with the given configuration.
#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