Search Results

Go to the documentation of this file.
1 // Copyright (c) 2016 Digital Barriers
4 
27 #pragma once
28 
29 #include "VideoData.h"
30 #include "EdgeVisSDK.h"
31 #include "Pimpl.h"
32 #include "AspectRatios.h"
33 #include "YCbCrFrame.h"
34 
35 namespace EdgeVisDecoderSDK
36 {
37  class JPEGFrameImpl;
38 
39  class JPEGFrame : public VideoData
40  {
41  public:
42  DB_EDGEVIS_SDK JPEGFrame();
43  JPEGFrame(std::weak_ptr<JPEGFrameImpl> pimpl);
44  DB_EDGEVIS_SDK JPEGFrame(StreamData data);
45  DB_EDGEVIS_SDK JPEGFrame(const std::wstring& base64jpeg);
46  DB_EDGEVIS_SDK virtual ~JPEGFrame();
47 
48  public:
49 
60  DB_EDGEVIS_SDK int64_t GetTimeStamp() const;
61  void SetTimeStamp(int64_t ts);
62 
68  DB_EDGEVIS_SDK int32_t GetBufferSize() const;
69 
75  DB_EDGEVIS_SDK byte_array GetJPEG() const;
76 
103  DB_EDGEVIS_SDK bool Convert(int32_t width, int32_t height, uint8_t * y_plane, uint8_t * cb_plane, uint8_t * cr_plane, EdgeVisSDKCore::AspectRatio aspect, int64_t ts, int64_t dts, int32_t quality);
104 
117  DB_EDGEVIS_SDK bool Convert(YCbCrFrame & yCbCrFrame, int32_t quality, bool correctAspect);
118 
124  DB_EDGEVIS_SDK std::wstring ToBase64String();
125  };
126 }
DB_EDGEVIS_SDK byte_array GetJPEG() const
Will return the byte_array containing the JPEG data.
AspectRatio
Contains the available aspect ratio types.
Definition: AspectRatios.h:19
An YCbCrFrame is delivered for every frame of video decoded from a media stream.
Definition: YCbCrFrame.h:39
DB_EDGEVIS_SDK bool Convert(int32_t width, int32_t height, uint8_t *y_plane, uint8_t *cb_plane, uint8_t *cr_plane, EdgeVisSDKCore::AspectRatio aspect, int64_t ts, int64_t dts, int32_t quality)
Convert a YCbCr frame to a JPEGFrame.
The VideoData class extends the StreamData class and is a base class for all types of video data prov...
Definition: VideoData.h:35
This is the base class for the StreamData objects.
Definition: StreamData.h:27
DB_EDGEVIS_SDK int64_t GetTimeStamp() const
Will return the timestamp of the JPEG.
DB_EDGEVIS_SDK std::wstring ToBase64String()
Will return a base64 encoded string containting the JPEG frame.
DB_EDGEVIS_SDK int32_t GetBufferSize() const
Will return the length of the byte array representing the JPEG frame.
A JPEGFrame is designed for transforming YCbCr colour space frames into an in memory JPEG frame buffe...
Definition: JPEGFrame.h:39
The EdgeVis Decoder SDK namespace.