转协议选项抽象为ProtocolOption对象

This commit is contained in:
xiongziliang
2022-03-12 13:19:21 +08:00
parent ed661b1cf1
commit 4dc621e1bb
27 changed files with 187 additions and 135 deletions

View File

@@ -132,9 +132,12 @@ int main(int argc, char *argv[]) {
mINI::Instance()[General::kFMP4Demand] = demand;
map<string, PlayerProxy::Ptr> proxyMap;
ProtocolOption option;
option.enable_hls = false;
option.enable_mp4 = false;
for (auto i = 0; i < proxy_count; ++i) {
auto stream = to_string(i);
PlayerProxy::Ptr player(new PlayerProxy(DEFAULT_VHOST, "live", stream, false, false));
PlayerProxy::Ptr player(new PlayerProxy(DEFAULT_VHOST, "live", stream, option));
(*player)[Client::kRtpType] = rtp_type;
player->play(in_url);
proxyMap.emplace(stream, player);