Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

SHRTPData.h

Go to the documentation of this file.
00001 /* Copyright (C) 2000 KOM/Darmstadt University of Technology 00002 * 00003 * You are allowed to use all other parts of the code under the following terms: 00004 * 00005 * For non-commercial use, code may be used in unmodified form provided 00006 * that this copyright notice and this permission notice appear in 00007 * supporting documentation. 00008 * 00009 * This software is provided "as is" and without any express or implied 00010 * warranties, including, without limitation, the implied warranty of 00011 * fitness for a particular purpose. 00012 * 00013 * The code may be subjected to the GNU General Public License, Version 2, 00014 * and re-distributed under the terms of this license. 00015 * As a special exception, permission is granted to link this code 00016 * with the Qt library and distribute executables, as long as you 00017 * follow the requirements of the GNU GPL in regard to all of the 00018 * software in the executable aside from Qt. 00019 * 00020 * Commercial use other than under the terms of the GNU General Public 00021 * License is allowed only after express negotiation of conditions 00022 * with the authors. 00023 */ 00024 #ifndef MN_SH_RTP_DATA_H 00025 #define MN_SH_RTP_DATA_H 00026 00027 #include <sys/types.h> 00028 #include "var_type.h" 00029 00030 #include "SHData.h" 00031 00032 class MNRope; 00033 class SHPlainData; 00034 00035 namespace SH 00036 { 00037 00049 class SHRTPData : public Data 00050 { 00051 public: 00052 static const bool Consume = true; 00053 static const bool DontConsume = false; 00054 00055 public: 00069 SHRTPData(u_int32 timestamp, 00070 u_int16 extHdrType, 00071 MNRope*& extHdrPayload, 00072 SHPlainData*& data, 00073 struct timeval presTime, 00074 bool sync, 00075 bool consume_data); 00079 // SHRTPData( const uchar_t* data, size_t len ); 00080 SHRTPData(const uchar_t* data, size_t len, size_t hdrlen); 00081 00084 virtual ~SHRTPData(); 00085 00088 virtual DataPtr clone(); 00089 00093 virtual size_t getByteSize( ) const; 00094 00095 00096 u_int32 getRTPTimestamp(); 00097 u_int16 getExtHdrType(); 00102 MNRope* getExtHdrPayload(); 00103 00109 SHPlainData* get_payloadData_asPlainData(); 00110 00111 virtual bool isPlainData( ) const { return false; } 00112 virtual bool isOrderedData( ) const { return false; } 00113 virtual bool isRTPData( ) const { return false; } 00114 virtual bool isDummyData( ) const { return false; } 00115 virtual bool isSHRTPData( ) const { return true; } 00117 /* Return contents of synchronized-flag 00118 @return true if RTCP information has been used, false otherwise 00119 */ 00120 bool hasBeenSynchronized( ) const {return _synchronized; } 00121 /* Return presentation timestamp calculated from RTP timestamp. Note 00122 the calculation has been done by the 00123 RTPDecoderSH. 00124 @return presentation timestamp as struct timeval. 00125 */ 00126 struct timeval getPT( ) const {return _presTime;} 00127 00128 protected: 00129 // MNRope* _data; 00130 //MNRTPPacket* _headers; 00131 u_int32 _rtpTimestamp; 00132 u_int16 _extHdrType; 00133 MNRope* _extHdrPayload; 00134 SHPlainData* _payloadData; 00135 00136 private: 00138 SHRTPData( const SHRTPData& ); 00139 00141 SHRTPData& operator=( const SHRTPData& ); 00142 00143 bool _synchronized; 00144 00145 struct timeval _presTime; 00146 }; 00147 00149 00150 }; // namespace SH 00151 00152 #endif /* MN_SH_RTP_DATA_H */ 00153

Generated on Sun Mar 6 13:35:50 2005 for Komssys by doxygen 1.3.8