复用printSSRC函数

This commit is contained in:
xiongziliang
2020-07-07 09:58:08 +08:00
parent 80d9f8ccaa
commit 30260e5414
4 changed files with 11 additions and 11 deletions

View File

@@ -1068,15 +1068,6 @@ bool RtspSession::sendRtspResponse(const string &res_code,
return sendRtspResponse(res_code,header_map,sdp,protocol);
}
inline string RtspSession::printSSRC(uint32_t ui32Ssrc) {
char tmp[9] = { 0 };
ui32Ssrc = htonl(ui32Ssrc);
uint8_t *pSsrc = (uint8_t *) &ui32Ssrc;
for (int i = 0; i < 4; i++) {
sprintf(tmp + 2 * i, "%02X", pSsrc[i]);
}
return tmp;
}
inline int RtspSession::getTrackIndexByTrackType(TrackType type) {
for (unsigned int i = 0; i < _aTrackInfo.size(); i++) {
if (type == _aTrackInfo[i]->_type) {