Digital Barriers
Digital Barriers EdgeVis Decoder SDK
Loading...
Searching...
No Matches
RGBFrame.h
Go to the documentation of this file.
1
2// Copyright (c) 2016 Digital Barriers
4
30
31#pragma once
32
33#include "VideoData.h"
34#include "RGBFormats.h"
35#include "EdgeVisSDK.h"
36#include "AspectRatios.h"
37#include "YCbCrFrame.h"
38#include "Pimpl.h"
39
40namespace EdgeVisDecoderSDK
41{
42 class RGBFrameImpl;
43
44 class RGBFrame : public VideoData
45 {
46 public:
47
51 DB_EDGEVIS_SDK RGBFrame();
52 RGBFrame(std::weak_ptr<RGBFrameImpl> pimpl);
53 DB_EDGEVIS_SDK RGBFrame(StreamData data);
54
55 DB_EDGEVIS_SDK virtual ~RGBFrame();
56
72 DB_EDGEVIS_SDK bool Convert(YCbCrFrame & yCbCrFrame, RGBFormat format, bool correctAspect);
73
79 DB_EDGEVIS_SDK int32_t GetBytesPerPel() const;
80
86 DB_EDGEVIS_SDK RGBFormat GetFormat() const;
87
95 void SetHeaderSize(int32_t header_size);
96
103 DB_EDGEVIS_SDK int32_t GetHeaderSize() const;
104
105 void SetFlipVertical(bool flip);
106 DB_EDGEVIS_SDK bool GetFlipVertical() const;
107
108 void SetFlipHorizontal(bool flip);
109 DB_EDGEVIS_SDK bool GetFlipHorizontal() const;
110
119 DB_EDGEVIS_SDK int64_t GetTimeStamp() const;
120
121 void SetTimeStamp(int64_t ts);
122
129 DB_EDGEVIS_SDK byte_array GetBytes() const;
130
136 DB_EDGEVIS_SDK byte_array GetPixelBytes() const;
137
143 DB_EDGEVIS_SDK void Save(const std::string &path) const;
144 };
145}
DB_EDGEVIS_SDK void Save(const std::string &path) const
Save the RGB image to a bmp file location.
DB_EDGEVIS_SDK bool Convert(YCbCrFrame &yCbCrFrame, RGBFormat format, bool correctAspect)
Converts the supplied planar YCbCr frame to an RGBFrame which will be stored in this object.
DB_EDGEVIS_SDK RGBFormat GetFormat() const
Get the RGB format for this RGB frame.
void SetHeaderSize(int32_t header_size)
Set the header size that will be allocated before the rgb frame, this allows platform specific users ...
DB_EDGEVIS_SDK byte_array GetBytes() const
Get a pointer to the byte array representing the entire RGBFrame, including the header.
DB_EDGEVIS_SDK int32_t GetHeaderSize() const
Get the value that has been set for this frame's header size, the default value is 0.
DB_EDGEVIS_SDK byte_array GetPixelBytes() const
Get a pointer to the byte array representing the RGBFrame pixels.
DB_EDGEVIS_SDK int64_t GetTimeStamp() const
Gets the frame's time stamp.
DB_EDGEVIS_SDK int32_t GetBytesPerPel() const
Get the number of bytes per pixel.
DB_EDGEVIS_SDK RGBFrame()
Creates an empty RGBFrame.
This is the base class for the StreamData objects.
Definition StreamData.h:28
An YCbCrFrame is delivered for every frame of video decoded from a media stream.
Definition YCbCrFrame.h:40
RGBFormat
@tyepdef RGB formats supported by the RGBFrame Convert method.
Definition RGBFormats.h:23
The EdgeVis Decoder SDK namespace.