rtcpcompoundpacket.h

Go to the documentation of this file.
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 RTCPCOMPOUNDPACKET_H
00038 
00039 #define RTCPCOMPOUNDPACKET_H
00040 
00041 #include "rtpconfig.h"
00042 #include "rtptypes.h"
00043 #include "rtpmemoryobject.h"
00044 #include <list>
00045 
00046 class RTPRawPacket;
00047 class RTCPPacket;
00048 
00050 class RTCPCompoundPacket : public RTPMemoryObject
00051 {
00052 public:
00054         RTCPCompoundPacket(RTPRawPacket &rawpack, RTPMemoryManager *memmgr = 0);
00055 
00061         RTCPCompoundPacket(uint8_t *packet, size_t len, bool deletedata = true, RTPMemoryManager *memmgr = 0);
00062 protected:
00063         RTCPCompoundPacket(RTPMemoryManager *memmgr); // this is for the compoundpacket builder
00064 public:
00065         virtual ~RTCPCompoundPacket();
00066 
00071         int GetCreationError()                                                                  { return error; }
00072 
00074         uint8_t *GetCompoundPacketData()                                                { return compoundpacket; }
00075 
00077         size_t GetCompoundPacketLength()                                                { return compoundpacketlength; }
00078 
00080         void GotoFirstPacket()                                                                  { rtcppackit = rtcppacklist.begin(); }
00081 
00086         RTCPPacket *GetNextPacket()                                                             { if (rtcppackit == rtcppacklist.end()) return 0; RTCPPacket *p = *rtcppackit; rtcppackit++; return p; }
00087 
00088 #ifdef RTPDEBUG
00089         void Dump();    
00090 #endif // RTPDEBUG
00091 protected:
00092         void ClearPacketList();
00093         int ParseData(uint8_t *packet, size_t len);
00094         
00095         int error;
00096 
00097         uint8_t *compoundpacket;
00098         size_t compoundpacketlength;
00099         bool deletepacket;
00100         
00101         std::list<RTCPPacket *> rtcppacklist;
00102         std::list<RTCPPacket *>::const_iterator rtcppackit;
00103 };
00104 
00105 #endif // RTCPCOMPOUNDPACKET_H
00106 

Generated on Thu Feb 8 16:22:05 2007 for jrtplib by  doxygen 1.5.1