mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-16 13:05:59 +08:00
此pr主要为了修复 #2629,通过新增getMuxer接口, 可以直接获取到所有协议共享的MultiMediaSourceMuxer对象, 在此对象完成事件拦截,防止某种协议事件丢失。 同时调整了下FFmpegSource.cpp代码格式。
This commit is contained in:
@@ -71,6 +71,14 @@ static string getTrackInfoStr(const TrackSource *track_src){
|
||||
return std::move(codec_info);
|
||||
}
|
||||
|
||||
const ProtocolOption &MultiMediaSourceMuxer::getOption() const {
|
||||
return _option;
|
||||
}
|
||||
|
||||
const MediaTuple &MultiMediaSourceMuxer::getMediaTuple() const {
|
||||
return _tuple;
|
||||
}
|
||||
|
||||
std::string MultiMediaSourceMuxer::shortUrl() const {
|
||||
auto ret = getOriginUrl(MediaSource::NullMediaSource());
|
||||
if (!ret.empty()) {
|
||||
@@ -361,6 +369,10 @@ EventPoller::Ptr MultiMediaSourceMuxer::getOwnerPoller(MediaSource &sender) {
|
||||
}
|
||||
}
|
||||
|
||||
std::shared_ptr<MultiMediaSourceMuxer> MultiMediaSourceMuxer::getMuxer(MediaSource &sender) {
|
||||
return shared_from_this();
|
||||
}
|
||||
|
||||
bool MultiMediaSourceMuxer::onTrackReady(const Track::Ptr &track) {
|
||||
bool ret = false;
|
||||
if (_rtmp) {
|
||||
|
||||
Reference in New Issue
Block a user