6#include "../collection.hpp"
7#include "../compiler_utils.hpp"
8#include "../component_batch.hpp"
9#include "../components/blob.hpp"
10#include "../components/media_type.hpp"
11#include "../indicator_component.hpp"
12#include "../result.hpp"
132 static constexpr const char IndicatorComponentName[] =
133 "rerun.components.AssetVideoIndicator";
153 std::optional<rerun::components::MediaType>
media_type = {}
184 RR_WITH_MAYBE_UNINITIALIZED_DISABLED(
return std::move(*
this);)
192 template <
typename T>
197 struct AsComponents<archetypes::AssetVideo> {
199 static Result<std::vector<ComponentBatch>> serialize(
const archetypes::AssetVideo& archetype
Generic collection of elements that are roughly contiguous in memory.
Definition collection.hpp:49
A class for representing either a usable value, or an error.
Definition result.hpp:14
All built-in archetypes. See Types in the Rerun manual.
Definition rerun.hpp:77
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:23
Archetype: A video binary.
Definition asset_video.hpp:118
AssetVideo with_media_type(rerun::components::MediaType _media_type) &&
The Media Type of the asset.
Definition asset_video.hpp:181
rerun::components::Blob blob
The asset's bytes.
Definition asset_video.hpp:120
static AssetVideo from_bytes(rerun::Collection< uint8_t > bytes, std::optional< rerun::components::MediaType > media_type={})
Creates a new AssetVideo from the given bytes.
Definition asset_video.hpp:151
static Result< AssetVideo > from_file(const std::filesystem::path &path)
Creates a new AssetVideo from the file contents at path.
Result< std::vector< std::chrono::nanoseconds > > read_frame_timestamps_ns() const
Determines the presentation timestamps of all frames inside the video.
std::optional< rerun::components::MediaType > media_type
The Media Type of the asset.
Definition asset_video.hpp:129
Component: A binary blob of data.
Definition blob.hpp:17
Indicator component used by archetypes when converting them to component lists.
Definition indicator_component.hpp:32