forked from jnohlgard/python-v4l2capture
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnamedpipeout.h
45 lines (32 loc) · 873 Bytes
/
namedpipeout.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
#ifndef MFVIDEOOUT_H
#define MFVIDEOOUT_H
#include <Windows.h>
#include <vector>
#include <string>
#include "base.h"
class NamedPipeOut : public Base_Video_Out
{
public:
NamedPipeOut(const char *devName);
virtual ~NamedPipeOut();
void SendFrame(const char *imgIn, unsigned imgLen, const char *pxFmt, int width, int height,
unsigned long tv_sec = 0,
unsigned long tv_usec = 0);
void Stop();
int WaitForStop();
virtual void SetOutputSize(int width, int height);
virtual void SetOutputPxFmt(const char *fmt);
void Run();
unsigned char *currentFrame;
unsigned currentFrameAlloc;
unsigned currentFrameLen;
unsigned currentFrameWidth, currentFrameHeight;
void Lock();
void UnLock();
protected:
int running;
CRITICAL_SECTION lock;
};
void *NamedPipeOut_Worker_thread(void *arg);
std::vector<std::string> List_out_devices();
#endif //MFVIDEOOUT_H