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 /// High Efficiency Video Coding (HEVC/H.265)
45 ///
46 /// See <https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding>
47 ///
48 /// `components::VideoSample`s using this codec should be formatted according to Annex B specification.
49 /// (Note that this is different from AVCC format found in MP4 files.
50 /// To learn more about Annex B, check for instance <https://membrane.stream/learn/h264/3>)
51 /// Key frames (IRAP) require inclusion of a SPS (Sequence Parameter Set)
52 ///
53 /// Enum value is the fourcc for 'hev1' (the WebCodec string assigned to this codec) in big endian.
54 H265 = 0x68657631,
55 };
56} // namespace rerun::components
57
58namespace rerun {
59 template <typename T>
60 struct Loggable;
61
62 /// \private
63 template <>
64 struct Loggable<components::VideoCodec> {
65 static constexpr std::string_view ComponentType = "rerun.components.VideoCodec";
66
67 /// Returns the arrow data type this type corresponds to.
68 static const std::shared_ptr<arrow::DataType>& arrow_datatype();
69
70 /// Serializes an array of `rerun::components::VideoCodec` into an arrow array.
71 static Result<std::shared_ptr<arrow::Array>> to_arrow(
72 const components::VideoCodec* instances, size_t num_instances
73 );
74
75 /// Fills an arrow array builder with an array of this type.
76 static rerun::Error fill_arrow_array_builder(
77 arrow::UInt32Builder* builder, const components::VideoCodec* elements,
78 size_t num_elements
79 );
80 };
81} // 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)
All Rerun C++ types and functions are in the rerun namespace or one of its nested namespaces.
Definition rerun.hpp:23