[Asterisk-cvs] asterisk/channels/h323 ast_h323.h,1.11,1.12
jeremy at lists.digium.com
jeremy at lists.digium.com
Wed Nov 19 16:19:53 CST 2003
Update of /usr/cvsroot/asterisk/channels/h323
In directory mongoose.digium.com:/tmp/cvs-serv16751
Modified Files:
ast_h323.h
Log Message:
apply G.729 patches (with changes) from bug #421
Index: ast_h323.h
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/h323/ast_h323.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- ast_h323.h 22 Sep 2003 23:19:27 -0000 1.11
+++ ast_h323.h 19 Nov 2003 22:46:11 -0000 1.12
@@ -23,7 +23,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * Version Info: $Id$
+ * Version Info: $Id$
*/
@@ -98,6 +98,100 @@
BOOL annexA;
};
+/**This class describes the (fake) G729 codec capability.
+ */
+class AST_G729Capability : public H323AudioCapability
+{
+ PCLASSINFO(AST_G729Capability, H323AudioCapability);
+
+ public:
+ /**@name Construction */
+ //@{
+ /**Create a new G.729 capability.
+ */
+ AST_G729Capability();
+ //@}
+
+ /**@name Overrides from class PObject */
+ //@{
+ /**Create a copy of the object.
+ */
+ virtual PObject * Clone() const;
+ //@}
+
+ /**@name Operations */
+ //@{
+ /**Create the codec instance, allocating resources as required.
+ */
+ virtual H323Codec * CreateCodec(
+ H323Codec::Direction direction /// Direction in which this instance runs
+ ) const;
+ //@}
+
+ /**@name Identification functions */
+ //@{
+ /**Get the sub-type of the capability. This is a code dependent on the
+ main type of the capability.
+
+ This returns one of the four possible combinations of mode and speed
+ using the enum values of the protocol ASN H245_AudioCapability class.
+ */
+ virtual unsigned GetSubType() const;
+
+ /**Get the name of the media data format this class represents.
+ */
+ virtual PString GetFormatName() const;
+ //@}
+};
+
+
+/**This class describes the VoiceAge G729A codec capability.
+ */
+class AST_G729ACapability : public H323AudioCapability
+{
+ PCLASSINFO(AST_G729ACapability, H323AudioCapability);
+
+ public:
+ /**@name Construction */
+ //@{
+ /**Create a new G.729A capability.
+ */
+ AST_G729ACapability();
+ //@}
+
+ /**@name Overrides from class PObject */
+ //@{
+ /**Create a copy of the object.
+ */
+ virtual PObject * Clone() const;
+ //@}
+
+ /**@name Operations */
+ //@{
+ /**Create the codec instance, allocating resources as required.
+ */
+ virtual H323Codec * CreateCodec(
+ H323Codec::Direction direction /// Direction in which this instance runs
+ ) const;
+ //@}
+
+ /**@name Identification functions */
+ //@{
+ /**Get the sub-type of the capability. This is a code dependent on the
+ main type of the capability.
+
+ This returns one of the four possible combinations of mode and speed
+ using the enum values of the protocol ASN H245_AudioCapability class.
+ */
+ virtual unsigned GetSubType() const;
+
+ /**Get the name of the media data format this class represents.
+ */
+ virtual PString GetFormatName() const;
+ //@}
+};
+
+
class MyH323EndPoint : public H323EndPoint {
PCLASSINFO(MyH323EndPoint, H323EndPoint);
@@ -110,18 +204,18 @@
void OnClosedLogicalChannel(H323Connection &, const H323Channel &);
void OnConnectionEstablished(H323Connection &, const PString &);
void OnConnectionCleared(H323Connection &, const PString &);
- H323Connection * CreateConnection(unsigned, void *);
+ H323Connection * CreateConnection(unsigned, void *);
void SendUserTone(const PString &, char);
H323Capabilities GetCapabilities(void);
- BOOL OnConnectionForwarded(H323Connection &, const PString &, const H323SignalPDU &);
-
- BOOL ForwardConnection(H323Connection &, const PString &, const H323SignalPDU &);
+ BOOL OnConnectionForwarded(H323Connection &, const PString &, const H323SignalPDU &);
+
+ BOOL ForwardConnection(H323Connection &, const PString &, const H323SignalPDU &);
PStringArray SupportedPrefixes;
void SetEndpointTypeInfo( H225_EndpointType & info ) const;
void SetGateway(void);
-
+
};
@@ -135,15 +229,15 @@
H323Channel * CreateRealTimeLogicalChannel(const H323Capability &, H323Channel::Directions, unsigned,
const H245_H2250LogicalChannelParameters *);
- H323Connection::AnswerCallResponse OnAnswerCall(const PString &, const H323SignalPDU &, H323SignalPDU &);
- void OnReceivedReleaseComplete(const H323SignalPDU &);
+ H323Connection::AnswerCallResponse OnAnswerCall(const PString &, const H323SignalPDU &, H323SignalPDU &);
+ void OnReceivedReleaseComplete(const H323SignalPDU &);
BOOL OnAlerting(const H323SignalPDU &, const PString &);
BOOL OnSendReleaseComplete(H323SignalPDU &);
BOOL OnReceivedSignalSetup(const H323SignalPDU &);
BOOL OnReceivedFacility(const H323SignalPDU &);
BOOL OnSendSignalSetup(H323SignalPDU &);
BOOL OnStartLogicalChannel(H323Channel &);
- BOOL OnClosingLogicalChannel(H323Channel &);
+ BOOL OnClosingLogicalChannel(H323Channel &);
void SendUserInputTone(char, unsigned);
void OnUserInputTone(char, unsigned, unsigned, unsigned);
void OnUserInputString(const PString &value);
@@ -157,8 +251,8 @@
PIPSocket::Address remoteIpAddress; // IP Address of remote endpoint
WORD externalPort; // local media server Data port (control is dataPort+1)
WORD remotePort; // remote endpoint Data port (control is dataPort+1)
- WORD sessionId;
- BOOL bridging; // Used to help determine which IP to use
+ WORD sessionId;
+ BOOL bridging; // Used to help determine which IP to use
};
More information about the svn-commits
mailing list