File: grab.h

package info (click to toggle)
vdr-plugin-live 0.3.0%2Bgit20160123-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,604 kB
  • ctags: 1,444
  • sloc: cpp: 5,549; makefile: 160; sh: 129; awk: 39
file content (40 lines) | stat: -rw-r--r-- 758 bytes parent folder | download | duplicates (5)
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
#ifndef VDR_LIVE_GRAB_H
#define VDR_LIVE_GRAB_H

#include "stdext.h"
#include "tasks.h"

namespace vdrlive {

typedef std::tr1::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::auto_ptr< GrabImageTask > m_task;
	GrabImagePtr m_image;
	int m_size;
};

GrabImageManager& LiveGrabImageManager();

} // namespace vdrlive

#endif // VDR_LIVE_GRAB_H