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 00025 #ifndef MNRTPENCODERH261_H 00026 #define MNRTPENCODERH261_H 00027 00028 #include "MNRTPEncoderCommon.h" 00029 00030 class H261Packet; 00031 class H261FilePacket; 00032 class H261RopePacket; 00033 00034 /************************************************************** 00035 * Class: MNRTPEncoderH261 00036 * Description: contains the encoder functionality of the codec 00037 * September 2001 00038 **************************************************************/ 00039 00040 class MNRTPEncoderH261 : public MNRTPEncoderCommon 00041 { 00042 bool _is_file_packet; 00043 union { 00044 H261FilePacket* f; 00045 H261RopePacket* r; 00046 } _packet; 00047 00048 bool _last_packet; 00049 unsigned int _curr_timestamp; 00050 00051 public: 00052 MNRTPEncoderH261( RetransBase* retrans ); 00053 virtual ~MNRTPEncoderH261(); 00054 00055 virtual u_int32_t get_std_bw( int fd ); 00056 00059 virtual MNRope* get_next_data( SH::SinkEndpoint* pull_here, 00060 size_t max_bytes_to_pull, 00061 SH::ReturnCode& except, 00062 size_t& pulled_bytes, 00063 bool& rtp_marker, 00064 u_int32& rtp_timestamp, 00065 Timeval& next_playtime_packet, 00066 int bandwidth ); 00067 00073 virtual int get_timer_type( ); 00074 00075 }; 00076 00077 #endif