CslRtpSession.h

Go to the documentation of this file.
00001 
00002 
00003 
00004 //  Permission is hereby granted, free of charge, to any person obtaining a
00005 //  copy of this software and associated documentation files (the "Software"),
00006 //  to deal in the Software without restriction, including without limitation
00007 //  the rights to use, copy, modify, merge, publish, distribute, sublicense,
00008 //  and/or sell copies of the Software, and to permit persons to whom the
00009 //  Software is furnished to do so, subject to the following conditions:
00010 //
00011 //  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00012 //  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00013 //  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
00014 //  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00015 //  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
00016 //  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
00017 //  DEALINGS IN THE SOFTWARE.
00018 //  --------------------------------------------------------------------------
00028 
00029 #ifndef CSL_CSLRTPSESSION_H
00030 #define CSL_CSLRTPSESSION_H
00031 
00032 #include "CSL_Core.h"
00033 #include "Interleaver.h"
00034 #include "RingBuffer.h"
00035 #include "CslRtpIncludes.h"
00036 #include <iostream>
00037 
00038 namespace csl {
00039 
00041 enum RtpBufferState {
00042     kNormal = 0,
00043     kBuffering,
00044     kOverflow,
00045     kUnderrun,
00046     kInactive,
00047 
00048     kNumStates
00049 };
00050 
00051 class CslRtpSession : public RTPSession
00052 {
00053 public:
00054     CslRtpSession(unsigned numChans, unsigned bufferFrames);            
00055     ~CslRtpSession();       
00056     RingBuffer mRtpBuffer;  
00057     Buffer mTmpBuffer;          
00058 protected:
00059     void OnRTPPacket(RTPPacket * pack, const RTPTime &receivetime, const RTPAddress *senderaddress);
00060     void OnRTCPCompoundPacket(RTCPCompoundPacket *pack, const RTPTime &receivetime, const RTPAddress *senderaddress);
00061 
00062     void OnSSRCCollision(RTPSourceData *srcdat,const RTPAddress *senderaddress,bool isrtp);
00063     void OnCNAMECollision(RTPSourceData *srcdat,const RTPAddress *senderaddress,
00064                           const u_int8_t *cname,size_t cnamelength);
00065     void OnNewSource(RTPSourceData *srcdat);
00066     void OnRemoveSource(RTPSourceData *srcdat);
00067     void OnTimeout(RTPSourceData *srcdat);
00068     void OnBYETimeout(RTPSourceData *srcdat);
00069     void OnAPPPacket(RTCPAPPPacket *apppacket,const RTPTime &receivetime,
00070                      const RTPAddress *senderaddress);
00071     void OnUnknownPacketType(RTCPPacket *rtcppack,const RTPTime &receivetime,
00072                              const RTPAddress *senderaddress);
00073     void OnUnknownPacketFormat(RTCPPacket *rtcppack,const RTPTime &receivetime,
00074                                const RTPAddress *senderaddress);
00075     void OnNoteTimeout(RTPSourceData *srcdat);
00076     void OnBYEPacket(RTPSourceData *srcdat);
00077 
00078 };
00079 
00080 };
00081 
00082 #endif

Generated on Thu Sep 17 23:14:16 2009 for CSL by  doxygen 1.5.8