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:
xia-chu
2024-03-30 14:41:20 +08:00
parent ecc05dae28
commit 390c374086
13 changed files with 31 additions and 39 deletions

View File

@@ -22,12 +22,10 @@ using namespace toolkit;
namespace mediakit {
MP4Recorder::MP4Recorder(const string &path, const string &vhost, const string &app, const string &stream_id, size_t max_second) {
MP4Recorder::MP4Recorder(const MediaTuple &tuple, const string &path, size_t max_second) {
_folder_path = path;
/////record 业务逻辑//////
_info.app = app;
_info.stream = stream_id;
_info.vhost = vhost;
static_cast<MediaTuple &>(_info) = tuple;
_info.folder = path;
GET_CONFIG(uint32_t, s_max_second, Protocol::kMP4MaxSecond);
_max_second = max_second ? max_second : s_max_second;