1 #ifndef __AST_H323CAPS_H
2 #define __AST_H323CAPS_H
4 /**This class describes the G.711 codec capability.
6 class AST_G711Capability
: public H323AudioCapability
8 PCLASSINFO(AST_G711Capability
, H323AudioCapability
);
11 AST_G711Capability(int rx_frames
= 125, H323_G711Capability::Mode _mode
= H323_G711Capability::muLaw
, H323_G711Capability::Speed _speed
= H323_G711Capability::At64k
);
12 virtual PObject
*Clone() const;
13 virtual H323Codec
* CreateCodec(H323Codec::Direction direction
) const;
14 virtual unsigned GetSubType() const;
15 virtual PString
GetFormatName() const;
18 H323_G711Capability::Mode mode
;
19 H323_G711Capability::Speed speed
;
22 /**This class describes the G.723.1 codec capability.
24 class AST_G7231Capability
: public H323AudioCapability
26 PCLASSINFO(AST_G7231Capability
, H323AudioCapability
);
29 AST_G7231Capability(int rx_frames
= 7, BOOL annexA
= TRUE
);
30 Comparison
Compare(const PObject
& obj
) const;
31 virtual PObject
* Clone() const;
32 virtual H323Codec
* CreateCodec(H323Codec::Direction direction
) const;
33 virtual unsigned GetSubType() const;
34 virtual PString
GetFormatName() const;
35 virtual BOOL
OnSendingPDU(H245_AudioCapability
& pdu
, unsigned packetSize
) const;
36 virtual BOOL
OnReceivedPDU(const H245_AudioCapability
& pdu
, unsigned & packetSize
);
42 /**This class describes the (fake) G729 codec capability.
44 class AST_G729Capability
: public H323AudioCapability
46 PCLASSINFO(AST_G729Capability
, H323AudioCapability
);
49 AST_G729Capability(int rx_frames
= 24);
50 /* Create a copy of the object. */
51 virtual PObject
* Clone() const;
53 /* Create the codec instance, allocating resources as required. */
54 virtual H323Codec
* CreateCodec(H323Codec::Direction direction
) const;
56 /* Get the sub-type of the capability. This is a code dependent on the
57 main type of the capability.
59 This returns one of the four possible combinations of mode and speed
60 using the enum values of the protocol ASN H245_AudioCapability class. */
61 virtual unsigned GetSubType() const;
63 /* Get the name of the media data format this class represents. */
64 virtual PString
GetFormatName() const;
67 /* This class describes the VoiceAge G729A codec capability. */
68 class AST_G729ACapability
: public H323AudioCapability
70 PCLASSINFO(AST_G729ACapability
, H323AudioCapability
);
73 /* Create a new G.729A capability. */
74 AST_G729ACapability(int rx_frames
= 24);
76 /* Create a copy of the object. */
77 virtual PObject
* Clone() const;
78 /* Create the codec instance, allocating resources as required. */
79 virtual H323Codec
* CreateCodec(H323Codec::Direction direction
) const;
81 /* Get the sub-type of the capability. This is a code dependent on the
82 main type of the capability.
84 This returns one of the four possible combinations of mode and speed
85 using the enum values of the protocol ASN H245_AudioCapability class. */
86 virtual unsigned GetSubType() const;
88 /* Get the name of the media data format this class represents. */
89 virtual PString
GetFormatName() const;
92 /* This class describes the GSM-06.10 codec capability. */
93 class AST_GSM0610Capability
: public H323AudioCapability
95 PCLASSINFO(AST_GSM0610Capability
, H323AudioCapability
);
98 /* Create a new GSM capability. */
99 AST_GSM0610Capability(int rx_frames
= 24, int comfortNoise
= 0, int scrambled
= 0);
101 /* Create a copy of the object. */
102 virtual PObject
* Clone() const;
104 /* Create the codec instance, allocating resources as required. */
105 virtual H323Codec
* CreateCodec(H323Codec::Direction direction
) const;
107 /* Get the sub-type of the capability. This is a code dependent on the
108 main type of the capability.
110 This returns one of the four possible combinations of mode and speed
111 using the enum values of the protocol ASN H245_AudioCapability class. */
112 virtual unsigned GetSubType() const;
114 /* Get the name of the media data format this class represents. */
115 virtual PString
GetFormatName() const;
117 BOOL
OnSendingPDU(H245_AudioCapability
& pdu
, unsigned packetSize
) const;
118 BOOL
OnReceivedPDU(const H245_AudioCapability
& pdu
, unsigned & packetSize
);
124 #endif /* __AST_H323CAPS_H */