reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
GstRtpManager.hxx
Go to the documentation of this file.
1
#ifndef RESIP_GSTRTPMANAGER
2
#define RESIP_GSTRTPMANAGER
3
4
#ifdef HAVE_CONFIG_H
5
#include "config.h"
6
#endif
7
8
#ifdef USE_GSTREAMER
9
#include <map>
10
#include <utility>
11
#include <type_traits>
12
#include <glibmm/main.h>
13
#include <glibmm/exceptionhandler.h>
14
#include <glibmm/ustring.h>
15
#include <gstreamermm.h>
16
17
#include <gst/webrtc/webrtc.h>
18
19
#include "../../rutil/Subsystem.hxx"
20
#include "../../rutil/Log.hxx"
21
#include "../../rutil/hep/HepAgent.hxx"
22
#include "../../resip/stack/SdpContents.hxx"
23
#include "../../resip/stack/Tuple.hxx"
24
#include "../../rutil/hep/HepAgent.hxx"
25
26
#include "../RTPPortManager.hxx"
27
28
namespace
resipgst
29
{
30
31
class
CodecConfig
32
{
33
public
:
34
CodecConfig
(
const
resip::Data
& name,
35
const
resip::Data
&
decoder
,
36
const
resip::Data
&
encoder
,
37
const
resip::Data
&
h264Profile
,
38
const
resip::Data
&
depay
,
39
const
resip::Data
&
pay
,
40
const
resip::Data
& parse,
41
const
unsigned
int
rate
,
42
const
resip::Data
&
fmtp
) :
43
mName(name),
44
mDecoder
(
decoder
),
mEncoder
(
encoder
),
mH264Profile
(
h264Profile
),
45
mDepay
(
depay
),
mPay
(
pay
),
mParse
(parse), mRate(
rate
),
mFmtp
(
fmtp
) {}
46
resip::Data
mName;
47
resip::Data
mDecoder
;
48
resip::Data
mEncoder
;
49
resip::Data
mH264Profile
;
50
resip::Data
mDepay
;
51
resip::Data
mPay
;
52
resip::Data
mParse
;
53
unsigned
int
mRate;
54
resip::Data
mFmtp
;
55
};
56
typedef
std::map<resip::Data,std::shared_ptr<CodecConfig>>
CodecConfigMap
;
57
58
class
GstRtpManager
59
{
60
public
:
61
GstRtpManager
(
const
resip::Data
&
localAddress
);
62
GstRtpManager
(
const
resip::Data
&
localAddress
,
int
portRangeMin
,
int
portRangeMax
);
63
virtual
~GstRtpManager
();
64
65
const
resip::Data
&
getLocalAddress
()
const
{
return
mLocalAddress; };
66
resip::RTPPortManager
&
getPortManager
() {
return
mPortManager
; };
67
68
const
CodecConfigMap
&
getCodecConfigMap
() {
return
mCodecConfigMap
; };
69
70
const
resip::Data
&
getApplicationName
()
const
{
return
mApplicationName
; };
71
void
setApplicationName
(
const
resip::Data
&
applicationName
) {
mApplicationName
=
applicationName
; };
72
73
protected
:
74
virtual
void
initCodecConfigMap
();
75
76
private
:
77
resip::Data
mLocalAddress;
78
resip::RTPPortManager
mPortManager
;
79
CodecConfigMap
mCodecConfigMap
;
80
resip::Data
mApplicationName
=
"reSIProcate"
;
81
};
82
83
}
84
85
#endif
86
87
#endif
88
89
/* ====================================================================
90
*
91
* Copyright (c) 2022, Software Freedom Institute https://softwarefreedom.institute
92
* Copyright (c) 2022, Daniel Pocock https://danielpocock.com
93
*
94
* Redistribution and use in source and binary forms, with or without
95
* modification, are permitted provided that the following conditions
96
* are met:
97
*
98
* 1. Redistributions of source code must retain the above copyright
99
* notice, this list of conditions and the following disclaimer.
100
*
101
* 2. Redistributions in binary form must reproduce the above copyright
102
* notice, this list of conditions and the following disclaimer in
103
* the documentation and/or other materials provided with the
104
* distribution.
105
*
106
* 3. Neither the name of the author(s) nor the names of any contributors
107
* may be used to endorse or promote products derived from this software
108
* without specific prior written permission.
109
*
110
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTORS "AS IS" AND
111
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
112
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
113
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) OR CONTRIBUTORS BE LIABLE
114
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
115
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
116
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
117
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
118
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
119
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
120
* SUCH DAMAGE.
121
*
122
* ====================================================================
123
*
124
*
125
*/
fmtp
static const Data fmtp("fmtp")
resip::Data
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
Definition
Data.hxx:90
resip::RTPPortManager
Definition
RTPPortManager.hxx:15
list
void list()
Definition
userAdmin.cxx:66
media
gstreamer
GstRtpManager.hxx
Generated by
1.9.8