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  * $Log: iax2medstrm.h,v $
00029  * Revision 1.1  2005/07/30 07:01:32  csoutheren
00030  * Added implementation of IAX2 (Inter Asterisk Exchange 2) protocol
00031  * Thanks to Derek Smithies of Indranet Technologies Ltd. for
00032  * writing and contributing this code
00033  *
00034  *
00035  *
00036  */
00037 
00038 #ifndef __OPAL_IAX2_MEDIASTRM_H
00039 #define __OPAL_IAX2_MEDIASTRM_H
00040 
00041 #ifdef P_USE_PRAGMA
00042 #pragma interface
00043 #endif
00044 
00045 
00046 #include <opal/buildopts.h>
00047 #include <opal/mediafmt.h>
00048 #include <iax2/iax2con.h>
00049 
00050 class RTP_Session;
00051 class OpalMediaPatch;
00052 class OpalLine;
00053 
00054 
00058 class OpalIAX2MediaStream : public OpalMediaStream
00059 {
00060   PCLASSINFO(OpalIAX2MediaStream, OpalMediaStream);
00061   public:
00066     OpalIAX2MediaStream(
00067                    const OpalMediaFormat & mediaFormat, 
00068                    unsigned sessionID,                  
00069                    BOOL isSource,                       
00070                    unsigned minJitterDelay,             
00071                    unsigned maxJitterDelay,             
00072                    IAX2Connection &con                  
00073                    );
00075  
00082     virtual BOOL Open();
00083  
00089     virtual BOOL Start();
00090 
00095     virtual BOOL Close();
00096  
00100     virtual BOOL ReadData(
00101       BYTE * data,      
00102       PINDEX size,      
00103       PINDEX & length   
00104     );
00105 
00109     virtual BOOL WriteData(
00110       const BYTE * data,   
00111       PINDEX length,       
00112       PINDEX & written     
00113     );
00114 
00119     virtual BOOL IsSynchronous() const;
00121 
00122   protected:
00124     IAX2Connection &connection;
00125 
00129     PBYTEArray pendingData;
00130 
00132     unsigned      minAudioJitterDelay;
00133 
00135     unsigned      maxAudioJitterDelay;
00136 
00137 };
00138 
00139 #endif  //__OPAL_IAXs_MEDIASTRM_H
00140 
00141 /* The comment below is magic for those who use emacs to edit this file. */
00142 /* With the comment below, the tab key does auto indent to 2 spaces.     */
00143 
00144 /*
00145  * Local Variables:
00146  * mode:c
00147  * c-file-style:linux
00148  * c-basic-offset:2
00149  * End:
00150  */
00151 

Generated on Mon Sep 25 16:20:06 2006 for OPAL by  doxygen 1.4.7