Crate rvideo

Source
Expand description

RVideo crates.io page docs.rs page

Real-time video server for embedded apps.

§What is RVideo

RVideo is a library which solves the problem of streaming video from embedded computer-vision applications. Many of such are headless and do not require a dedicated interface, however it is often useful (especially for developers) to see what is happening on the device. RVideo provides a simple API to stream video from your embedded application to a remote client.

§How does it work

Unlike other streaming solutions, the goal of RVideo is to provide a minimal overhead for an embedded application it is included into:

  • Frames are always sent as-is, usually in RAW formats (it is more than enough for most debugging use-cases)

  • All frames, not received by a client in time, are dropped

  • No any buffering is performed on the server side

  • Real-time-safe code is used to minimize the impact on the main application

§Clients

RVideo streams can be received with clients provided by crate. For ready-to-use UI, see the rvideo-view crate.

§Locking safety

By default, the server uses parking_lot for locking. For real-time applications, the following features are available:

  • locking-rt - use parking_lot_rt crate which is a spin-free fork of parking_lot.

  • locking-rt-safe - use rtsc priority-inheritance locking, which is not affected by priority inversion (Linux only).

Note: to switch locking policy, disable the crate default features.

§About

RVideo is a part of RoboPLC project.

Structs§

BoundingBox
The default bounding box which can be used in custom applications. The bounding box format is also recognized by rvideo-view.
Client
Synchronous client
ClientAsync
Asynchronous client
Frame
Video frame
Server
A server instance. The crate creates a default server, however in some circumstances it might be useful to create a custom one.
Stream
A stream helper object. Contains a stream id and a reference to the server inner object
StreamInfo
Stream information

Enums§

Error
Error type
Format
Video formats. Note: a frame MUST be MANUALLY encoded/compressed with the selected format BEFORE sending

Constants§

API_VERSION
Server API version

Functions§

add_stream
Add a stream to the default server
send_frame
Send frame to the default server with stream id
serve
Serve the default server