Rerun C++ SDK
Loading...
Searching...
No Matches
video_codec.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/components/video_codec.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 UInt8Type;
20 using UInt8Builder = NumericBuilder<UInt8Type>;
21} // namespace arrow
22
23namespace rerun::components {
24 /// **Component**: The codec used to encode video stored in `components::VideoSample`.
25 ///
26 /// Support of these codecs by the Rerun Viewer is platform dependent.
27 /// For more details see check the [video reference](https://rerun.io/docs/reference/video).
28 ///
29 /// ⚠ **This type is _unstable_ and may change significantly in a way that the data won't be backwards compatible.**
30 ///
31 enum class VideoCodec : uint8_t {
32
33 /// Advanced Video Coding (AVC/H.264)
34 ///
35 /// See <https://en.wikipedia.org/wiki/Advanced_Video_Coding>
36 ///
37 /// `components::VideoSample`s using this codec should be formatted according to Annex B specification.
38 /// (Note that this is different from AVCC format found in MP4 files.
39 /// To learn more about Annex B, check for instance <https://membrane.stream/learn/h264/3>)
40 /// Key frames (IDR) require inclusion of a SPS (Sequence Parameter Set)
41 H264 = 1,
42 };
43} // namespace rerun::components
44
45namespace rerun {
46 template <typename T>
47 struct Loggable;
48
49 /// \private
50 template <>
51 struct Loggable<components::VideoCodec> {
52 static constexpr ComponentDescriptor Descriptor = "rerun.components.VideoCodec";
53
54 /// Returns the arrow data type this type corresponds to.
55 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
56
57 /// Serializes an array of `rerun::components::VideoCodec` into an arrow array.
58 static Result<std::shared_ptr<arrow::Array>> to_arrow(
59 const components::VideoCodec* instances, size_t num_instances
60 );
61
62 /// Fills an arrow array builder with an array of this type.
63 static rerun::Error fill_arrow_array_builder(
64 arrow::UInt8Builder* builder, const components::VideoCodec* elements,
65 size_t num_elements
66 );
67 };
68} // namespace rerun
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:99
All built-in components. See Types in the Rerun manual.
Definition rerun.hpp:79
VideoCodec
Component: The codec used to encode video stored in components::VideoSample.
Definition video_codec.hpp:31
@ H264
Advanced Video Coding (AVC/H.264)
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:23