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 MNRTP_DECODER_BASE_H 00025 #define MNRTP_DECODER_BASE_H 00026 00027 #include <config.h> 00028 00029 #include "MNRTPutildefs.h" 00030 #include "sh/SHReturnCodes.h" 00031 #include "sh/SHData.h" 00032 #include "MNTimeval.h" 00033 /* experimental!!! */ 00034 #include "sh/SH.h" 00035 #include "sh/SHAttr.h" 00036 #include "sdp/PayloadTypeEntry.h" 00037 00038 00039 class MNRope; 00040 class SinkEndpoint; 00041 class RetransRecvBase; 00042 namespace SDP 00043 { 00044 class PayloadTypeTable; 00045 }; 00046 00047 /************************************************************** 00048 * Class: MNRTPDecoderBase 00049 * Description: contains the functionality of the codecs for decoding 00050 * Oslo, August 2001 00051 **************************************************************/ 00052 00053 class MNRTPDecoderBase 00054 00055 { 00056 public: 00059 MNRTPDecoderBase(); 00060 00063 virtual ~MNRTPDecoderBase(); 00064 00068 static MNRTPDecoderBase* factory( int payload_type, RetransRecvBase* retrans , int rtp_payload_type, const SDP::PayloadTypeTable* _payload_types); 00069 00086 virtual SH::DataPtr decode_data( MNRTPPacketPtr packet, MNRope*& indata ) = 0; 00087 00092 virtual SH::DataPtr decode_data( MNRTPPacketPtr packet, 00093 MNRope*& indata, 00094 u_int64_t bytecount ) = 0; 00095 00099 virtual bool curPacketCompletesFrame() = 0; 00100 }; 00101 00102 #endif