|
Rerun C++ SDK
|
Archetype: A video binary. More...
#include <rerun/archetypes/asset_video.hpp>
Public Member Functions | |
| Result< std::vector< std::chrono::nanoseconds > > | read_frame_timestamps_nanos () const |
| Determines the presentation timestamps of all frames inside the video. | |
| Result< std::vector< std::chrono::nanoseconds > > | read_frame_timestamps_ns () const |
DEPRECATED: Use read_frame_timestamps_nanos instead. | |
| AssetVideo (AssetVideo &&other)=default | |
| AssetVideo (const AssetVideo &other)=default | |
| AssetVideo & | operator= (const AssetVideo &other)=default |
| AssetVideo & | operator= (AssetVideo &&other)=default |
| AssetVideo (rerun::components::Blob _blob) | |
| AssetVideo | with_blob (const rerun::components::Blob &_blob) && |
| The asset's bytes. | |
| AssetVideo | with_many_blob (const Collection< rerun::components::Blob > &_blob) && |
This method makes it possible to pack multiple blob in a single component batch. | |
| AssetVideo | with_media_type (const rerun::components::MediaType &_media_type) && |
| The Media Type of the asset. | |
| AssetVideo | with_many_media_type (const Collection< rerun::components::MediaType > &_media_type) && |
This method makes it possible to pack multiple media_type in a single component batch. | |
| Collection< ComponentColumn > | columns (const Collection< uint32_t > &lengths_) |
| Partitions the component data into multiple sub-batches. | |
| Collection< ComponentColumn > | columns () |
| Partitions the component data into unit-length sub-batches. | |
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. | |
| static AssetVideo | update_fields () |
Update only some specific fields of a AssetVideo. | |
| static AssetVideo | clear_fields () |
Clear all the fields of a AssetVideo. | |
Public Attributes | |
| std::optional< ComponentBatch > | blob |
| The asset's bytes. | |
| std::optional< ComponentBatch > | media_type |
| The Media Type of the asset. | |
Static Public Attributes | |
| static constexpr const char | ArchetypeName [] = "rerun.archetypes.AssetVideo" |
The name of the archetype as used in ComponentDescriptors. | |
| static constexpr auto | Descriptor_blob |
ComponentDescriptor for the blob field. | |
| static constexpr auto | Descriptor_media_type |
ComponentDescriptor for the media_type field. | |
Archetype: A video binary.
Only MP4 containers are currently supported.
See https://rerun.io/docs/reference/video for codec support and more general information.
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_nanos | ( | ) | 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 |
This method makes it possible to pack multiple blob in a single component batch.
This only makes sense when used in conjunction with columns. with_blob should be used when logging a single row's worth of data.
|
inline |
The Media Type of the asset.
Supported values:
video/mp4If omitted, the viewer will try to guess from the data blob. If it cannot guess, it won't be able to render the asset.
|
inline |
This method makes it possible to pack multiple media_type in a single component batch.
This only makes sense when used in conjunction with columns. with_media_type should be used when logging a single row's worth of data.
| Collection< ComponentColumn > rerun::archetypes::AssetVideo::columns | ( | const Collection< uint32_t > & | lengths_ | ) |
Partitions the component data into multiple sub-batches.
Specifically, this transforms the existing ComponentBatch data into ComponentColumns instead, via ComponentBatch::partitioned.
This makes it possible to use RecordingStream::send_columns to send columnar data directly into Rerun.
The specified lengths must sum to the total length of the component batch.
| Collection< ComponentColumn > rerun::archetypes::AssetVideo::columns | ( | ) |
Partitions the component data into unit-length sub-batches.
This is semantically similar to calling columns with std::vector<uint32_t>(n, 1), where n is automatically guessed.
| std::optional<ComponentBatch> rerun::archetypes::AssetVideo::media_type |
The Media Type of the asset.
Supported values:
video/mp4If 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 |
ComponentDescriptor for the blob field.
|
staticconstexpr |
ComponentDescriptor for the media_type field.