-
Notifications
You must be signed in to change notification settings - Fork 16
/
session.h
68 lines (58 loc) · 1.52 KB
/
session.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
64
65
66
67
/*
* satip: session
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __SESSION_H__
#define __SESSION_H__
#include "config.h"
#include "vtuner.h"
#include "rtsp.h"
#include "rtp.h"
#include "session.h"
#include "option.h"
#include <string>
#include <pthread.h>
class Session
{
public:
virtual void start() = 0;
virtual void run() = 0;
virtual void stop() = 0;
virtual void join() = 0;
virtual ~Session() {};
};
class satipSession:public Session
{
satipConfig* m_satip_config;
satipVtuner* m_satip_vtuner;
satipRTP* m_satip_rtp;
satipRTSP* m_satip_rtsp;
pthread_t m_session_thread;
bool m_running;
void *satipMainLoop();
static void *thread_wrapper(void *ptr);
public:
satipSession(const char* host,
const char* rtsp_port,
int fe_type,
vtunerOpt* m_settings,
int& initok);
virtual ~satipSession();
void start();
void run();
void stop();
void join();
};
#endif // __SESSION_H__