| 1 |
#ifndef CVD_INC_SERVERPUSHJPEGFRAME_H |
| 2 |
#define CVD_INC_SERVERPUSHJPEGFRAME_H |
| 3 |
#include <cvd/localvideoframe.h> |
| 4 |
|
| 5 |
namespace CVD |
| 6 |
{ |
| 7 |
|
| 8 |
template <class T> |
| 9 |
class ServerPushJpegBuffer; |
| 10 |
|
| 11 |
template <class T> |
| 12 |
class ServerPushJpegFrame : public LocalVideoFrame<T> |
| 13 |
{ |
| 14 |
friend class CVD::ServerPushJpegBuffer<T>; |
| 15 |
|
| 16 |
public: |
| 17 |
|
| 18 |
const std::string& jpeg() { return image_data; }; |
| 19 |
|
| 20 |
private: |
| 21 |
~ServerPushJpegFrame() |
| 22 |
{ |
| 23 |
} |
| 24 |
|
| 25 |
ServerPushJpegFrame(double time, CVD::Image<T>&& im, const std::string& data) |
| 26 |
: LocalVideoFrame<T>(time, std::move(im)) |
| 27 |
, image_data(data) |
| 28 |
{ |
| 29 |
} |
| 30 |
|
| 31 |
private: |
| 32 |
std::string image_data; |
| 33 |
}; |
| 34 |
|
| 35 |
}; |
| 36 |
|
| 37 |
#endif |