-
Notifications
You must be signed in to change notification settings - Fork 3
/
source.hh
39 lines (30 loc) · 1.15 KB
/
source.hh
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
#pragma once
#include <FramedSource.hh>
#include <string>
class H265FramedSource: public FramedSource {
public:
static H265FramedSource *createNew(UsageEnvironment& env, unsigned fps,
std::string input_file, std::string result_file);
public:
static EventTriggerId eventTriggerId;
// Note that this is defined here to be a static class variable, because this code is intended to illustrate how to
// encapsulate a *single* device - not a set of devices.
// You can, however, redefine this to be a non-static member variable.
void deliver_frame();
protected:
H265FramedSource(UsageEnvironment& env, unsigned fps, std::string input_file, std::string result_file);
// called only by createNew(), or by subclass constructors
virtual ~H265FramedSource();
private:
// redefined virtual functions:
virtual void doGetNextFrame();
//virtual void doStopGettingFrames(); // optional
private:
static void deliverFrame0(void* clientData);
void deliverFrame();
private:
static unsigned referenceCount; // used to count how many instances of this class currently exist
unsigned fps_;
std::string input_file_;
std::string result_file_;
};