added a "OPUS supported" message
This commit is contained in:
parent
26ef64e1c8
commit
7bed33dab4
2 changed files with 31 additions and 1 deletions
|
@ -154,6 +154,7 @@ MESSAGES (with connection)
|
|||
- "audiocod type": audio coding type, the following types are supported:
|
||||
- 0: none, no audio coding applied
|
||||
- 1: CELT
|
||||
- 2: OPUS
|
||||
- "version": version of the audio coder, if not used this value
|
||||
shall be set to 0
|
||||
- "audiocod arg": argument for the audio coder, if not used this value
|
||||
|
@ -165,6 +166,11 @@ MESSAGES (with connection)
|
|||
note: does not have any data -> n = 0
|
||||
|
||||
|
||||
// #### COMPATIBILITY OLD VERSION, TO BE REMOVED ####
|
||||
- PROTMESSID_OPUS_SUPPORTED: Informs that OPUS codec is supported
|
||||
|
||||
note: does not have any data -> n = 0
|
||||
|
||||
|
||||
CONNECTION LESS MESSAGES
|
||||
------------------------
|
||||
|
@ -572,6 +578,11 @@ case PROTMESSID_PING_MS:
|
|||
case PROTMESSID_REQ_NETW_TRANSPORT_PROPS:
|
||||
bRet = EvaluateReqNetwTranspPropsMes();
|
||||
break;
|
||||
|
||||
// #### COMPATIBILITY OLD VERSION, TO BE REMOVED ####
|
||||
case PROTMESSID_OPUS_SUPPORTED:
|
||||
bRet = EvaluateOpusSupportedMes();
|
||||
break;
|
||||
}
|
||||
|
||||
// immediately send acknowledge message
|
||||
|
@ -1337,7 +1348,8 @@ bool CProtocol::EvaluateNetwTranspPropsMes ( const CVector<uint8_t>& vecData )
|
|||
static_cast<int> ( GetValFromStream ( vecData, iPos, 2 ) );
|
||||
|
||||
if ( ( iRecCodingType != CT_NONE ) &&
|
||||
( iRecCodingType != CT_CELT ) )
|
||||
( iRecCodingType != CT_CELT ) &&
|
||||
( iRecCodingType != CT_OPUS ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -1373,6 +1385,20 @@ bool CProtocol::EvaluateReqNetwTranspPropsMes()
|
|||
return false; // no error
|
||||
}
|
||||
|
||||
void CProtocol::CreateOpusSupportedMes()
|
||||
{
|
||||
CreateAndSendMessage ( PROTMESSID_OPUS_SUPPORTED,
|
||||
CVector<uint8_t> ( 0 ) );
|
||||
}
|
||||
|
||||
bool CProtocol::EvaluateOpusSupportedMes()
|
||||
{
|
||||
// invoke message action
|
||||
emit OpusSupported();
|
||||
|
||||
return false; // no error
|
||||
}
|
||||
|
||||
|
||||
// Connection less messages ----------------------------------------------------
|
||||
void CProtocol::CreateCLPingMes ( const CHostAddress& InetAddr, const int iMs )
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
#define PROTMESSID_REQ_CHANNEL_INFOS 23 // request channel infos for fader tag
|
||||
#define PROTMESSID_CONN_CLIENTS_LIST 24 // channel infos for connected clients
|
||||
#define PROTMESSID_CHANNEL_INFOS 25 // set channel infos
|
||||
#define PROTMESSID_OPUS_SUPPORTED 26 // tells that OPUS codec is supported
|
||||
|
||||
// message IDs of connection less messages (CLM)
|
||||
// DEFINITION -> start at 1000, end at 1999, see IsConnectionLessMessageID
|
||||
|
@ -99,6 +100,7 @@ public:
|
|||
void CreatePingMes ( const int iMs );
|
||||
void CreateNetwTranspPropsMes ( const CNetworkTransportProps& NetTrProps );
|
||||
void CreateReqNetwTranspPropsMes();
|
||||
void CreateOpusSupportedMes();
|
||||
|
||||
void CreateCLPingMes ( const CHostAddress& InetAddr, const int iMs );
|
||||
void CreateCLPingWithNumClientsMes ( const CHostAddress& InetAddr,
|
||||
|
@ -212,6 +214,7 @@ protected:
|
|||
bool EvaluatePingMes ( const CVector<uint8_t>& vecData );
|
||||
bool EvaluateNetwTranspPropsMes ( const CVector<uint8_t>& vecData );
|
||||
bool EvaluateReqNetwTranspPropsMes();
|
||||
bool EvaluateOpusSupportedMes();
|
||||
|
||||
bool EvaluateCLPingMes ( const CHostAddress& InetAddr,
|
||||
const CVector<uint8_t>& vecData );
|
||||
|
@ -258,6 +261,7 @@ signals:
|
|||
void ChangeChanName ( QString strName );
|
||||
void ChangeChanInfo ( CChannelCoreInfo ChanInfo );
|
||||
void ReqChanInfo();
|
||||
void OpusSupported();
|
||||
void ChatTextReceived ( QString strChatText );
|
||||
void PingReceived ( int iMs );
|
||||
void NetTranspPropsReceived ( CNetworkTransportProps NetworkTransportProps );
|
||||
|
|
Loading…
Reference in a new issue