SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
rtpsessionsources.cpp
Go to the documentation of this file.
1 /*
2 
3  This file is a part of JRTPLIB
4  Copyright (c) 1999-2017 Jori Liesenborgs
5 
6  Contact: jori.liesenborgs@gmail.com
7 
8  This library was developed at the Expertise Centre for Digital Media
9  (http://www.edm.uhasselt.be), a research center of the Hasselt University
10  (http://www.uhasselt.be). The library is based upon work done for
11  my thesis at the School for Knowledge Technology (Belgium/The Netherlands).
12 
13  Permission is hereby granted, free of charge, to any person obtaining a
14  copy of this software and associated documentation files (the "Software"),
15  to deal in the Software without restriction, including without limitation
16  the rights to use, copy, modify, merge, publish, distribute, sublicense,
17  and/or sell copies of the Software, and to permit persons to whom the
18  Software is furnished to do so, subject to the following conditions:
19 
20  The above copyright notice and this permission notice shall be included
21  in all copies or substantial portions of the Software.
22 
23  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
29  IN THE SOFTWARE.
30 
31  */
32 
33 #include "rtpsessionsources.h"
34 #include "rtpsession.h"
35 #include "rtpsourcedata.h"
36 
37 namespace qrtplib
38 {
39 
40 void RTPSessionSources::OnRTPPacket(RTPPacket *pack, const RTPTime &receivetime, const RTPAddress *senderaddress)
41 {
42  rtpsession.OnRTPPacket(pack, receivetime, senderaddress);
43 }
44 
45 void RTPSessionSources::OnRTCPCompoundPacket(RTCPCompoundPacket *pack, const RTPTime &receivetime, const RTPAddress *senderaddress)
46 {
47  if (senderaddress != 0) // don't analyse own RTCP packets again (they're already analysed on their way out)
49  rtpsession.OnRTCPCompoundPacket(pack, receivetime, senderaddress);
50 }
51 
52 void RTPSessionSources::OnSSRCCollision(RTPSourceData *srcdat, const RTPAddress *senderaddress, bool isrtp)
53 {
54  if (srcdat->IsOwnSSRC())
55  owncollision = true;
56  rtpsession.OnSSRCCollision(srcdat, senderaddress, isrtp);
57 }
58 
59 void RTPSessionSources::OnCNAMECollision(RTPSourceData *srcdat, const RTPAddress *senderaddress, const uint8_t *cname, std::size_t cnamelength)
60 {
61  rtpsession.OnCNAMECollision(srcdat, senderaddress, cname, cnamelength);
62 }
63 
65 {
66  rtpsession.OnNewSource(srcdat);
67 }
68 
70 {
71  rtpsession.OnRemoveSource(srcdat);
72 }
73 
75 {
77  rtpsession.OnTimeout(srcdat);
78 }
79 
81 {
82  rtpsession.OnBYETimeout(srcdat);
83 }
84 
86 {
88  rtpsession.OnBYEPacket(srcdat);
89 }
90 
91 void RTPSessionSources::OnAPPPacket(RTCPAPPPacket *apppacket, const RTPTime &receivetime, const RTPAddress *senderaddress)
92 {
93  rtpsession.OnAPPPacket(apppacket, receivetime, senderaddress);
94 }
95 
96 void RTPSessionSources::OnUnknownPacketType(RTCPPacket *rtcppack, const RTPTime &receivetime, const RTPAddress *senderaddress)
97 {
98  rtpsession.OnUnknownPacketType(rtcppack, receivetime, senderaddress);
99 }
100 
101 void RTPSessionSources::OnUnknownPacketFormat(RTCPPacket *rtcppack, const RTPTime &receivetime, const RTPAddress *senderaddress)
102 {
103  rtpsession.OnUnknownPacketFormat(rtcppack, receivetime, senderaddress);
104 }
105 
107 {
108  rtpsession.OnNoteTimeout(srcdat);
109 }
110 
111 void RTPSessionSources::OnValidatedRTPPacket(RTPSourceData *srcdat, RTPPacket *rtppack, bool isonprobation, bool *ispackethandled)
112 {
113  rtpsession.OnValidatedRTPPacket(srcdat, rtppack, isonprobation, ispackethandled);
114 }
115 
117 {
119 }
120 
122 {
124 }
125 
126 void RTPSessionSources::OnRTCPSDESItem(RTPSourceData *srcdat, RTCPSDESPacket::ItemType t, const void *itemdata, std::size_t itemlength)
127 {
128  rtpsession.OnRTCPSDESItem(srcdat, t, itemdata, itemlength);
129 }
130 
131 #ifdef RTP_SUPPORT_SDESPRIV
132 void RTPSessionSources::OnRTCPSDESPrivateItem(RTPSourceData *srcdat, const void *prefixdata, std::size_t prefixlen, const void *valuedata, std::size_t valuelen)
133 {
134  rtpsession.OnRTCPSDESPrivateItem(srcdat, prefixdata, prefixlen, valuedata, valuelen);
135 }
136 #endif // RTP_SUPPORT_SDESPRIV
137 
138 } // end namespace
139 
void OnRemoveSource(RTPSourceData *srcdat)
virtual void OnAPPPacket(RTCPAPPPacket *apppacket, const RTPTime &receivetime, const RTPAddress *senderaddress)
Definition: rtpsession.h:611
virtual void OnNewSource(RTPSourceData *srcdat)
Definition: rtpsession.h:599
virtual void OnRTCPSDESPrivateItem(RTPSourceData *srcdat, const void *prefixdata, std::size_t prefixlen, const void *valuedata, std::size_t valuelen)
Definition: rtpsession.h:634
void OnUnknownPacketType(RTCPPacket *rtcppack, const RTPTime &receivetime, const RTPAddress *senderaddress)
virtual void OnCNAMECollision(RTPSourceData *srcdat, const RTPAddress *senderaddress, const uint8_t *cname, std::size_t cnamelength)
Definition: rtpsession.h:596
void OnBYEPacket(RTPSourceData *srcdat)
virtual void OnUnknownPacketType(RTCPPacket *rtcppack, const RTPTime &receivetime, const RTPAddress *senderaddress)
Definition: rtpsession.h:614
virtual void OnRTCPSDESItem(RTPSourceData *srcdat, RTCPSDESPacket::ItemType t, const void *itemdata, std::size_t itemlength)
Definition: rtpsession.h:629
void OnNewSource(RTPSourceData *srcdat)
void OnRTCPSDESItem(RTPSourceData *srcdat, RTCPSDESPacket::ItemType t, const void *itemdata, std::size_t itemlength)
void OnBYETimeout(RTPSourceData *srcdat)
void OnNoteTimeout(RTPSourceData *srcdat)
virtual void OnValidatedRTPPacket(RTPSourceData *srcdat, RTPPacket *rtppack, bool isonprobation, bool *ispackethandled)
Definition: rtpsession.h:657
void OnSSRCCollision(RTPSourceData *srcdat, const RTPAddress *senderaddress, bool isrtp)
virtual void OnNoteTimeout(RTPSourceData *srcdat)
Definition: rtpsession.h:620
virtual void OnRTCPSenderReport(RTPSourceData *srcdat)
Definition: rtpsession.h:623
unsigned char uint8_t
Definition: rtptypes_win.h:42
void OnRTCPSDESPrivateItem(RTPSourceData *srcdat, const void *prefixdata, std::size_t prefixlen, const void *valuedata, std::size_t valuelen)
void AnalyseIncoming(RTCPCompoundPacket &rtcpcomppack)
void OnRTPPacket(RTPPacket *pack, const RTPTime &receivetime, const RTPAddress *senderaddress)
virtual void OnRTPPacket(RTPPacket *pack, const RTPTime &receivetime, const RTPAddress *senderaddress)
Definition: rtpsession.h:587
virtual void OnUnknownPacketFormat(RTCPPacket *rtcppack, const RTPTime &receivetime, const RTPAddress *senderaddress)
Definition: rtpsession.h:617
void OnAPPPacket(RTCPAPPPacket *apppacket, const RTPTime &receivetime, const RTPAddress *senderaddress)
virtual void OnRTCPCompoundPacket(RTCPCompoundPacket *pack, const RTPTime &receivetime, const RTPAddress *senderaddress)
Definition: rtpsession.h:590
void OnRTCPReceiverReport(RTPSourceData *srcdat)
RTCPScheduler rtcpsched
Definition: rtpsession.h:573
virtual void OnRemoveSource(RTPSourceData *srcdat)
Definition: rtpsession.h:602
void OnCNAMECollision(RTPSourceData *srcdat, const RTPAddress *senderaddress, const uint8_t *cname, std::size_t cnamelength)
void OnRTCPCompoundPacket(RTCPCompoundPacket *pack, const RTPTime &receivetime, const RTPAddress *senderaddress)
virtual void OnBYETimeout(RTPSourceData *srcdat)
Definition: rtpsession.h:608
void OnUnknownPacketFormat(RTCPPacket *rtcppack, const RTPTime &receivetime, const RTPAddress *senderaddress)
void OnTimeout(RTPSourceData *srcdat)
void OnRTCPSenderReport(RTPSourceData *srcdat)
virtual void OnRTCPReceiverReport(RTPSourceData *srcdat)
Definition: rtpsession.h:626
virtual void OnBYEPacket(RTPSourceData *srcdat)
Definition: rtpsession.h:639
void OnValidatedRTPPacket(RTPSourceData *srcdat, RTPPacket *rtppack, bool isonprobation, bool *ispackethandled)
virtual void OnTimeout(RTPSourceData *srcdat)
Definition: rtpsession.h:605
virtual void OnSSRCCollision(RTPSourceData *srcdat, const RTPAddress *senderaddress, bool isrtp)
Definition: rtpsession.h:593