Digital Barriers
Digital Barriers EdgeVis Decoder SDK
Loading...
Searching...
No Matches
YCbCrFrame.h
Go to the documentation of this file.
1
2// Copyright (c) 2016 Digital Barriers
4
28
29#pragma once
30
31#include "VideoData.h"
32#include "EdgeVisSDK.h"
33#include "Pimpl.h"
34
35namespace EdgeVisDecoderSDK
36{
37 class YCbCrFrameImpl;
38
39 class YCbCrFrame : public VideoData
40 {
41 public:
42 DB_EDGEVIS_SDK YCbCrFrame();
43
44 YCbCrFrame(std::weak_ptr<YCbCrFrameImpl> pimpl);
45
46 DB_EDGEVIS_SDK YCbCrFrame(StreamData data);
47
48 DB_EDGEVIS_SDK YCbCrFrame(const YCbCrFrame& data);
49
50 DB_EDGEVIS_SDK YCbCrFrame( YCbCrFrame&& frame );
51
52 DB_EDGEVIS_SDK YCbCrFrame& operator=( const YCbCrFrame& frame );
53
54 DB_EDGEVIS_SDK YCbCrFrame& operator=( YCbCrFrame&& frame );
55
56 DB_EDGEVIS_SDK virtual ~YCbCrFrame();
57
58 public:
59
68 DB_EDGEVIS_SDK bool SetDimensions(int32_t width, int32_t height);
69
78 DB_EDGEVIS_SDK bool ReSize(int32_t width, int32_t height);
79
87 DB_EDGEVIS_SDK bool ReSizeCopy(const YCbCrFrame& frame, int32_t width, int32_t height);
88
94 DB_EDGEVIS_SDK void Copy(const YCbCrFrame & frame);
95
101 void CopyFramePropertiesOnly(const YCbCrFrame& frame);
102
113 DB_EDGEVIS_SDK int64_t GetTimeStamp() const;
114 void SetTimeStamp(int64_t ts);
115
121 DB_EDGEVIS_SDK byte_array GetYPlane() const;
122
128 DB_EDGEVIS_SDK int32_t GetYPlaneDataSize() const;
129
136 DB_EDGEVIS_SDK bool GetYPlaneData(byte_array& data) const;
137
143 DB_EDGEVIS_SDK int32_t GetYPlaneStride() const;
144
150 DB_EDGEVIS_SDK byte_array GetCbPlane() const;
151
157 DB_EDGEVIS_SDK int32_t GetCbPlaneDataSize() const;
158
164 DB_EDGEVIS_SDK int32_t GetCbPlaneStride() const;
165
172 DB_EDGEVIS_SDK bool GetCbPlaneData(byte_array& data) const;
173
179 DB_EDGEVIS_SDK byte_array GetCrPlane() const;
180
186 DB_EDGEVIS_SDK int32_t GetCrPlaneDataSize() const;
187
193 DB_EDGEVIS_SDK int32_t GetCrPlaneStride() const;
194
201 DB_EDGEVIS_SDK bool GetCrPlaneData(byte_array& data) const;
202
206 DB_EDGEVIS_SDK void CorrectAspectRatio();
207
211 DB_EDGEVIS_SDK void ResetToBlack();
212
216 DB_EDGEVIS_SDK void ResetToGrey();
217
221 DB_EDGEVIS_SDK void Save(const std::string& path) const;
222 };
223}
This is the base class for the StreamData objects.
Definition StreamData.h:28
DB_EDGEVIS_SDK byte_array GetCbPlane() const
Returns the byte array containing the Cb plane.
DB_EDGEVIS_SDK bool GetCbPlaneData(byte_array &data) const
Retrieve byte array containing the Cb plane.
DB_EDGEVIS_SDK byte_array GetCrPlane() const
Returns the byte array containing the Cr plane.
DB_EDGEVIS_SDK void CorrectAspectRatio()
Will correct the aspect ratio of the image.
DB_EDGEVIS_SDK void Save(const std::string &path) const
Save the YCbCrFrame to a Y4M file with the supplied file path.
DB_EDGEVIS_SDK bool ReSize(int32_t width, int32_t height)
Set the size of the frame and scale the content.
DB_EDGEVIS_SDK void ResetToBlack()
Will reset the frame to black.
DB_EDGEVIS_SDK int32_t GetCbPlaneStride() const
Returns the stride of the Cb plane.
DB_EDGEVIS_SDK bool GetCrPlaneData(byte_array &data) const
Retrieve byte array containing the Cr plane.
DB_EDGEVIS_SDK int32_t GetYPlaneStride() const
Returns the stride of the Y plane.
DB_EDGEVIS_SDK int32_t GetCrPlaneStride() const
Returns the stride of the Cr plane.
DB_EDGEVIS_SDK int32_t GetCrPlaneDataSize() const
Returns the size the Cr plane buffer.
DB_EDGEVIS_SDK bool SetDimensions(int32_t width, int32_t height)
Set the size of the frame witihout scaling the content.
DB_EDGEVIS_SDK void ResetToGrey()
Will reset the planes to return a grey image.
DB_EDGEVIS_SDK bool ReSizeCopy(const YCbCrFrame &frame, int32_t width, int32_t height)
Resize a frame, then copy (and scale) from.
DB_EDGEVIS_SDK int32_t GetCbPlaneDataSize() const
Returns the size the Cb plane buffer.
DB_EDGEVIS_SDK void Copy(const YCbCrFrame &frame)
Copy the content and properties from another frame to this one.
DB_EDGEVIS_SDK int64_t GetTimeStamp() const
Return the timestamp of the image.
void CopyFramePropertiesOnly(const YCbCrFrame &frame)
Copy only the properties from another frame to this one.
DB_EDGEVIS_SDK int32_t GetYPlaneDataSize() const
Returns the size the Y plane buffer.
DB_EDGEVIS_SDK bool GetYPlaneData(byte_array &data) const
Retrieve byte array containing the Y plane.
DB_EDGEVIS_SDK byte_array GetYPlane() const
Returns the byte array containing the Y plane.
The EdgeVis Decoder SDK namespace.