mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-07-06 03:28:09 +08:00
Optimize the code
1. change param_strs to params 2. move params from MediaInfo to MediaTuple 3. passing MediaTuple as a parameter for some functions
This commit is contained in:
@@ -195,10 +195,8 @@ std::shared_ptr<FILE> HlsMakerImp::makeFile(const string &file, bool setbuf) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
void HlsMakerImp::setMediaSource(const string &vhost, const string &app, const string &stream_id) {
|
||||
_info.app = app;
|
||||
_info.stream = stream_id;
|
||||
_info.vhost = vhost;
|
||||
void HlsMakerImp::setMediaSource(const MediaTuple& tuple) {
|
||||
static_cast<MediaTuple &>(_info) = tuple;
|
||||
_media_src = std::make_shared<HlsMediaSource>(isFmp4() ? HLS_FMP4_SCHEMA : HLS_SCHEMA, _info);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user