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

📄 channels.h

📁 mgcp协议源代码。支持多种编码:g711
💻 H
📖 第 1 页 / 共 2 页
字号:
      const H245_MiscellaneousIndication_type & type  /// Indication to process    );    /**Limit bit flow for the logical channel.       The default behaviour does nothing.     */    virtual void OnJitterIndication(      DWORD jitter,           /// Estimated received jitter in microseconds      int skippedFrameCount,  /// Frames skipped by decodec      int additionalBuffer    /// Additional size of video decoder buffer    );  //@}  /**@name Member variable access */  //@{    const H323ChannelNumber & GetNumber() const { return number; }    void SetNumber(const H323ChannelNumber & num) { number = num; }    /**Get the bandwidth used by the channel in 100's of bits/sec.     */    unsigned GetBandwidthUsed() const { return bandwidthUsed; }    /**Get the bandwidth used by the channel in 100's of bits/sec.     */    BOOL SetBandwidthUsed(      unsigned bandwidth  /// New bandwidth    );    /**Get the capability that created this channel.      */    const H323Capability & GetCapability() const { return capability; }    /**Get the codec, if any, associated with the channel.      */    H323Codec * GetCodec() const { return codec; }    /**Get the "pause" flag.       A paused channel is one that prevents the annunciation of the channels       data. For example for audio this would mute the data, for video it would       still frame.       Note that channel is not stopped, and may continue to actually receive       data, it is just that nothing is done with it.      */    BOOL IsPaused() const { return paused; }    /**Set the "pause" flag.       A paused channel is one that prevents the annunciation of the channels       data. For example for audio this would mute the data, for video it would       still frame.       Note that channel is not stopped, and may continue to actually receive       data, it is just that nothing is done with it.      */    void SetPause(      BOOL pause   /// New pause flag    ) { paused = pause; }  //@}  protected:    H323EndPoint         & endpoint;    H323Connection       & connection;    const H323Capability & capability;    H323ChannelNumber      number;    H323Codec            * codec;    PThread              * receiveThread;    PThread              * transmitThread;    BOOL                   paused;    BOOL                   terminating;  private:    unsigned bandwidthUsed;};PLIST(H323LogicalChannelList, H323Channel);/**This class describes a unidirectional logical channel between the two   endpoints. They may be created and deleted as required in the H245 protocol.   An application may create a descendent off this class and override   functions as required for operating the channel protocol. */class H323UnidirectionalChannel : public H323Channel{  PCLASSINFO(H323UnidirectionalChannel, H323Channel);  public:  /**@name Construction */  //@{    /**Create a new channel.     */    H323UnidirectionalChannel(      H323Connection & connection,        /// Connection to endpoint for channel      const H323Capability & capability,  /// Capability channel is using      Directions direction                /// Direction of channel    );  //@}  /**@name Overrides from class H323Channel */  //@{    /**Indicate the direction of the channel.       Return if the channel is bidirectional, or unidirectional, and which       direction for th latter case.     */    virtual Directions GetDirection() const;    /**This is called when the channel can start transferring data.       The default action is to start one threads, with it either calling       Receive() or Transmit() depending on the receiver member variable.     */    virtual void Start();  //@}  protected:    BOOL receiver;};/**This class describes a bidirectional logical channel between the two   endpoints. They may be created and deleted as required in the H245 protocol.   An application may create a descendent off this class and override   functions as required for operating the channel protocol. */class H323BidirectionalChannel : public H323Channel{  PCLASSINFO(H323BidirectionalChannel, H323Channel);  public:  /**@name Construction */  //@{    /**Create a new channel.     */    H323BidirectionalChannel(      H323Connection & connection,        /// Connection to endpoint for channel      const H323Capability & capability   /// Capability channel is using    );  //@}  /**@name Overrides from class H323Channel */  //@{    /**Indicate the direction of the channel.       Return if the channel is bidirectional, or unidirectional, and which       direction for th latter case.     */    virtual Directions GetDirection() const;    /**This is called when the channel can start transferring data.       The default action is to start two threads, one calls Receive() and the       other calls Transmit().     */    virtual void Start();  //@}};///////////////////////////////////////////////////////////////////////////////// RTP Channel/**This class is for encpsulating the IETF Real Time Protocol interface. */class H323_RTPChannel : public H323UnidirectionalChannel{  PCLASSINFO(H323_RTPChannel, H323UnidirectionalChannel);  public:  /**@name Construction */  //@{    /**Create a new channel.     */    H323_RTPChannel(      H323Connection & connection,        /// Connection to endpoint for channel      const H323Capability & capability,  /// Capability channel is using      Directions direction,               /// Direction of channel      RTP_Session & rtp                   /// RTP session for channel    );    /// Destroy the channel    ~H323_RTPChannel();  //@}  /**@name Overrides from class H323Channel */  //@{    /**This is called to clean up any threads on connection termination.     */    virtual void CleanUpOnTermination();    /**Indicate the session number of the channel.       Return session for channel. This returns the session ID of the       RTP_Session member variable.     */    virtual unsigned GetSessionID() const;    /**Handle channel data reception.       This is called by the thread started by the Start() function and is       typically a loop writing to the codec and reading from the transport       (eg RTP_session).      */    virtual void Receive();    /**Handle channel data transmission.       This is called by the thread started by the Start() function and is       typically a loop reading from the codec and writing to the transport       (eg an RTP_session).      */    virtual void Transmit();    /**Fill out the OpenLogicalChannel PDU for the particular channel type.     */    virtual BOOL OnSendingPDU(      H245_OpenLogicalChannel & openPDU  /// Open PDU to send.     ) const;    /**This is called when request to create a channel is received from a       remote machine and is about to be acknowledged.     */    virtual void OnSendOpenAck(      const H245_OpenLogicalChannel & open,   /// Open PDU      H245_OpenLogicalChannelAck & ack        /// Acknowledgement PDU    ) const;    /**This is called after a request to create a channel occurs from the       local machine via the H245LogicalChannelDict::Open() function, and       the request has been acknowledged by the remote endpoint.       The default makes sure the parameters are compatible and passes on       the PDU to the rtp session.     */    virtual BOOL OnReceivedPDU(      const H245_OpenLogicalChannel & pdu,    /// Open PDU      unsigned & errorCode                    /// Error code on failure    );    /**This is called after a request to create a channel occurs from the       local machine via the H245LogicalChannelDict::Open() function, and       the request has been acknowledged by the remote endpoint.       The default makes sure the parameters are compatible and passes on       the PDU to the rtp session.     */    virtual BOOL OnReceivedAckPDU(      const H245_OpenLogicalChannelAck & pdu /// Acknowledgement PDU    );  //@}  protected:    RTP_Session      & rtpSession;    H323_RTP_Session & rtpCallbacks;};#endif // __CHANNELS_H/////////////////////////////////////////////////////////////////////////////

⌨️ 快捷键说明

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