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