Rerun C++ SDK
Loading...
Searching...
No Matches
video_timestamp.hpp
1// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs
2// Based on "crates/store/re_types/definitions/rerun/datatypes/video_timestamp.fbs".
3
4#pragma once
5
6#include "../component_descriptor.hpp"
7#include "../result.hpp"
8
9#include <cstdint>
10#include <memory>
11
12namespace arrow {
13 /// \private
14 template <typename T>
15 class NumericBuilder;
16
17 class Array;
18 class DataType;
19 class Int64Type;
20 using Int64Builder = NumericBuilder<Int64Type>;
21} // namespace arrow
22
23namespace rerun::datatypes {
24 /// **Datatype**: Presentation timestamp within a `archetypes::AssetVideo`.
25 ///
26 /// Specified in nanoseconds.
27 /// Presentation timestamps are typically measured as time since video start.
29 /// Presentation timestamp value in nanoseconds.
30 int64_t timestamp_ns;
31
32 public:
33 VideoTimestamp() = default;
34
35 VideoTimestamp(int64_t timestamp_ns_) : timestamp_ns(timestamp_ns_) {}
36
37 VideoTimestamp& operator=(int64_t timestamp_ns_) {
38 timestamp_ns = timestamp_ns_;
39 return *this;
40 }
41 };
42} // namespace rerun::datatypes
43
44namespace rerun {
45 template <typename T>
46 struct Loggable;
47
48 /// \private
49 template <>
50 struct Loggable<datatypes::VideoTimestamp> {
51 static constexpr ComponentDescriptor Descriptor = "rerun.datatypes.VideoTimestamp";
52
53 /// Returns the arrow data type this type corresponds to.
54 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
55
56 /// Serializes an array of `rerun::datatypes::VideoTimestamp` into an arrow array.
57 static Result<std::shared_ptr<arrow::Array>> to_arrow(
58 const datatypes::VideoTimestamp* instances, size_t num_instances
59 );
60
61 /// Fills an arrow array builder with an array of this type.
62 static rerun::Error fill_arrow_array_builder(
63 arrow::Int64Builder* builder, const datatypes::VideoTimestamp* elements,
64 size_t num_elements
65 );
66 };
67} // namespace rerun
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:95
All built-in datatypes. See Types in the Rerun manual.
Definition rerun.hpp:83
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:23
Datatype: Presentation timestamp within a archetypes::AssetVideo.
Definition video_timestamp.hpp:28
int64_t timestamp_ns
Presentation timestamp value in nanoseconds.
Definition video_timestamp.hpp:30