UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
Loading...
Searching...
No Matches
src
rtsp
c_basicRTSPOnlyServer.cpp
Go to the documentation of this file.
1
/*
2
* FILE: rtsp/c_basicRTSPOnlyServer.cpp
3
* AUTHORS: David Cassany <david.cassany@i2cat.net>
4
* Gerard Castillo <gerard.castillo@i2cat.net>
5
*
6
* Copyright (c) 2005-2010 Fundació i2CAT, Internet I Innovació Digital a Catalunya
7
*
8
* Redistribution and use in source and binary forms, with or without
9
* modification, is permitted provided that the following conditions
10
* are met:
11
*
12
* 1. Redistributions of source code must retain the above copyright
13
* notice, this list of conditions and the following disclaimer.
14
*
15
* 2. Redistributions in binary form must reproduce the above copyright
16
* notice, this list of conditions and the following disclaimer in the
17
* documentation and/or other materials provided with the distribution.
18
*
19
* 3. All advertising materials mentioning features or use of this software
20
* must display the following acknowledgement:
21
*
22
* This product includes software developed by the Fundació i2CAT,
23
* Internet I Innovació Digital a Catalunya. This product also includes
24
* software developed by CESNET z.s.p.o.
25
*
26
* 4. Neither the name of the University nor of the Institute may be used
27
* to endorse or promote products derived from this software without
28
* specific prior written permission.
29
*
30
* THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS
31
* "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
32
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
33
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
34
* EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
35
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
36
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
37
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
39
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
40
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
41
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
42
*
43
*/
44
45
#include <cassert>
46
47
#include "
rtsp/c_basicRTSPOnlyServer.h
"
48
#include "
rtsp/BasicRTSPOnlyServer.hh
"
49
50
rtsp_serv_t
*
51
c_start_server
(
struct
rtsp_server_parameters
params
)
52
{
53
auto
* server = (
rtsp_serv_t
*) malloc(
sizeof
(
rtsp_serv_t
));
54
server->params =
params
;
55
server->watch = 0;
56
57
int
ret;
58
BasicRTSPOnlyServer
*srv =
BasicRTSPOnlyServer::initInstance
(server->params);
59
srv->
init_server
();
60
ret = pthread_create(&server->server_th, NULL,
BasicRTSPOnlyServer::start_server
, &server->watch);
61
assert(ret == 0);
62
63
return
server;
64
}
65
66
void
c_stop_server
(
rtsp_serv_t
* server){
67
if
(server ==
nullptr
) {
68
return
;
69
}
70
server->watch = 1;
71
pthread_join(server->server_th,
nullptr
);
72
}
73
BasicRTSPOnlyServer.hh
c_stop_server
void c_stop_server(rtsp_serv_t *server)
Definition
c_basicRTSPOnlyServer.cpp:66
c_start_server
rtsp_serv_t * c_start_server(struct rtsp_server_parameters params)
Definition
c_basicRTSPOnlyServer.cpp:51
c_basicRTSPOnlyServer.h
rtsp_serv_t
EXTERNC struct rtsp_serv rtsp_serv_t
BasicRTSPOnlyServer
Definition
BasicRTSPOnlyServer.hh:53
BasicRTSPOnlyServer::initInstance
static BasicRTSPOnlyServer * initInstance(struct rtsp_server_parameters params)
Definition
BasicRTSPOnlyServer.cpp:65
BasicRTSPOnlyServer::init_server
int init_server()
Definition
BasicRTSPOnlyServer.cpp:82
BasicRTSPOnlyServer::start_server
static void * start_server(void *args)
Definition
BasicRTSPOnlyServer.cpp:145
params
static struct @19 params[100]
params
Definition
platform_pipe.cpp:130
rtsp_server_parameters
Definition
c_basicRTSPOnlyServer.h:67
Generated on Wed Sep 25 2024 14:27:18 for UltraGrid by
1.12.0