⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 h323caps.h

📁 mgcp协议源代码。支持多种编码:g711
💻 H
📖 第 1 页 / 共 4 页
字号:
  //@}  /**@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;  //@}  /**@name Protocol manipulation */  //@{    /**This function is called whenever and outgoing TerminalCapabilitySet       or OpenLogicalChannel PDU is being constructed for the control channel.       It allows the capability to set the PDU fields from information in       members specific to the class.       The default behaviour calls H323NonStandardCapabilityinfo::OnSendingPDU()       to handle the PDU.     */    virtual BOOL OnSendingPDU(      H245_VideoCapability & pdu  /// PDU to set information on    ) const;    /**This function is called whenever and incoming TerminalCapabilitySet       or OpenLogicalChannel PDU has been used to construct the control       channel. It allows the capability to set from the PDU fields,       information in members specific to the class.       The default behaviour calls H323NonStandardCapabilityinfo::OnReceivedPDU()       to handle the provided PDU.     */    virtual BOOL OnReceivedPDU(      const H245_VideoCapability & pdu  /// PDU to set information on    );  //@}};/**This class describes the interface to a data channel used to transfer data   via the logical channels opened and managed by the H323 control channel.   An application may create a descendent off this class and override   functions as required for descibing a codec. */class H323DataCapability : public H323Capability{  PCLASSINFO(H323DataCapability, H323Capability);  public:  /**@name Identification functions */  //@{    /**Get the main type of the capability.       Always returns e_Data.     */    virtual MainTypes GetMainType() const;  //@}  /**@name Operations */  //@{    /**Create the codec instance, allocating resources as required.       As a data channel has no codec, this always returns NULL.     */    virtual H323Codec * CreateCodec(      H323Codec::Direction direction  /// Direction in which this instance runs    ) const;  //@}  /**@name Protocol manipulation */  //@{    /**This function is called whenever and outgoing TerminalCapabilitySet       PDU is being constructed for the control channel. It allows the       capability to set the PDU fields from information in members specific       to the class.       The default behaviour calls the OnSendingPDU() function with a more       specific PDU type.     */    virtual BOOL OnSendingPDU(      H245_Capability & pdu  /// PDU to set information on    ) const;    /**This function is called whenever and outgoing OpenLogicalChannel       PDU is being constructed for the control channel. It allows the       capability to set the PDU fields from information in members specific       to the class.       The default behaviour calls the OnSendingPDU() function with a more       specific PDU type.     */    virtual BOOL OnSendingPDU(      H245_DataType & pdu  /// PDU to set information on    ) const;    /**This function is called whenever and outgoing TerminalCapabilitySet       or OpenLogicalChannel PDU is being constructed for the control channel.       It allows the capability to set the PDU fields from information in       members specific to the class.       The default behaviour is pure.     */    virtual BOOL OnSendingPDU(      H245_DataApplicationCapability & pdu  /// PDU to set information on    ) const = 0;    /**This function is called whenever and incoming TerminalCapabilitySet       PDU is received on the control channel, and a new H323Capability       descendent was created. This completes reading fields from the PDU       into the classes members.       If the function returns FALSE then the received PDU codec description       is not supported, so will be ignored. The default behaviour simply       returns TRUE.     */    virtual BOOL OnReceivedPDU(      const H245_Capability & pdu  /// PDU to get information from    );    /**This function is called whenever and incoming OpenLogicalChannel       PDU has been used to construct the control channel. It allows the       capability to set from the PDU fields, information in members specific       to the class.       The default behaviour is pure.     */    virtual BOOL OnReceivedPDU(      const H245_DataType & pdu,  /// PDU to get information from      BOOL receiver               /// Is receiver OLC    );    /**This function is called whenever and incoming TerminalCapabilitySet       or OpenLogicalChannel PDU has been used to construct the control       channel. It allows the capability to set from the PDU fields,       information in members specific to the class.       The default behaviour is pure.     */    virtual BOOL OnReceivedPDU(      const H245_DataApplicationCapability & pdu  /// PDU to set information on    ) = 0;  //@}};/**This class describes the interface to a non-standard data codec used to   transfer data via the logical channels opened and managed by the H323   control channel.   An application may create a descendent off this class and override   functions as required for descibing the codec. */class H323NonStandardDataCapability : public H323DataCapability,                                      public H323NonStandardCapabilityInfo{  PCLASSINFO(H323NonStandardDataCapability, H323DataCapability);  public:  /**@name Construction */  //@{    /**Create a new set of information about a non-standard codec.      */    H323NonStandardDataCapability(      H323EndPoint & endpoint,        /// Endpoint to get t35 information      const BYTE * fixedData = NULL,  /// Non-Standard data for codec type      PINDEX dataSize = 0             /// Size of fixedData    );    /**Create a new set of information about a non-standard codec.      */    H323NonStandardDataCapability(      const PString & oid,            /// OID for indentification of codec      const BYTE * fixedData = NULL,  /// Non-Standard data for codec type      PINDEX dataSize = 0             /// Size of fixedData    );    /**Create a new set of information about a non-standard codec.      */    H323NonStandardDataCapability(      BYTE country,                   /// t35 information      BYTE extension,                 /// t35 information      WORD maufacturer,               /// t35 information      const BYTE * fixedData = NULL,  /// Non-Standard data for codec type      PINDEX dataSize = 0             /// Size of fixedData    );  //@}  /**@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;  //@}  /**@name Protocol manipulation */  //@{    /**This function is called whenever and outgoing TerminalCapabilitySet       or OpenLogicalChannel PDU is being constructed for the control channel.       It allows the capability to set the PDU fields from information in       members specific to the class.       The default behaviour calls H323NonStandardCapabilityinfo::OnSendingPDU()       to handle the PDU.     */    virtual BOOL OnSendingPDU(      H245_DataApplicationCapability & pdu  /// PDU to set information on    ) const;    /**This function is called whenever and incoming TerminalCapabilitySet       or OpenLogicalChannel PDU has been used to construct the control       channel. It allows the capability to set from the PDU fields,       information in members specific to the class.       The default behaviour calls H323NonStandardCapabilityinfo::OnReceivedPDU()       to handle the provided PDU.     */    virtual BOOL OnReceivedPDU(      const H245_DataApplicationCapability & pdu  /// PDU to set information on    );  //@}};///////////////////////////////////////////////////////////////////////////////// The simplest codec is the G.711 PCM codec./**This class describes the G711 codec capability. */class H323_G711Capability : public H323AudioCapability{  PCLASSINFO(H323_G711Capability, H323AudioCapability)  public:    /// Specific G.711 encoding algorithm.    enum Mode {      /// European standard      ALaw,      /// American standard      muLaw    };    /// Specific G.711 encoding bit rates.    enum Speed {      /// European standard      At64k,      /// American standard      At56k    };  /**@name Construction */  //@{    /**Create a new G.711 capability.     */    H323_G711Capability(      Mode mode = muLaw,    /// Type of encoding.      Speed speed = At64k   /// Encoding bit rate.    );  //@}  /**@name Overrides from class PObject */  //@{    /**Create a copy of the object.      */    virtual PObject * Clone() 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;  //@}  /**@name Operations */  //@{    /**Create the codec instance, allocating resources as required.     */    virtual H323Codec * CreateCodec(      H323Codec::Direction direction  /// Direction in which this instance runs    ) const;  //@}  /**@name Protocol manipulation */  //@{    /**This function is called whenever and outgoing TerminalCapabilitySet       or OpenLogicalChannel PDU is being constructed for the control channel.       It allows the capability to set the PDU fields from information in       members specific to the class.       The default behaviour sets the data rate field in the PDU.     */    virtual BOOL OnSendingPDU(      H245_AudioCapability & pdu,  /// PDU to set information on      unsigned packetSize          /// Packet size to use in capability    ) const;    /**This function is called whenever and incoming TerminalCapabilitySet       or OpenLogicalChannel PDU has been used to construct the control       channel. It allows the capability to set from the PDU fields,       information in members specific to the class.       The default behaviour gets the data rate field from the PDU.     */    virtual BOOL OnReceivedPDU(      const H245_AudioCapability & pdu,  /// PDU to get information from      unsigned & packetSize              /// Packet size to use in capability    );  //@}  protected:    Mode     mode;    Speed    speed;};////////////////////////////////////////////////////////////////////////////////**This class describes the T120 logical channel. */class H323_T120Capability : public H323DataCapability{  PCLASSINFO(H323_T120Capability, H323DataCapability);  public:  /**@name Overrides from class PObject */  //@{    /**Create a copy of the object.      */    virtual PObject * Clone() 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 the e_t120 enum value from the protocol ASN       H245_DataApplicationCapability_application class.     */    virtual unsigned GetSubType() const;    /**Get the name of the media data format this class represents.     */    virtual PString GetFormatName() const;  //@}  /**@name Operations */  //@{    /**Create the channel instance, allocating resources as required.     */    virtual H323Channel * CreateChannel(      H323Connection & connection,    /// Owner connection for channel      H323Channel::Directions dir,    /// Direction of channel      unsigned sessionID,             /// Session ID for RTP channel      const H245_H2250LogicalChannelParameters * param                                      /// Parameters for channel    ) const;  //@}  /**@name Protocol manipulation */  //@{    /**This function is called whenever and outgoing TerminalCapabilitySet       or OpenLogicalChannel PDU is being constructed for the control channel.       It allows the capability to set the PDU fields from information in       members specific to the class.       The default behaviour sets the data rate field in the PDU.     */    virtual BOOL OnSendingPDU(      H245_DataApplicationCapability & pdu    ) const;    /**This function is called whenever and incoming TerminalCapabilitySet       or OpenLogicalChannel PDU has been used to construct the control       channel. It allows the capability to set from the PDU fields,       information in members specific to the class.       The default behaviour gets the data rate field from the PDU.     */    virtual BOOL OnReceivedPDU(      const H245_DataApplicationCapability & pdu  /// PDU to set information on

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -