-
Notifications
You must be signed in to change notification settings - Fork 4
/
server.h
54 lines (39 loc) · 1.43 KB
/
server.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
// Copyright (C) 2008 Simon Pantzare
// See COPYING for details.
#ifndef SERVER_H
#define SERVER_H
#include "liveMedia.hh"
#include "BasicUsageEnvironment.hh"
class StreamServerError {};
class StreamServerRunError {};
class StreamServerNameError {};
class StreamServer
{
public:
StreamServer(int port = 8544)
throw(StreamServerError);
~StreamServer();
void addMP3(char const* file, char const* name)
throw(StreamServerRunError);
void addMPEGVideo(char const* file, char const* name)
throw(StreamServerRunError);
void addMPEG(char const* file, char const* name)
throw(StreamServerRunError);
void run()
throw(StreamServerRunError);
void stop()
throw(StreamServerRunError);
void remove(char const* name)
throw(StreamServerRunError);
const char* getURL(char const* name) const
throw(StreamServerNameError);
bool isRunning() const;
private:
const int port;
RTSPServer* rtsp;
UsageEnvironment* env;
char notRunning;
pthread_t thread;
static void* listenClose(void* inst);
};
#endif