Commit 782b1b47 by xiongziliang

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

parent 03507e5b
Subproject commit 378e05030f5faef37612d9cb69adb70a222b0a9d Subproject commit d01d88829a033b49dc3cfdb4418cf1b8225af68a
...@@ -63,7 +63,10 @@ void RtspPlayer::teardown(){ ...@@ -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() { ...@@ -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){ ...@@ -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){
//修改时间轴 //修改时间轴
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论