jrtplib 3.7.1
|
00001 /* 00002 00003 This file is a part of JRTPLIB 00004 Copyright (c) 1999-2007 Jori Liesenborgs 00005 00006 Contact: jori.liesenborgs@gmail.com 00007 00008 This library was developed at the "Expertisecentrum Digitale Media" 00009 (http://www.edm.uhasselt.be), a research center of the Hasselt University 00010 (http://www.uhasselt.be). The library is based upon work done for 00011 my thesis at the School for Knowledge Technology (Belgium/The Netherlands). 00012 00013 Permission is hereby granted, free of charge, to any person obtaining a 00014 copy of this software and associated documentation files (the "Software"), 00015 to deal in the Software without restriction, including without limitation 00016 the rights to use, copy, modify, merge, publish, distribute, sublicense, 00017 and/or sell copies of the Software, and to permit persons to whom the 00018 Software is furnished to do so, subject to the following conditions: 00019 00020 The above copyright notice and this permission notice shall be included 00021 in all copies or substantial portions of the Software. 00022 00023 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00024 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00025 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 00026 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 00027 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 00028 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 00029 IN THE SOFTWARE. 00030 00031 */ 00032 00037 #ifndef RTPSESSIONSOURCES_H 00038 00039 #define RTPSESSIONSOURCES_H 00040 00041 #include "rtpconfig.h" 00042 #include "rtpsources.h" 00043 00044 class RTPSession; 00045 00046 class RTPSessionSources : public RTPSources 00047 { 00048 public: 00049 RTPSessionSources(RTPSession &sess,RTPMemoryManager *mgr) : RTPSources(RTPSources::ProbationStore,mgr),rtpsession(sess) 00050 { owncollision = false; } 00051 ~RTPSessionSources() { } 00052 void ClearOwnCollisionFlag() { owncollision = false; } 00053 bool DetectedOwnCollision() const { return owncollision; } 00054 private: 00055 void OnRTPPacket(RTPPacket *pack,const RTPTime &receivetime, 00056 const RTPAddress *senderaddress); 00057 void OnRTCPCompoundPacket(RTCPCompoundPacket *pack,const RTPTime &receivetime, 00058 const RTPAddress *senderaddress); 00059 void OnSSRCCollision(RTPSourceData *srcdat,const RTPAddress *senderaddress,bool isrtp); 00060 void OnCNAMECollision(RTPSourceData *srcdat,const RTPAddress *senderaddress, 00061 const uint8_t *cname,size_t cnamelength); 00062 void OnNewSource(RTPSourceData *srcdat); 00063 void OnRemoveSource(RTPSourceData *srcdat); 00064 void OnTimeout(RTPSourceData *srcdat); 00065 void OnBYETimeout(RTPSourceData *srcdat); 00066 void OnBYEPacket(RTPSourceData *srcdat); 00067 void OnAPPPacket(RTCPAPPPacket *apppacket,const RTPTime &receivetime, 00068 const RTPAddress *senderaddress); 00069 void OnUnknownPacketType(RTCPPacket *rtcppack,const RTPTime &receivetime, 00070 const RTPAddress *senderaddress); 00071 void OnUnknownPacketFormat(RTCPPacket *rtcppack,const RTPTime &receivetime, 00072 const RTPAddress *senderaddress); 00073 void OnNoteTimeout(RTPSourceData *srcdat); 00074 00075 RTPSession &rtpsession; 00076 bool owncollision; 00077 }; 00078 00079 #endif // RTPSESSIONSOURCES_H