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 "../result.hpp"
7
8#include <cstdint>
9#include <memory>
10
11namespace arrow {
12 /// \private
13 template <typename T>
14 class NumericBuilder;
15
16 class Array;
17 class DataType;
18 class Int64Type;
19 using Int64Builder = NumericBuilder<Int64Type>;
20} // namespace arrow
21
22namespace rerun::datatypes {
23 /// **Datatype**: Presentation timestamp within a `archetypes::AssetVideo`.
24 ///
25 /// Specified in nanoseconds.
26 /// Presentation timestamps are typically measured as time since video start.
28 /// Presentation timestamp value in nanoseconds.
29 int64_t timestamp_ns;
30
31 public:
32 VideoTimestamp() = default;
33
34 VideoTimestamp(int64_t timestamp_ns_) : timestamp_ns(timestamp_ns_) {}
35
36 VideoTimestamp& operator=(int64_t timestamp_ns_) {
37 timestamp_ns = timestamp_ns_;
38 return *this;
39 }
40 };
41} // namespace rerun::datatypes
42
43namespace rerun {
44 template <typename T>
45 struct Loggable;
46
47 /// \private
48 template <>
49 struct Loggable<datatypes::VideoTimestamp> {
50 static constexpr const char Name[] = "rerun.datatypes.VideoTimestamp";
51
52 /// Returns the arrow data type this type corresponds to.
53 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
54
55 /// Serializes an array of `rerun::datatypes::VideoTimestamp` into an arrow array.
56 static Result<std::shared_ptr<arrow::Array>> to_arrow(
57 const datatypes::VideoTimestamp* instances, size_t num_instances
58 );
59
60 /// Fills an arrow array builder with an array of this type.
61 static rerun::Error fill_arrow_array_builder(
62 arrow::Int64Builder* builder, const datatypes::VideoTimestamp* elements,
63 size_t num_elements
64 );
65 };
66} // 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:79
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:22
Datatype: Presentation timestamp within a archetypes::AssetVideo.
Definition video_timestamp.hpp:27
int64_t timestamp_ns
Presentation timestamp value in nanoseconds.
Definition video_timestamp.hpp:29