新增mp4点播接口loadMP4File (#3018 #2972)

This commit is contained in:
夏楚
2023-11-24 10:44:08 +08:00
committed by GitHub
parent 92e7d8837e
commit db0818c8d2
5 changed files with 221 additions and 37 deletions

View File

@@ -28,7 +28,12 @@ public:
* @param stream_id 流id,置空时,只解复用mp4,但是不生成MediaSource
* @param file_path 文件路径,如果为空则根据配置文件和上面参数自动生成,否则使用指定的文件
*/
MP4Reader(const std::string &vhost, const std::string &app, const std::string &stream_id, const std::string &file_path = "");
MP4Reader(const std::string &vhost, const std::string &app, const std::string &stream_id,
const std::string &file_path = "");
MP4Reader(const std::string &vhost, const std::string &app, const std::string &stream_id,
const std::string &file_path, const ProtocolOption &option);
~MP4Reader() override = default;
/**
@@ -66,6 +71,8 @@ private:
void setCurrentStamp(uint32_t stamp);
bool seekTo(uint32_t stamp_seek);
void setup(const std::string &vhost, const std::string &app, const std::string &stream_id, const std::string &file_path, const ProtocolOption &option);
private:
bool _file_repeat = false;
bool _have_video = false;