forked from MarkusEh/vdr-plugin-live
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgrab.h
41 lines (27 loc) · 749 Bytes
/
grab.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef VDR_LIVE_GRAB_H
#define VDR_LIVE_GRAB_H
#include "stdext.h"
#include <memory>
namespace vdrlive {
typedef std::shared_ptr<char> GrabImagePtr;
typedef std::pair<GrabImagePtr, int> GrabImageInfo;
class GrabImageTask;
class GrabImageManager
{
friend GrabImageManager& LiveGrabImageManager();
friend class GrabImageTask;
public:
bool CanGrab() const;
GrabImageInfo GetImage() const;
private:
GrabImageManager();
GrabImageManager( GrabImageManager const& );
GrabImageManager& operator=( GrabImageManager const& );
void PutImage( char* image, int size );
std::unique_ptr<GrabImageTask> m_task;
GrabImagePtr m_image;
int m_size;
};
GrabImageManager& LiveGrabImageManager();
} // namespace vdrlive
#endif // VDR_LIVE_GRAB_H