MediaSource: 继承改成私有

This commit is contained in:
ziyue 2021-11-10 10:50:45 +08:00
parent 34d833a1ed
commit 37fdb8d135
7 changed files with 7 additions and 7 deletions

View File

@ -31,7 +31,7 @@ public:
}; };
//FMP4直播源 //FMP4直播源
class FMP4MediaSource : public MediaSource, public RingDelegate<FMP4Packet::Ptr>, public PacketCache<FMP4Packet>{ class FMP4MediaSource : public MediaSource, public RingDelegate<FMP4Packet::Ptr>, private PacketCache<FMP4Packet>{
public: public:
using Ptr = std::shared_ptr<FMP4MediaSource>; using Ptr = std::shared_ptr<FMP4MediaSource>;
using RingDataType = std::shared_ptr<List<FMP4Packet::Ptr> >; using RingDataType = std::shared_ptr<List<FMP4Packet::Ptr> >;

View File

@ -40,7 +40,7 @@ namespace mediakit {
* rtmp推流rtmp服务器就很简单了 * rtmp推流rtmp服务器就很简单了
* rtmp推拉流协议中metadataconfig帧 * rtmp推拉流协议中metadataconfig帧
*/ */
class RtmpMediaSource : public MediaSource, public RingDelegate<RtmpPacket::Ptr>, public PacketCache<RtmpPacket>{ class RtmpMediaSource : public MediaSource, public RingDelegate<RtmpPacket::Ptr>, private PacketCache<RtmpPacket>{
public: public:
typedef std::shared_ptr<RtmpMediaSource> Ptr; typedef std::shared_ptr<RtmpMediaSource> Ptr;
typedef std::shared_ptr<List<RtmpPacket::Ptr> > RingDataType; typedef std::shared_ptr<List<RtmpPacket::Ptr> > RingDataType;

View File

@ -27,7 +27,7 @@ using namespace std;
using namespace toolkit; using namespace toolkit;
namespace mediakit { namespace mediakit {
class RtmpMediaSourceImp: public RtmpMediaSource, public TrackListener , public MultiMediaSourceMuxer::Listener { class RtmpMediaSourceImp: public RtmpMediaSource, private TrackListener, public MultiMediaSourceMuxer::Listener {
public: public:
typedef std::shared_ptr<RtmpMediaSourceImp> Ptr; typedef std::shared_ptr<RtmpMediaSourceImp> Ptr;

View File

@ -18,7 +18,7 @@
namespace mediakit{ namespace mediakit{
class RtpCache : public PacketCache<Buffer> { class RtpCache : private PacketCache<Buffer> {
public: public:
using onFlushed = function<void(std::shared_ptr<List<Buffer::Ptr> >)>; using onFlushed = function<void(std::shared_ptr<List<Buffer::Ptr> >)>;
RtpCache(onFlushed cb); RtpCache(onFlushed cb);

View File

@ -36,7 +36,7 @@ namespace mediakit {
* rtsp推流rtsp服务器就很简单了 * rtsp推流rtsp服务器就很简单了
* rtsp推拉流协议中sdp(tcp/udp/)rtp * rtsp推拉流协议中sdp(tcp/udp/)rtp
*/ */
class RtspMediaSource : public MediaSource, public RingDelegate<RtpPacket::Ptr>, public PacketCache<RtpPacket> { class RtspMediaSource : public MediaSource, public RingDelegate<RtpPacket::Ptr>, private PacketCache<RtpPacket> {
public: public:
typedef ResourcePool<RtpPacket> PoolType; typedef ResourcePool<RtpPacket> PoolType;
typedef std::shared_ptr<RtspMediaSource> Ptr; typedef std::shared_ptr<RtspMediaSource> Ptr;

View File

@ -18,7 +18,7 @@
using namespace toolkit; using namespace toolkit;
namespace mediakit { namespace mediakit {
class RtspMediaSourceImp : public RtspMediaSource, public TrackListener, public MultiMediaSourceMuxer::Listener { class RtspMediaSourceImp : public RtspMediaSource, private TrackListener, public MultiMediaSourceMuxer::Listener {
public: public:
typedef std::shared_ptr<RtspMediaSourceImp> Ptr; typedef std::shared_ptr<RtspMediaSourceImp> Ptr;

View File

@ -31,7 +31,7 @@ public:
}; };
//TS直播源 //TS直播源
class TSMediaSource : public MediaSource, public RingDelegate<TSPacket::Ptr>, public PacketCache<TSPacket>{ class TSMediaSource : public MediaSource, public RingDelegate<TSPacket::Ptr>, private PacketCache<TSPacket>{
public: public:
using Ptr = std::shared_ptr<TSMediaSource>; using Ptr = std::shared_ptr<TSMediaSource>;
using RingDataType = std::shared_ptr<List<TSPacket::Ptr> >; using RingDataType = std::shared_ptr<List<TSPacket::Ptr> >;