iax2medstrm.h

Go to the documentation of this file.
00001 /*
00002  *
00003  * Inter Asterisk Exchange 2
00004  * 
00005  * Open Phone Abstraction Library (OPAL)
00006  *
00007  * Extension of the Opal Media stream, where the media from the IAX2 side is
00008  * linked to the OPAL 
00009  *
00010  * Copyright (c) 2005 Indranet Technologies Ltd.
00011  *
00012  * The contents of this file are subject to the Mozilla Public License
00013  * Version 1.0 (the "License"); you may not use this file except in
00014  * compliance with the License. You may obtain a copy of the License at
00015  * http://www.mozilla.org/MPL/
00016  *
00017  * Software distributed under the License is distributed on an "AS IS"
00018  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
00019  * the License for the specific language governing rights and limitations
00020  * under the License.
00021  *
00022  * The Original Code is Open Phone Abstraction Library.
00023  *
00024  * The Initial Developer of the Original Code is Indranet Technologies Ltd.
00025  *
00026  * The author of this code is Derek J Smithies
00027  *
00028  * $Revision: 21409 $
00029  * $Author: dereksmithies $
00030  * $Date: 2008-10-24 03:33:30 +0000 (Fri, 24 Oct 2008) $
00031  */
00032 
00033 #ifndef OPAL_IAX2_MEDIASTRM_H
00034 #define OPAL_IAX2_MEDIASTRM_H
00035 
00036 #ifdef P_USE_PRAGMA
00037 #pragma interface
00038 #endif
00039 
00040 #include <opal/buildopts.h>
00041 
00042 #if OPAL_IAX2
00043 
00044 #include <opal/mediafmt.h>
00045 #include <iax2/iax2con.h>
00046 #include <iax2/iax2jitter.h>
00047 
00048 class RTP_Session;
00049 class OpalMediaPatch;
00050 class OpalLine;
00051 
00052 
00056 class OpalIAX2MediaStream : public OpalMediaStream
00057 {
00058   PCLASSINFO(OpalIAX2MediaStream, OpalMediaStream);
00064     OpalIAX2MediaStream(
00065                    IAX2Connection &con,                 
00066                    const OpalMediaFormat & mediaFormat, 
00067                    unsigned sessionID,                  
00068                    PBoolean isSource                        
00069                    );
00072     ~OpalIAX2MediaStream();
00074 
00075 
00076  
00077  public:
00084     virtual PBoolean Open();
00085  
00091     virtual PBoolean Start();
00092 
00097     virtual PBoolean Close();
00098  
00104     virtual PBoolean ReadPacket(
00105       RTP_DataFrame & packet 
00106     );
00107 
00111     virtual PBoolean WriteData(
00112       const BYTE * data,   
00113       PINDEX length,       
00114       PINDEX & written     
00115     );
00116 
00121     virtual PBoolean IsSynchronous() const;
00123 
00124   protected:
00126     IAX2Connection & connection;
00127 
00131     PBYTEArray pendingData;
00132 };
00133 
00134 
00135 #endif // OPAL_IAX2
00136 
00137 #endif  // OPAL_IAX2_MEDIASTRM_H
00138 
00139 /* The comment below is magic for those who use emacs to edit this file. */
00140 /* With the comment below, the tab key does auto indent to 4 spaces.     */
00141 
00142 /*
00143  * Local Variables:
00144  * mode:c
00145  * c-basic-offset:4
00146  * End:
00147  */

Generated on Mon Feb 1 00:25:49 2010 for OPAL by  doxygen 1.5.1