-
Notifications
You must be signed in to change notification settings - Fork 6
/
strmRTSPClient.h
executable file
·63 lines (53 loc) · 1.45 KB
/
strmRTSPClient.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
* strmRTSPClient.h
*
* Created on: Dec 23, 2014
* Author: rayan
*/
#ifndef SRC_STRMRTSPCLIENT_H_
#define SRC_STRMRTSPCLIENT_H_
#include "common.h"
#include "pthread.h"
class StreamClientState {
public:
StreamClientState(){
iter = NULL;
m_pSession = NULL;
m_pSubsession = NULL;
m_streamTimerTask = NULL;
m_duration = 0.0;
}
virtual ~StreamClientState() {
safeDelete(iter);
if(m_pSession) {
UsageEnvironment& env = m_pSession->envir();
env.taskScheduler().unscheduleDelayedTask(m_streamTimerTask);
Medium::close(m_pSession);
}
}
public:
MediaSubsessionIterator* iter;
MediaSession* m_pSession;
MediaSubsession* m_pSubsession;
TaskToken m_streamTimerTask;
TaskToken m_arrivalCheckTimerTask;
double m_duration;
};
class strmRTSPClient: public RTSPClient {
public:
static strmRTSPClient* createNew(UsageEnvironment& env, char const* rtspURL, int nIpcID, void* pStreamObj,
int verbosityLevel = 0,
char const* applicationName = NULL,
portNumBits tunnelOverHTTPPortNum = 0);
protected:
strmRTSPClient(UsageEnvironment& env, char const* rtspURL, int nIpcID, void* pStreamObj,
int verbosityLevel, char const* applicationName, portNumBits tunnelOverHTTPPortNum);
// called only by createNew();
virtual ~strmRTSPClient();
public:
StreamClientState m_scs;
int m_nIpcID;
void* m_pStreamObj;
//char m_eventLoopWatchVariable;
};
#endif /* SRC_STRMRTSPCLIENT_H_ */