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

H261Packet.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 H261PACKET_H 00025 #define H261PACKET_H 00026 00027 #include "PlainPacket.h" 00028 00029 /**********************************************************************/ 00030 /* H261Packet */ 00031 /**********************************************************************/ 00032 00033 class H261Packet 00034 { 00035 PlainPacket* _packet; 00036 00037 struct Preview 00038 { 00039 unsigned char* _buf; 00040 unsigned int _size; 00041 00042 unsigned int _ctr; 00043 unsigned int _discard_head; 00044 unsigned int _discard_tail; 00045 bool _is_picture; 00046 unsigned int _tempref; 00047 unsigned int _gob_number; 00048 00049 Preview( ); 00050 ~Preview( ); 00051 00052 void adapt( unsigned int max ); 00053 }; 00054 00055 Preview _preview; 00056 unsigned int _last_temp_ref; 00057 bool _initialized; 00058 00059 void initRTPHeader( unsigned char* buffer, 00060 unsigned int discard_head, 00061 unsigned int discard_tail, 00062 unsigned int gob_number ); 00063 00064 int getGOB( Preview& preview ); 00065 00066 int getGOB( unsigned char* dest, 00067 unsigned int& max, 00068 unsigned int& discard_head, 00069 unsigned int& discard_tail, 00070 bool& is_picture, 00071 unsigned int& temporal_reference, 00072 unsigned int& gob_number ); 00073 00074 public: 00075 00076 H261Packet( PlainPacket* packet ); 00077 00078 int getRTPPacket( unsigned char* dest, 00079 size_t& max, 00080 unsigned int& temporal_reference, 00081 bool& marker ); 00082 00083 int getPacket( unsigned char* dest, 00084 unsigned int& max, 00085 unsigned int& discard_head, 00086 unsigned int& discard_tail, 00087 unsigned int& temporal_reference, 00088 unsigned int& gob_number, 00089 bool& marker ); 00090 00091 }; 00092 00093 /**********************************************************************/ 00094 /* H261FilePacket */ 00095 /**********************************************************************/ 00096 00097 class H261FilePacket 00098 : public PlainFilePacket 00099 , public H261Packet 00100 { 00101 public: 00102 00103 H261FilePacket( int fd ); 00104 00105 }; 00106 00107 /**********************************************************************/ 00108 /* H261RopePacket */ 00109 /**********************************************************************/ 00110 00111 class H261RopePacket 00112 : public PlainRopePacket 00113 , public H261Packet 00114 { 00115 public: 00116 00117 H261RopePacket( SH::SinkEndpoint* pull_here ); 00118 00119 MNRope* getRTPPacket( SH::SinkEndpoint* pull_here, 00120 size_t max_bytes_to_pull, 00121 unsigned int& temporal_reference, 00122 bool& mark ); 00123 }; 00124 00125 #endif /* H261PACKET_H */ 00126

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