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直播源
class FMP4MediaSource : public MediaSource, public RingDelegate<FMP4Packet::Ptr>, public PacketCache<FMP4Packet>{
class FMP4MediaSource : public MediaSource, public RingDelegate<FMP4Packet::Ptr>, private PacketCache<FMP4Packet>{
public:
using Ptr = std::shared_ptr<FMP4MediaSource>;
using RingDataType = std::shared_ptr<List<FMP4Packet::Ptr> >;

View File

@ -40,7 +40,7 @@ namespace mediakit {
* rtmp推流rtmp服务器就很简单了
* 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:
typedef std::shared_ptr<RtmpMediaSource> Ptr;
typedef std::shared_ptr<List<RtmpPacket::Ptr> > RingDataType;

View File

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

View File

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

View File

@ -36,7 +36,7 @@ namespace mediakit {
* rtsp推流rtsp服务器就很简单了
* 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:
typedef ResourcePool<RtpPacket> PoolType;
typedef std::shared_ptr<RtspMediaSource> Ptr;

View File

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

View File

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