MillicastSDK 1.8.4
Loading...
Searching...
No Matches
frames.h
Go to the documentation of this file.
1#ifndef MILLICAST_API_FRAMES_H
2#define MILLICAST_API_FRAMES_H
3
6
7// video //////////////////////////////////////////////////////////////////////
8
9namespace millicast {
10
16 public:
17 VideoFrame() = default;
18 ~VideoFrame() = default;
19
20 VideoFrame(const VideoFrame&) = delete;
22
28 [[nodiscard]] virtual int width() const = 0;
29
35 [[nodiscard]] virtual int height() const = 0;
36
42 [[nodiscard]] virtual VideoType frame_type() const = 0;
43
51 [[nodiscard]] virtual uint32_t timestamp() const { return 0; };
52
59 [[nodiscard]] virtual PrimaryID primaries() const = 0;
60
66 [[nodiscard]] virtual TransferID transfer() const = 0;
67
73 [[nodiscard]] virtual MatrixID matrix() const = 0;
74
80 [[nodiscard]] virtual RangeID range() const = 0;
81
86 [[nodiscard]] virtual uint32_t size(VideoType type) const = 0;
87
96 virtual void get_buffer(VideoType type, uint8_t* buffer) const = 0;
97};
98
99// audio //////////////////////////////////////////////////////////////////////
100
106 const void* data;
117};
118
119} // namespace millicast
120
121#endif /* FRAMES_H */
The VideoFrame class used to described a VideoFrame.
Definition frames.h:15
virtual uint32_t size(VideoType type) const =0
Get the buffer size for the specified video type.
virtual void get_buffer(VideoType type, uint8_t *buffer) const =0
Get the video frame buffer as the video type specified in parameter.
virtual MatrixID matrix() const =0
Get the color matrix to use for conversion between color spaces.
VideoFrame(const VideoFrame &)=delete
virtual uint32_t timestamp() const
Get the current timestamp of the videoframe. The current system clock should be enough....
Definition frames.h:51
virtual TransferID transfer() const =0
Get the transfer function used for the video frame.
virtual int height() const =0
Get the height of the video frame.
virtual RangeID range() const =0
Get the color range values of the video frame.
virtual int width() const =0
Get the width of the video frame.
virtual VideoType frame_type() const =0
Get the type (ex.: I420) of the video frame.
VideoFrame(VideoFrame &&)=delete
virtual PrimaryID primaries() const =0
Get the standard (ex.: BT709) used for image parameters of the video frame.
#define MILLICAST_API
Definition exports.h:51
Definition capabilities.h:15
VideoType
The VideoType enum represent the pixel format used for video frames.
Definition capabilities.h:21
TransferID
The TransferID enum represents the transfer function used for video frames.
Definition capabilities.h:67
PrimaryID
The PrimaryID enum represents the standard of image parameters used for video frames.
Definition capabilities.h:44
RangeID
The RangeID enum represents the color range values.
Definition capabilities.h:119
MatrixID
The MatrixID enum represents the color matrix to use for conversion between color spaces.
Definition capabilities.h:95
The AudioFrame struct used to described audio data.
Definition frames.h:105
const void * data
Definition frames.h:106
size_t number_of_channels
Definition frames.h:110
int sample_rate
Definition frames.h:109
size_t number_of_frames
Definition frames.h:111
int bits_per_sample
Definition frames.h:107