📄 h323caps.h
字号:
/**This class describes the interface to an audio 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 H323AudioCapability : public H323RealTimeCapability{ PCLASSINFO(H323AudioCapability, H323RealTimeCapability); public: /**@name Construction */ //@{ /**Create an audio based capability. */ H323AudioCapability( unsigned rxPacketSize, /// Maximum size of an audio packet in bytes unsigned txPacketSize /// Desired transmit size of an audio packet ); //@} /**@name Identification functions */ //@{ /**Get the main type of the capability. Always returns e_Audio. */ virtual MainTypes GetMainType() const; //@} /**@name Operations */ //@{ /**Get the default RTP session. This function gets the default RTP session ID for the capability type. For example audio capabilities return the value RTP_Session::DefaultAudioSessionID etc. The default behaviour returns zero, indicating it is not an RTP based capability. */ virtual unsigned GetDefaultSessionID() const; /**Set the maximum size (in frames) of data that will be transmitted in a single PDU. This will also be the desired number that will be sent by most codec implemetations. The default behaviour sets the txFramesInPacket variable. */ virtual void SetTxFramesInPacket( unsigned frames /// Number of frames per packet ); /**Get the maximum size (in frames) of data that will be transmitted in a single PDU. The default behaviour sends the txFramesInPacket variable. */ virtual unsigned GetTxFramesInPacket() const; /**Get the maximum size (in frames) of data that can be received in a single PDU. The default behaviour sends the rxFramesInPacket variable. */ virtual unsigned GetRxFramesInPacket() const; /**Get the maximum size (in bytes) of a single frame of codec data. The default behaviour returns the maxFrameSize variable. */ virtual unsigned GetMaxFrameSize() 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_AudioCapability & pdu, /// PDU to set information on unsigned packetSize /// Packet size to use in capability ) 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_AudioCapability & pdu, /// PDU to get information from unsigned & packetSize /// Packet size to use in capability ) = 0; //@} protected: unsigned rxFramesInPacket; unsigned txFramesInPacket; unsigned maxFrameSize;};/**This class describes the interface to a non-standard audio 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 H323NonStandardAudioCapability : public H323AudioCapability, public H323NonStandardCapabilityInfo{ PCLASSINFO(H323NonStandardAudioCapability, H323AudioCapability); public: /**@name Construction */ //@{ /**Create a new set of information about a non-standard codec. */ H323NonStandardAudioCapability( unsigned maxPacketSize, /// Maximum size of an audio packet in bytes unsigned desiredPacketSize, /// Desired transmit size of an audio packet 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. */ H323NonStandardAudioCapability( unsigned maxPacketSize, /// Maximum size of an audio packet in bytes unsigned desiredPacketSize, /// Desired transmit size of an audio packet 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. */ H323NonStandardAudioCapability( unsigned maxPacketSize, /// Maximum size of an audio packet in bytes unsigned desiredPacketSize, /// Desired transmit size of an audio packet 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 H245_AudioCapability::e_nonStandard. */ 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_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 calls H323NonStandardCapabilityinfo::OnReceivedPDU() to handle the provided PDU. */ virtual BOOL OnReceivedPDU( const H245_AudioCapability & pdu, /// PDU to get information from unsigned & packetSize /// Packet size to use in capability ); //@}};/**This class describes the interface to a video 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 a codec. */class H323VideoCapability : public H323RealTimeCapability{ PCLASSINFO(H323VideoCapability, H323RealTimeCapability); public: /**@name Identification functions */ //@{ /**Get the main type of the capability. Always returns e_Video. */ virtual MainTypes GetMainType() const; //@} /**@name Operations */ //@{ /**Get the default RTP session. This function gets the default RTP session ID for the capability type. For example audio capabilities return the value RTP_Session::DefaultAudioSessionID etc. The default behaviour returns zero, indicating it is not an RTP based capability. */ virtual unsigned GetDefaultSessionID() 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_VideoCapability & 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_VideoCapability & pdu /// PDU to set information on ) = 0; //@}};/**This class describes the interface to a non-standard video 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 H323NonStandardVideoCapability : public H323VideoCapability, public H323NonStandardCapabilityInfo{ PCLASSINFO(H323NonStandardVideoCapability, H323VideoCapability); public: /**@name Construction */ //@{ /**Create a new set of information about a non-standard codec. */ H323NonStandardVideoCapability( 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. */ H323NonStandardVideoCapability( 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. */ H323NonStandardVideoCapability( 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 );
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -