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

MNRTPEncoderBase.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 MNRTP_ENCODER_BASE_H 00025 #define MNRTP_ENCODER_BASE_H 00026 00027 #include <config.h> 00028 00029 #include "MNRTPutildefs.h" 00030 #include "sh/SHReturnCodes.h" 00031 #include "sdp/PayloadTypes.h" 00032 #include "MNTimeval.h" 00033 00034 class MNRope; 00035 class RetransBase; 00036 00037 namespace SH 00038 { 00039 class SinkEndpoint; 00040 class Data; 00041 }; 00042 00043 /************************************************************** 00044 * Class: MNRTPEncoderBase 00045 * Description: contains the functionality of the codecs for encoding 00046 * Oslo, August 2001 00047 **************************************************************/ 00048 00049 class MNRTPEncoderBase 00050 { 00051 /******************************************************************/ 00052 /* Information for packet size and timing */ 00053 /******************************************************************/ 00054 00060 size_t _std_packet_length; 00061 00065 size_t _cur_packet_length; 00066 00072 Timeval _cur_time_offset; 00073 00077 size_t _cur_rtp_timestamp_offset; 00078 00079 public: 00084 enum timer_type 00085 { 00086 TT_PERIODIC, 00087 TT_DYNAMIC 00088 }; 00089 00090 // PACKETSIZE 00091 00092 size_t get_std_packetsize() const; 00093 void set_std_packetsize( size_t sz ); 00094 size_t get_packetsize() const; 00095 00096 // TIMEOUT 00097 00098 Timeval get_timeout( ) const; 00099 00100 // RTP TIMESTAMP OFFSET 00101 00102 size_t get_ts_offset() const; 00103 void set_ts_offset( size_t ts ); 00104 00105 virtual size_t get_abs_byte_pos() = 0; 00106 virtual void update_absolute_position( int32 offset ) = 0; 00107 00108 public: 00111 MNRTPEncoderBase(); 00112 00115 virtual ~MNRTPEncoderBase(); 00116 00117 public: 00161 virtual MNRope* get_next_data( SH::SinkEndpoint* pull_here, 00162 size_t max_bytes_to_pull, 00163 SH::ReturnCode& except, 00164 size_t& pulled_bytes, 00165 bool& rtp_marker, 00166 u_int32& rtp_timestamp, 00167 Timeval& next_playtime_packet, 00168 int bandwidth ) = 0; 00169 00170 virtual MNRope* get_data( SH::SinkEndpoint* pull_here, 00171 size_t max_bytes_to_pull, 00172 SH::ReturnCode& except, 00173 size_t& pulled_bytes, 00174 bool& rtp_marker, 00175 u_int32& rtp_timestamp, 00176 Timeval& next_playtime_packet, 00177 int bandwidth, 00178 u_int32 filepos ); 00179 00180 00181 virtual u_int32_t get_std_bw( int fd ) = 0; 00182 00186 static MNRTPEncoderBase* factory( SDP::PayloadTypes payload_type, RetransBase* retrans ); 00187 00193 virtual int get_timer_type( ) = 0; 00194 00198 virtual size_t get_pulled_bytes( ) = 0; 00199 }; 00200 00201 #endif

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