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: 19279 $
00029  * $Author: rjongbloed $
00030  * $Date: 2008-01-17 04:08:34 +0000 (Thu, 17 Jan 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 
00041 #include <opal/buildopts.h>
00042 #include <opal/mediafmt.h>
00043 #include <iax2/iax2con.h>
00044 #include <iax2/iax2jitter.h>
00045 
00046 class RTP_Session;
00047 class OpalMediaPatch;
00048 class OpalLine;
00049 
00050 
00054 class OpalIAX2MediaStream : public OpalMediaStream
00055 {
00056   PCLASSINFO(OpalIAX2MediaStream, OpalMediaStream);
00061     OpalIAX2MediaStream(
00062                    IAX2Connection &con,                 
00063                    const OpalMediaFormat & mediaFormat, 
00064                    unsigned sessionID,                  
00065                    PBoolean isSource                        
00066                    );
00068  
00069  public:
00076     virtual PBoolean Open();
00077  
00083     virtual PBoolean Start();
00084 
00089     virtual PBoolean Close();
00090  
00096     virtual PBoolean ReadPacket(
00097       RTP_DataFrame & packet 
00098     );
00099 
00103     virtual PBoolean WriteData(
00104       const BYTE * data,   
00105       PINDEX length,       
00106       PINDEX & written     
00107     );
00108 
00113     virtual PBoolean IsSynchronous() const;
00115 
00116   protected:
00118     IAX2Connection & connection;
00119 
00123     PBYTEArray pendingData;
00124 };
00125 
00126 #endif  //__OPAL_IAX2_MEDIASTRM_H
00127 
00128 /* The comment below is magic for those who use emacs to edit this file. */
00129 /* With the comment below, the tab key does auto indent to 2 spaces.     */
00130 
00131 /*
00132  * Local Variables:
00133  * mode:c
00134  * c-file-style:linux
00135  * c-basic-offset:2
00136  * End:
00137  */
00138 

Generated on Mon Sep 15 11:49:11 2008 for OPAL by  doxygen 1.5.1