解决一些设备的兼容性问题

This commit is contained in:
xiongziliang 2018-03-26 22:15:18 +08:00
parent 03507e5bfc
commit 782b1b479e
2 changed files with 11 additions and 4 deletions

@ -1 +1 @@
Subproject commit 378e05030f5faef37612d9cb69adb70a222b0a9d Subproject commit d01d88829a033b49dc3cfdb4418cf1b8225af68a

View File

@ -63,7 +63,10 @@ void RtspPlayer::teardown(){
if (alive()) { if (alive()) {
write("TEARDOWN %s RTSP/1.0\r\n" write("TEARDOWN %s RTSP/1.0\r\n"
"CSeq: %d\r\n" "CSeq: %d\r\n"
"Session: %s\r\n\r\n", m_strContentBase.c_str(), m_uiCseq++, "Authorization: Basic %s\r\n"
"Session: %s\r\n\r\n",
m_strContentBase.c_str(), m_uiCseq++,
m_strAuthorization.c_str(),
m_strSession.c_str()); m_strSession.c_str());
m_uiTrackCnt = 0; m_uiTrackCnt = 0;
@ -399,8 +402,11 @@ bool RtspPlayer::sendOptions() {
}; };
return -1 != write( "OPTIONS %s RTSP/1.0\r\n" return -1 != write( "OPTIONS %s RTSP/1.0\r\n"
"CSeq: %d\r\n" "CSeq: %d\r\n"
"Authorization: Basic %s\r\n"
"Session: %s\r\n\r\n", "Session: %s\r\n\r\n",
m_strContentBase.c_str(), m_uiCseq++, m_strSession.c_str()); m_strContentBase.c_str(), m_uiCseq++,
m_strAuthorization.c_str(),
m_strSession.c_str());
} }
inline void RtspPlayer::sendPause(bool bPause,float fTime){ inline void RtspPlayer::sendPause(bool bPause,float fTime){
//开启或暂停rtsp //开启或暂停rtsp
@ -408,9 +414,10 @@ inline void RtspPlayer::sendPause(bool bPause,float fTime){
write("%s %s RTSP/1.0\r\n" write("%s %s RTSP/1.0\r\n"
"CSeq: %d\r\n" "CSeq: %d\r\n"
"Session: %s\r\n" "Session: %s\r\n"
"Authorization: Basic %s\r\n"
"Range: npt=%.2f-\r\n\r\n", bPause ? "PAUSE" : "PLAY", "Range: npt=%.2f-\r\n\r\n", bPause ? "PAUSE" : "PLAY",
m_strContentBase.c_str(), m_uiCseq++, m_strContentBase.c_str(), m_uiCseq++,
m_strSession.c_str(),fTime); m_strSession.c_str(),m_strAuthorization.c_str(),fTime);
if(!bPause){ if(!bPause){
//修改时间轴 //修改时间轴