MillicastSDK 2.0.0
Loading...
Searching...
No Matches
metadata.h
Go to the documentation of this file.
1#pragma once
2#include <array>
3#include <memory>
4#include <optional>
5#include <vector>
6
7#include "exports.h"
8namespace millicast {
9
10enum class SeiMessageType {
13};
14
15class SeiUserUnregisteredData;
16class SeiPicTiming;
17
23 public:
27 virtual SeiMessageType type() const = 0;
28
35 return nullptr;
36 }
37
43 virtual SeiPicTiming* sei_pic_timing_message() { return nullptr; }
44
45 virtual ~SeiMessage() = default;
46};
47
52 public:
56 static constexpr unsigned int UUID_SIZE = 16;
57
58 SeiMessageType type() const final;
59
60 SeiUserUnregisteredData* sei_user_unregistered_message() override;
61
66 virtual std::array<uint8_t, UUID_SIZE> uuid() const = 0;
67
72 virtual const std::vector<uint8_t>& user_data() const = 0;
73};
74
80class SeiPicTiming : public SeiMessage {
81 public:
82 SeiMessageType type() const final;
83
84 SeiPicTiming* sei_pic_timing_message() override;
85
89 struct TimeCode {
90 bool full{false};
91 std::optional<uint8_t> seconds;
92 std::optional<uint8_t> minutes;
93 std::optional<uint8_t> hours;
94 };
95
100 virtual std::vector<TimeCode> timecodes() const = 0;
101};
102
107 FrameMetadata() = default;
110 FrameMetadata(const FrameMetadata&) = delete;
112
118 std::vector<std::unique_ptr<SeiMessage>> sei_messages;
119
130};
131
132} // namespace millicast
A common interface class that can be used as a container for Sei Messages.
Definition metadata.h:22
virtual SeiPicTiming * sei_pic_timing_message()
Get the SeiMessage as PicTimingSeiMessage. This will only work if the type of the message is SeiMessa...
Definition metadata.h:43
virtual ~SeiMessage()=default
virtual SeiMessageType type() const =0
virtual SeiUserUnregisteredData * sei_user_unregistered_message()
Get the SeiMessage as UserUnregisteredSeiMessage. This will only work if the type of the message is S...
Definition metadata.h:34
This class is just a shell, it is currently not functional. It represents SEI Pic timing timecode mes...
Definition metadata.h:80
virtual std::vector< TimeCode > timecodes() const =0
Provides the timecode information inside the pic timing message.
SeiMessageType type() const final
Holds a User Data Unregistered Sei message.
Definition metadata.h:51
SeiMessageType type() const final
#define MILLICAST_API
Definition exports.h:51
Definition capabilities.h:15
SeiMessageType
Definition metadata.h:10
Definition error.h:209
Definition metadata.h:106
std::vector< std::unique_ptr< SeiMessage > > sei_messages
H264 Sei Messages extracted from the frame.
Definition metadata.h:118
FrameMetadata(const FrameMetadata &)=delete
FrameMetadata & operator=(FrameMetadata &&)=default
uint32_t rtp_timestamp
This is the rtp timestamp of the frame from which this metadata was extracted. Use this along with Vi...
Definition metadata.h:129
FrameMetadata(FrameMetadata &&)=default
FrameMetadata & operator=(const FrameMetadata &)=delete
Struture describing the time code passed in SeiMessage.
Definition metadata.h:89
std::optional< uint8_t > hours
Definition metadata.h:93
std::optional< uint8_t > seconds
Definition metadata.h:91
std::optional< uint8_t > minutes
Definition metadata.h:92