mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-23 03:10:04 +08:00
发送GET_PARAMETER命令兼容一些rtsp服务器:#284
This commit is contained in:
parent
abe1698601
commit
91080e507c
@ -377,6 +377,11 @@ void RtspPlayer::sendDescribe() {
|
|||||||
sendRtspRequest("DESCRIBE",_strUrl,{"Accept","application/sdp"});
|
sendRtspRequest("DESCRIBE",_strUrl,{"Accept","application/sdp"});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RtspPlayer::sendGetParameter(){
|
||||||
|
_onHandshake = [this](const Parser& parser){};
|
||||||
|
sendRtspRequest("GET_PARAMETER",_strUrl);
|
||||||
|
}
|
||||||
|
|
||||||
void RtspPlayer::sendPause(int type , uint32_t seekMS){
|
void RtspPlayer::sendPause(int type , uint32_t seekMS){
|
||||||
_onHandshake = std::bind(&RtspPlayer::handleResPAUSE,this, placeholders::_1,type);
|
_onHandshake = std::bind(&RtspPlayer::handleResPAUSE,this, placeholders::_1,type);
|
||||||
//开启或暂停rtsp
|
//开启或暂停rtsp
|
||||||
@ -727,6 +732,9 @@ void RtspPlayer::onRecvRTP_l(const RtpPacket::Ptr &pkt, const SdpTrack::Ptr &tra
|
|||||||
sendReceiverReport(_eType == Rtsp::RTP_TCP,iTrackIndex);
|
sendReceiverReport(_eType == Rtsp::RTP_TCP,iTrackIndex);
|
||||||
ticker.resetTime();
|
ticker.resetTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//有些rtsp服务器需要rtcp保活,有些需要发送信令保活
|
||||||
|
sendGetParameter();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ private:
|
|||||||
void sendSetup(unsigned int uiTrackIndex);
|
void sendSetup(unsigned int uiTrackIndex);
|
||||||
void sendPause(int type , uint32_t ms);
|
void sendPause(int type , uint32_t ms);
|
||||||
void sendDescribe();
|
void sendDescribe();
|
||||||
|
void sendGetParameter();
|
||||||
void sendRtspRequest(const string &cmd, const string &url ,const StrCaseMap &header = StrCaseMap());
|
void sendRtspRequest(const string &cmd, const string &url ,const StrCaseMap &header = StrCaseMap());
|
||||||
void sendRtspRequest(const string &cmd, const string &url ,const std::initializer_list<string> &header);
|
void sendRtspRequest(const string &cmd, const string &url ,const std::initializer_list<string> &header);
|
||||||
void sendReceiverReport(bool overTcp,int iTrackIndex);
|
void sendReceiverReport(bool overTcp,int iTrackIndex);
|
||||||
|
Loading…
Reference in New Issue
Block a user