mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-26 03:42:21 +08:00
完成MediaSource生成器
This commit is contained in:
@@ -48,7 +48,7 @@ using namespace toolkit;
|
||||
|
||||
namespace mediakit {
|
||||
|
||||
class RtmpMediaSource: public MediaSource {
|
||||
class RtmpMediaSource: public MediaSource ,public RingDelegate<RtmpPacket::Ptr> {
|
||||
public:
|
||||
typedef std::shared_ptr<RtmpMediaSource> Ptr;
|
||||
typedef RingBuffer<RtmpPacket::Ptr> RingType;
|
||||
@@ -107,6 +107,10 @@ private:
|
||||
lock_guard<recursive_mutex> lock(_mtxMap);
|
||||
return _iCfgFrameSize != -1 && _iCfgFrameSize == _mapCfgFrame.size();
|
||||
}
|
||||
|
||||
void onWrite(const RtmpPacket::Ptr &pkt,bool isKey = true) override {
|
||||
onGetMedia(pkt);
|
||||
}
|
||||
protected:
|
||||
AMFValue _metadata;
|
||||
unordered_map<int, RtmpPacket::Ptr> _mapCfgFrame;
|
||||
|
||||
Reference in New Issue
Block a user