docs/html/RTSPServer_8h_source.html
| | Jetson Inference
DNN Vision Library |
RTSPServer.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23 #ifndef __RTSP_SERVER_H__
24 #define __RTSP_SERVER_H__
25
26 #include <stdint.h>
27
28
29 // forward declarations
30 class Thread;
31
32 struct _GMainLoop;
33 struct _GstRTSPServer;
34 struct _GstElement;
35
36
41 #define RTSP_DEFAULT_PORT 8554
42
47 #define LOG_RTSP "[rtsp] "
48
49
55 class RTSPServer
56 {
57 public:
62static RTSPServer* Create( uint16_t port=RTSP_DEFAULT_PORT );
63
68void Release();
69
74bool AddRoute( const char* path, _GstElement* pipeline );
75
80bool AddRoute( const char* path, const char* pipeline );
81
82 protected:
83RTSPServer( uint16_t port );
84~RTSPServer();
85
86bool init();
87
88static void* runThread( void* user_data );
89
92
95
98 };
99
100 #endif
RTSP server for transmitting encoded GStreamer pipelines to client devices.
Definition: RTSPServer.h:55
bool AddRoute(const char *path, _GstElement *pipeline)
Register a GStreamer pipeline to be served at the specified path.
#define RTSP_DEFAULT_PORT
Default port used by RTSP server.
Definition: RTSPServer.h:41
_GMainLoop * mMainLoop
Definition: RTSPServer.h:96
bool init()
RTSPServer(uint16_t port)
bool mRunning
Definition: RTSPServer.h:94
Thread * mThread
Definition: RTSPServer.h:93
uint16_t mPort
Definition: RTSPServer.h:90
_GstRTSPServer * mServer
Definition: RTSPServer.h:97
static RTSPServer * Create(uint16_t port=RTSP_DEFAULT_PORT)
Create a RTSP server on this port.
static void * runThread(void *user_data)
Thread class for launching an asynchronous operating-system dependent thread.
Definition: Thread.h:44
void Release()
Release a reference to the server instance.
~RTSPServer()
uint32_t mRefCount
Definition: RTSPServer.h:91