-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrec.h
48 lines (34 loc) · 886 Bytes
/
rec.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
42
43
44
45
46
47
48
#ifndef _REC_INC_
#define _REC_INC_
#include <memory>
#include <utility>
namespace vid {
class IFrameReceiver;
class StubFrameReceiver;
class FrameReceiverFactory;
}
#include "streamer.h"
class vid::IFrameReceiver {
public:
typedef std::shared_ptr<IFrameReceiver> pointer;
virtual const Frame get_frame() = 0;
virtual void set_frame(StreamerSPtr) = 0;
};
class vid::StubFrameReceiver : public IFrameReceiver {
public:
virtual const Frame get_frame();
virtual void set_frame(StreamerSPtr);
private:
Frame frame;
};
class vid::FrameReceiverFactory {
public:
enum class Type {
Stub, ///< will always return empty frame
Test, ///< will return one (last) frame to all requesting clients
Real ///< will return new frame (if any) to all requesing clients
};
static IFrameReceiver::pointer make(const Type &t);
};
#include "streamer.h"
#endif