完善PlayerProxy关闭机制,重试次数超限后自动关闭

This commit is contained in:
ziyue
2021-06-09 15:01:45 +08:00
parent ad2cd11eec
commit 92f879d703
5 changed files with 53 additions and 48 deletions

View File

@@ -34,15 +34,15 @@ public:
/**
* 设置play结果回调只触发一次在play执行之前有效
* @param cb
* @param cb 回调对象
*/
void setPlayCallbackOnce(const function<void(const SockException &ex)> &cb);
/**
* 设置主动关闭回调
* @param cb
* @param cb 回调对象
*/
void setOnClose(const function<void()> &cb);
void setOnClose(const function<void(const SockException &ex)> &cb);
/**
* 开始拉流播放
@@ -76,7 +76,7 @@ private:
string _stream_id;
string _pull_url;
Timer::Ptr _timer;
function<void()> _on_close;
function<void(const SockException &ex)> _on_close;
function<void(const SockException &ex)> _on_play;
MultiMediaSourceMuxer::Ptr _muxer;
};