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 "../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 UInt32Type;
19 using UInt32Builder = NumericBuilder<UInt32Type>;
20} // namespace arrow
21
22namespace rerun::components {
23 /// **Component**: The codec used to encode video stored in `components::VideoSample`.
24 ///
25 /// Support of these codecs by the Rerun Viewer is platform dependent.
26 /// For more details see check the [video reference](https://rerun.io/docs/reference/video).
27 ///
28 /// ⚠ **This type is _unstable_ and may change significantly in a way that the data won't be backwards compatible.**
29 ///
30 enum class VideoCodec : uint32_t {
31
32 /// Advanced Video Coding (AVC/H.264)
33 ///
34 /// See <https://en.wikipedia.org/wiki/Advanced_Video_Coding>
35 ///
36 /// `components::VideoSample`s using this codec should be formatted according to Annex B specification.
37 /// (Note that this is different from AVCC format found in MP4 files.
38 /// To learn more about Annex B, check for instance <https://membrane.stream/learn/h264/3>)
39 /// Key frames (IDR) require inclusion of a SPS (Sequence Parameter Set)
40 ///
41 /// Enum value is the fourcc for 'avc1' (the WebCodec string assigned to this codec) in big endian.
42 H264 = 0x61766331,
43 };
44} // namespace rerun::components
45
46namespace rerun {
47 template <typename T>
48 struct Loggable;
49
50 /// \private
51 template <>
52 struct Loggable<components::VideoCodec> {
53 static constexpr std::string_view ComponentType = "rerun.components.VideoCodec";
54
55 /// Returns the arrow data type this type corresponds to.
56 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
57
58 /// Serializes an array of `rerun::components::VideoCodec` into an arrow array.
59 static Result<std::shared_ptr<arrow::Array>> to_arrow(
60 const components::VideoCodec* instances, size_t num_instances
61 );
62
63 /// Fills an arrow array builder with an array of this type.
64 static rerun::Error fill_arrow_array_builder(
65 arrow::UInt32Builder* builder, const components::VideoCodec* elements,
66 size_t num_elements
67 );
68 };
69} // 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:30
@ 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