-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathRTMPRec.h
More file actions
50 lines (40 loc) · 705 Bytes
/
Copy pathRTMPRec.h
File metadata and controls
50 lines (40 loc) · 705 Bytes
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
49
50
/*
* RTMPRec.h
*
* Created on: Jan 11, 2017
* Author: tla001
*/
#ifndef RTMPREC_H_
#define RTMPREC_H_
#include <QThread>
extern "C"{
#include <stdio.h>
#include <stdlib.h>
}
#include <iostream>
#include <string>
#include "librtmp/rtmp.h"
#include "librtmp/log.h"
using namespace std;
class RTMPRec :public QThread{
public:
explicit RTMPRec();
virtual ~RTMPRec();
int init(const string url,const string filename);
void run();
void worker();
void doSave();
void doStop();
private:
string rtmpUrl;
string outFile;
int bufSize;
char *buf;
FILE *fp;
long countSize;
bool b_live_stream;
RTMP *rtmp;
bool stopFlag;
bool runFlag;
};
#endif /* RTMPREC_H_ */