|
| | VDBReader (const std::string &path, bool read_only=true, bool try_to_fix=false) |
| | Opens a SQLite bag file for playback. More...
|
| |
| | ~VDBReader () override |
| | Stops playback and closes the SQLite database handle. More...
|
| |
| void | bind_plugin_interface (const std::shared_ptr< BagPluginInterface > &plugin_interface) override |
| | Attaches a BagPluginInterface for custom URL or type rewriting. More...
|
| |
| void | register_status_callback (StatusCallback &&status_callback) override |
| | Registers a callback invoked on every playback state transition. More...
|
| |
| void | register_ready_callback (ReadyCallback &&ready_callback) override |
| | Registers a callback fired once the database is open and parsed. More...
|
| |
| void | register_finish_callback (FinishCallback &&finish_callback) override |
| | Registers a callback fired when playback ends naturally or is interrupted. More...
|
| |
| void | register_output_callback (OutputCallback &&output_callback) override |
| | Registers the message-delivery callback consumed during playback. More...
|
| |
| void | play (const Config &config) override |
| | Starts playback with the given configuration. More...
|
| |
| void | stop () override |
| | Stops playback and rewinds to the recording start. More...
|
| |
| void | pause () override |
| | Pauses playback at the current position. More...
|
| |
| void | resume () override |
| | Resumes paused playback from the current position. More...
|
| |
| void | pause_to_next () override |
| | Emits one more message and then pauses again. More...
|
| |
| 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. More...
|
| |
| std::future< bool > | check () override |
| | Verifies the integrity of the SQLite bag file asynchronously. More...
|
| |
| std::future< bool > | reindex () override |
| | Rebuilds the SQLite index tables asynchronously. More...
|
| |
| std::future< bool > | fix (bool rebuild=false) override |
| | Repairs a corrupt SQLite bag file asynchronously. More...
|
| |
| void | tag (const std::string &tag_name) override |
| | Updates the tag column in the metadata table. More...
|
| |
| int64_t | get_timestamp () const override |
| | Returns the current playback cursor in milliseconds. More...
|
| |
| int64_t | get_real_timestamp () const override |
| | Returns the timestamp of the last delivered message. More...
|
| |
| Status | get_status () const override |
| | Returns the playback status. More...
|
| |
| const Info & | get_info () const override |
| | Returns the bag metadata populated when the file was opened. More...
|
| |
| std::vector< SchemaData > | detect_schema () override |
| | Enumerates every schema embedded in the schemas table. More...
|
| |
| bool | is_split_mode () const override |
| | Reports whether the bag is split across multiple .vdb files. More...
|
| |
| int | get_split_index () const override |
| | Returns the index of the split part currently under playback. More...
|
| |
| bool | is_jumping () const override |
| | Reports whether a jump() seek is currently being processed. More...
|
| |
| | BagReader (const std::string &path, bool read_only=true, bool try_to_fix=false) |
| | Constructs the base reader and stores construction-time options. More...
|
| |
| virtual | ~BagReader () |
| | Stops the loop, closes the file and releases backend resources. More...
|
| |
| virtual void | clear_plugin_interface () |
| | Detaches the currently bound plugin, if any. More...
|
| |
| bool | open_cursor (const Config &config) |
| | Opens (or rewinds) a synchronous sequential read cursor over the bag. More...
|
| |
| bool | open_cursor () |
| | Opens (or rewinds) a full, unfiltered sequential read cursor over the bag. More...
|
| |
| bool | read_next (Frame &out) |
| | Reads the next frame in recorded order into out. More...
|
| |
| BagReader & | operator>> (Frame &out) |
| | Stream-style alias for read_next(), enabling while (reader >> frame). More...
|
| |
| bool | eof () const noexcept |
| | Returns whether the cursor has reached the end of the bag. More...
|
| |
| bool | fail () const noexcept |
| | Returns whether the last cursor operation failed (open or backend read error). More...
|
| |
| | operator bool () const noexcept |
| | Reports whether the cursor is still in a readable state (not at end, not failed). More...
|
| |
| virtual std::string | get_ser_type (const std::string &url) const |
| | Resolves the serialisation type associated with url. More...
|
| |
| virtual SchemaType | get_schema_type (const std::string &url) const |
| | Resolves the schema family associated with url. More...
|
| |
| | MessageLoop () |
| | Constructs a loop with the default kNormalType queue. More...
|
| |
| | MessageLoop (Type type) |
| | Constructs a loop with the given queue type. More...
|
| |
| virtual | ~MessageLoop () |
| | Destructor; requests quit and joins the dispatcher thread if needed. More...
|
| |
| void | set_name (const std::string &name) |
| | Sets a human-readable name visible to profiling tools. More...
|
| |
| const std::string & | get_name () const |
| | Returns the loop name set via set_name. More...
|
| |
| Type | get_type () const |
| | Returns the queue type this loop was constructed with. More...
|
| |
| Strategy | get_strategy () const |
| | Returns the active back-pressure strategy. More...
|
| |
| void | set_strategy (Strategy strategy) |
| | Replaces the back-pressure strategy. More...
|
| |
| void | register_begin_handler (Callback &&callback) |
| | Registers a callback fired once at loop thread startup. More...
|
| |
| void | register_end_handler (Callback &&callback) |
| | Registers a callback fired once when the loop thread exits. More...
|
| |
| void | register_idle_handler (Callback &&callback) |
| | Registers a callback fired every time the queue becomes empty. More...
|
| |
| bool | run () |
| | Runs the loop on the calling thread until quit is requested. More...
|
| |
| bool | async_run () |
| | Starts the loop on a new background thread. More...
|
| |
| bool | spin () |
| | Alias of run blocking the calling thread. More...
|
| |
| bool | spin_once (bool block=true) |
| | Processes one batch of pending tasks and timers on the calling thread. More...
|
| |
| bool | quit (bool force=false) |
| | Requests the loop to exit. More...
|
| |
| bool | wait_for_quit (int ms=Timer::kInfinite, bool check=true) |
| | Waits until the loop has fully exited. More...
|
| |
| bool | post_task (Callback &&callback) |
| | Posts a task for execution on the loop thread. More...
|
| |
| TaskHandle | post_task_handle (Callback &&callback, const PostTaskOptions &options={}) |
| | Tracked variant of post_task returning a TaskHandle. More...
|
| |
| bool | post_task_with_priority (Callback &&callback, uint16_t priority) |
| | Posts a task with an explicit priority on a kPriorityType loop. More...
|
| |
| TaskHandle | post_task_with_priority_handle (Callback &&callback, uint16_t priority, const PostTaskOptions &options={}) |
| | Tracked variant of post_task_with_priority returning a TaskHandle. More...
|
| |
| template<typename CallbackT , typename = std::enable_if_t<!std::is_convertible_v<CallbackT, Schedule::RetCallback>>> |
| Schedule::Status | exec_task (const Schedule::Config &config, CallbackT &&callback) |
| | Schedules a void-returning callable and returns a chainable Schedule::Status. More...
|
| |
| template<typename CallbackT , typename = std::enable_if_t<std::is_convertible_v<CallbackT, Schedule::RetCallback>>> |
| Schedule::RetStatus | exec_task (const Schedule::Config &config, CallbackT &&callback) |
| | Schedules a bool-returning callable and returns a chainable Schedule::RetStatus. More...
|
| |
| bool | wakeup () |
| | Wakes the loop thread if it is suspended in its idle wait. More...
|
| |
| void | reset_lockfree_capacity () |
| | Recreates the lock-free queue, clearing all queued tasks and counters. More...
|
| |
| bool | is_running () const |
| | Reports whether the loop is currently running. More...
|
| |
| bool | is_ready_to_quit () const |
| | Reports whether quit has been requested and the loop is winding down. More...
|
| |
| bool | is_busy () const |
| | Reports whether the loop is currently executing a task. More...
|
| |
| size_t | get_task_count () const |
| | Returns the current pending task count. More...
|
| |
| virtual bool | wait_for_idle (int ms=Timer::kInfinite, bool check=true) |
| | Waits until the loop has drained its queue and is not executing a task. More...
|
| |
| virtual size_t | get_max_timer_count () const |
| | Returns the maximum number of timers that can be attached. More...
|
| |
| virtual uint32_t | get_max_elapsed_time () const |
| | Returns the maximum allowed task execution time in milliseconds. More...
|
| |
| virtual bool | is_in_same_thread () const |
| | Reports whether the calling thread is owned by this loop. More...
|
| |
| std::shared_ptr< AliveState > | get_alive_state () const |
| | Returns the shared lifetime flag used by cross-thread bridges. More...
|
| |
| template<class FunctionT , class... ArgsT, typename ResultT = std::invoke_result_t<FunctionT, ArgsT...>> |
| std::future< ResultT > | invoke_task (FunctionT &&function, ArgsT &&... args) |
| | Dispatches a callable to the loop thread and returns a std::future for the result. More...
|
| |
| template<class FunctionT , class... ArgsT, typename ResultT = std::invoke_result_t<FunctionT, ArgsT...>> |
| std::future< ResultT > | invoke_task_with_priority (FunctionT &&function, uint16_t priority, ArgsT &&... args) |
| | Priority variant of invoke_task; requires a kPriorityType loop. More...
|
| |
|
| enum | Status : uint8_t { kStopped = 0
, kPaused = 1
, kPlaying = 2
} |
| | Coarse playback state observable through get_status(). More...
|
| |
| using | OutputCallback = FrameCallback |
| | Callback signature receiving one replayed Frame. More...
|
| |
| using | StatusCallback = MoveFunction< void(Status status)> |
| | Callback fired on every transition of Status. More...
|
| |
| using | ReadyCallback = MoveFunction< void()> |
| | Callback fired once after the bag has been opened and indexed. More...
|
| |
| using | FinishCallback = MoveFunction< void(bool is_interrupted)> |
| | Callback fired when the current play session ends. More...
|
| |
| enum | Type : uint8_t { kNormalType = 0
, kLockfreeType = 1
, kPriorityType = 2
} |
| | Internal queue implementation type. More...
|
| |
| enum | Strategy : uint8_t { kOptimizationStrategy = 0
, kPopStrategy = 1
, kBlockStrategy = 2
} |
| | Back-pressure strategy applied when the bounded queue is at capacity. More...
|
| |
| enum | Priority : uint16_t {
kNoPriority = 0
, kLowestPriority = 1
, kTimerPriority = 50
, kNormalPriority = 100
,
kHighestPriority = std::numeric_limits<uint16_t>::max()
} |
| | Built-in priority levels for kPriorityType loops; higher values dispatch first. More...
|
| |
| using | Callback = MoveFunction< void()> |
| | Callback type for tasks and event handlers. More...
|
| |
| static std::shared_ptr< BagReader > | create (const std::string &path, bool read_only=true, bool try_to_fix=false) |
| | Builds the concrete reader matching the extension of path. More...
|
| |
| static constexpr int | kInfinite {-1} |
| | Sentinel for Config::times that requests endless loop playback. More...
|
| |
| static void | rebuild_url_meta_maps (const std::vector< Info::UrlMeta > &url_metas, std::unordered_map< std::string, std::string > &ser_map, std::unordered_map< std::string, SchemaType > &schema_type_map) |
| |
| static ActionType | convert_action (std::string_view str) |
| |
Concrete SQLite-backed BagReader implementation with full random-access support.
Prefer BagReader::create() for format-agnostic instantiation; instantiate this class directly only when a SQLite-specific feature is required.