精简等待监听流异步注册后回复事件相关代码

This commit is contained in:
xiongziliang
2019-05-27 22:32:07 +08:00
parent eabb673005
commit 0dc7cbb879
6 changed files with 129 additions and 240 deletions

View File

@@ -42,6 +42,10 @@
using namespace std;
using namespace toolkit;
namespace toolkit{
class TcpSession;
}//namespace toolkit
namespace mediakit {
class MediaSource;
@@ -90,7 +94,6 @@ public:
string _param_strs;
};
class MediaSource: public enable_shared_from_this<MediaSource> {
public:
typedef std::shared_ptr<MediaSource> Ptr;
@@ -122,6 +125,12 @@ public:
const string &id,
bool bMake = true) ;
static void findAsync(const MediaInfo &info,
const std::shared_ptr<TcpSession> &session,
bool retry,
int maxWaitMs,
const function<void(const MediaSource::Ptr &src)> &cb);
const string& getSchema() const {
return _strSchema;
}