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_sdk_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 /// AOMedia Video 1 (AV1)
33 ///
34 /// See <https://en.wikipedia.org/wiki/AV1>
35 ///
36 /// `components::VideoSample`s using this codec should be formatted according the "Low overhead bitstream format",
37 /// as specified in Section 5.2 of the [AV1 specification](https://aomediacodec.github.io/av1-spec/#low-overhead-bitstream-format).
38 /// Each sample should be formatted as a sequence of OBUs (Open Bitstream Units) long enough to decode at least one video frame.
39 /// Samples containing keyframes must include a sequence header OBU before the `KEY_FRAME` OBU to enable
40 /// extraction of frame dimensions, bit depth, and color information. `INTRA_ONLY` frames are not treated
41 /// as keyframes since they may reference existing decoder state.
42 ///
43 /// Enum value is the fourcc for 'av01' (the WebCodec string assigned to this codec) in big endian.
44 AV1 = 0x61763031,
45
46 /// Advanced Video Coding (AVC/H.264)
47 ///
48 /// See <https://en.wikipedia.org/wiki/Advanced_Video_Coding>
49 ///
50 /// `components::VideoSample`s using this codec should be formatted according to Annex B specification.
51 /// (Note that this is different from AVCC format found in MP4 files.
52 /// To learn more about Annex B, check for instance <https://membrane.stream/learn/h264/3>)
53 /// Key frames (IDR) require inclusion of a SPS (Sequence Parameter Set)
54 ///
55 /// Enum value is the fourcc for 'avc1' (the WebCodec string assigned to this codec) in big endian.
56 H264 = 0x61766331,
57
58 /// High Efficiency Video Coding (HEVC/H.265)
59 ///
60 /// See <https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding>
61 ///
62 /// `components::VideoSample`s using this codec should be formatted according to Annex B specification.
63 /// (Note that this is different from AVCC format found in MP4 files.
64 /// To learn more about Annex B, check for instance <https://membrane.stream/learn/h264/3>)
65 /// Key frames (IRAP) require inclusion of a SPS (Sequence Parameter Set)
66 ///
67 /// Enum value is the fourcc for 'hev1' (the WebCodec string assigned to this codec) in big endian.
68 H265 = 0x68657631,
69 };
70} // namespace rerun::components
71
72namespace rerun {
73 template <typename T>
74 struct Loggable;
75
76 /// \private
77 template <>
78 struct Loggable<components::VideoCodec> {
79 static constexpr std::string_view ComponentType = "rerun.components.VideoCodec";
80
81 /// Returns the arrow data type this type corresponds to.
82 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
83
84 /// Serializes an array of `rerun::components::VideoCodec` into an arrow array.
85 static Result<std::shared_ptr<arrow::Array>> to_arrow(
86 const components::VideoCodec* instances, size_t num_instances
87 );
88
89 /// Fills an arrow array builder with an array of this type.
90 static rerun::Error fill_arrow_array_builder(
91 arrow::UInt32Builder* builder, const components::VideoCodec* elements,
92 size_t num_elements
93 );
94 };
95} // namespace rerun
Status outcome object (success or error) returned for fallible operations.
Definition error.hpp:103
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
@ H265
High Efficiency Video Coding (HEVC/H.265)
@ H264
Advanced Video Coding (AVC/H.264)
@ AV1
AOMedia Video 1 (AV1)
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:23