mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
MediaSource: 继承改成私有
This commit is contained in:
parent
34d833a1ed
commit
37fdb8d135
@ -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> >;
|
||||
|
@ -40,7 +40,7 @@ namespace mediakit {
|
||||
* 只要生成了这三要素,那么要实现rtmp推流、rtmp服务器就很简单了
|
||||
* rtmp推拉流协议中,先传递metadata,然后传递config帧,然后一直传递普通帧
|
||||
*/
|
||||
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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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> >;
|
||||
|
Loading…
Reference in New Issue
Block a user