ps rtp推流接口(startSendRtp)支持推送本地mp4录像

This commit is contained in:
ziyue
2021-10-21 10:21:52 +08:00
parent a25e1d6021
commit 4067f2beb6
4 changed files with 18 additions and 16 deletions

View File

@@ -275,19 +275,15 @@ public:
////////////////static方法查找或生成MediaSource////////////////
// 同步查找流
static Ptr find(const string &schema, const string &vhost, const string &app, const string &id);
static Ptr find(const string &schema, const string &vhost, const string &app, const string &id, bool from_mp4 = false);
// 忽略类型同步查找流可能返回rtmp/rtsp/hls类型
static Ptr find(const string &vhost, const string &app, const string &stream_id);
static Ptr find(const string &vhost, const string &app, const string &stream_id, bool from_mp4 = false);
// 异步查找流
static void findAsync(const MediaInfo &info, const std::shared_ptr<Session> &session, const function<void(const Ptr &src)> &cb);
// 遍历所有流
static void for_each_media(const function<void(const Ptr &src)> &cb,
const string &schema = "",
const string &vhost = "",
const string &app = "",
const string &stream = "");
static void for_each_media(const function<void(const Ptr &src)> &cb, const string &schema = "", const string &vhost = "", const string &app = "", const string &stream = "");
// 从mp4文件生成MediaSource
static MediaSource::Ptr createFromMP4(const string &schema, const string &vhost, const string &app, const string &stream, const string &file_path = "", bool check_app = true);