OPAL  Version 3.18.8
iax2medstrm.h
Go to the documentation of this file.
1 /*
2  *
3  * Inter Asterisk Exchange 2
4  *
5  * Open Phone Abstraction Library (OPAL)
6  *
7  * Extension of the Opal Media stream, where the media from the IAX2 side is
8  * linked to the OPAL
9  *
10  * Copyright (c) 2005 Indranet Technologies Ltd.
11  *
12  * The contents of this file are subject to the Mozilla Public License
13  * Version 1.0 (the "License"); you may not use this file except in
14  * compliance with the License. You may obtain a copy of the License at
15  * http://www.mozilla.org/MPL/
16  *
17  * Software distributed under the License is distributed on an "AS IS"
18  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
19  * the License for the specific language governing rights and limitations
20  * under the License.
21  *
22  * The Original Code is Open Phone Abstraction Library.
23  *
24  * The Initial Developer of the Original Code is Indranet Technologies Ltd.
25  *
26  * The author of this code is Derek J Smithies
27  */
28 
29 #ifndef OPAL_IAX2_MEDIASTRM_H
30 #define OPAL_IAX2_MEDIASTRM_H
31 
32 #ifdef P_USE_PRAGMA
33 #pragma interface
34 #endif
35 
36 #include <opal_config.h>
37 
38 #if OPAL_IAX2
39 
40 #include <opal/mediafmt.h>
41 #include <iax2/iax2con.h>
42 
43 class OpalMediaPatch;
44 class OpalLine;
45 
46 
51 {
59  IAX2Connection &con,
60  const OpalMediaFormat & mediaFormat,
61  unsigned sessionID,
62  PBoolean isSource
63  );
68 
69 
70 
71  public:
79  virtual PBoolean ReadPacket(
80  RTP_DataFrame & packet
81  );
82 
86  virtual PBoolean WriteData(
87  const BYTE * data,
88  PINDEX length,
89  PINDEX & written
90  );
91 
96  virtual PBoolean IsSynchronous() const;
97 
99 
100  protected:
101  virtual void InternalClose() { }
102 
105 
109  PBYTEArray pendingData;
110 };
111 
112 
113 #endif // OPAL_IAX2
114 
115 #endif // OPAL_IAX2_MEDIASTRM_H
116 
117 /* The comment below is magic for those who use emacs to edit this file.
118  * With the comment below, the tab key does auto indent to 2 spaces.
119  *
120  * Local Variables:
121  * mode:c
122  * c-basic-offset:2
123  * End:
124  */
Definition: iax2medstrm.h:50
virtual PBoolean ReadPacket(RTP_DataFrame &packet)
Definition: iax2con.h:59
virtual void InternalClose()
Definition: iax2medstrm.h:101
Definition: rtp.h:540
Definition: patch.h:56
virtual PBoolean WriteData(const BYTE *data, PINDEX length, PINDEX &written)
Definition: mediafmt.h:806
IAX2Connection & connection
Definition: iax2medstrm.h:104
virtual PBoolean IsSynchronous() const
PBYTEArray pendingData
Definition: iax2medstrm.h:109
Definition: mediastrm.h:110
Definition: lid.h:921