解决播放成功与中途断开事件触发紊乱的问题:#143

This commit is contained in:
xiongziliang
2019-11-19 15:52:02 +08:00
parent 85cd4a7d02
commit e6d511cc9e
5 changed files with 140 additions and 127 deletions

View File

@@ -101,7 +101,7 @@ protected:
void onErr(const SockException &ex) override;
private:
void onRecvRTP_l(const RtpPacket::Ptr &pRtppt, const SdpTrack::Ptr &track);
void onPlayResult_l(const SockException &ex);
void onPlayResult_l(const SockException &ex , bool handshakeCompleted);
int getTrackIndexByControlSuffix(const string &controlSuffix) const;
int getTrackIndexByInterleaved(int interleaved) const;
@@ -111,12 +111,11 @@ private:
void handleResSETUP(const Parser &parser, unsigned int uiTrackIndex);
void handleResDESCRIBE(const Parser &parser);
bool handleAuthenticationFailure(const string &wwwAuthenticateParamsStr);
void handleResPAUSE(const Parser &parser, bool bPause);
void handleResPAUSE(const Parser &parser, int type);
//发送SETUP命令
void sendSetup(unsigned int uiTrackIndex);
void sendPause(bool bPause,uint32_t ms, bool range);
void sendOptions();
void sendPause(int type , uint32_t ms);
void sendDescribe();
void sendRtspRequest(const string &cmd, const string &url ,const StrCaseMap &header = StrCaseMap());