Rerun C++ SDK
|
Archetype: A video binary. More...
#include <rerun/archetypes/asset_video.hpp>
Public Types | |
using | IndicatorComponent = rerun::components::IndicatorComponent< IndicatorComponentName > |
Indicator component, used to identify the archetype when converting to a list of components. | |
Public Member Functions | |
Result< std::vector< std::chrono::nanoseconds > > | read_frame_timestamps_ns () const |
Determines the presentation timestamps of all frames inside the video. | |
AssetVideo (AssetVideo &&other)=default | |
AssetVideo (rerun::components::Blob _blob) | |
AssetVideo | with_media_type (rerun::components::MediaType _media_type) && |
The Media Type of the asset. | |
Static Public Member Functions | |
static Result< AssetVideo > | from_file (const std::filesystem::path &path) |
Creates a new AssetVideo from the file contents at path . | |
static AssetVideo | from_bytes (rerun::Collection< uint8_t > bytes, std::optional< rerun::components::MediaType > media_type={}) |
Creates a new AssetVideo from the given bytes . | |
Public Attributes | |
rerun::components::Blob | blob |
The asset's bytes. | |
std::optional< rerun::components::MediaType > | media_type |
The Media Type of the asset. | |
Static Public Attributes | |
static constexpr const char | IndicatorComponentName [] |
Archetype: A video binary.
Only MP4 containers with AV1 are generally supported, though the web viewer supports more video codecs, depending on browser.
See https://rerun.io/docs/reference/video for details of what is and isn't supported.
In order to display a video, you also need to log a archetypes::VideoFrameReference
for each frame.
|
static |
Creates a new AssetVideo
from the file contents at path
.
The MediaType
will be guessed from the file extension.
If no MediaType
can be guessed at the moment, the Rerun Viewer will try to guess one from the data at render-time. If it can't, rendering will fail with an error.
|
inlinestatic |
Creates a new AssetVideo
from the given bytes
.
If no MediaType
is specified, the Rerun Viewer will try to guess one from the data at render-time. If it can't, rendering will fail with an error.
Result< std::vector< std::chrono::nanoseconds > > rerun::archetypes::AssetVideo::read_frame_timestamps_ns | ( | ) | const |
Determines the presentation timestamps of all frames inside the video.
Returned timestamps are in nanoseconds since start and are guaranteed to be monotonically increasing.
|
inline |
The Media Type of the asset.
Supported values:
video/mp4
If omitted, the viewer will try to guess from the data blob. If it cannot guess, it won't be able to render the asset.
std::optional<rerun::components::MediaType> rerun::archetypes::AssetVideo::media_type |
The Media Type of the asset.
Supported values:
video/mp4
If omitted, the viewer will try to guess from the data blob. If it cannot guess, it won't be able to render the asset.
|
staticconstexpr |