add RtspMediaSource::Clone

This commit is contained in:
Johnny
2023-05-11 20:47:40 +08:00
committed by 夏楚
parent 51e9313275
commit f4ee607feb
6 changed files with 21 additions and 9 deletions

View File

@@ -12,7 +12,7 @@
#define ZLMEDIAKIT_WEBRTCPUSHER_H
#include "WebRtcTransport.h"
#include "Rtsp/RtspMediaSourceImp.h"
#include "Rtsp/RtspMediaSource.h"
namespace mediakit {
@@ -20,7 +20,7 @@ class WebRtcPusher : public WebRtcTransportImp, public MediaSourceEvent {
public:
using Ptr = std::shared_ptr<WebRtcPusher>;
~WebRtcPusher() override = default;
static Ptr create(const EventPoller::Ptr &poller, const RtspMediaSourceImp::Ptr &src,
static Ptr create(const EventPoller::Ptr &poller, const RtspMediaSource::Ptr &src,
const std::shared_ptr<void> &ownership, const MediaInfo &info, const ProtocolOption &option, bool preferred_tcp = false);
protected:
@@ -51,7 +51,7 @@ protected:
float getLossRate(MediaSource &sender,TrackType type) override;
private:
WebRtcPusher(const EventPoller::Ptr &poller, const RtspMediaSourceImp::Ptr &src,
WebRtcPusher(const EventPoller::Ptr &poller, const RtspMediaSource::Ptr &src,
const std::shared_ptr<void> &ownership, const MediaInfo &info, const ProtocolOption &option, bool preferred_tcp);
private:
@@ -61,7 +61,7 @@ private:
//媒体相关元数据
MediaInfo _media_info;
//推流的rtsp源
RtspMediaSourceImp::Ptr _push_src;
RtspMediaSource::Ptr _push_src;
//推流所有权
std::shared_ptr<void> _push_src_ownership;
//推流的rtsp源,支持simulcast