mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-30 06:42:22 +08:00
完成MediaSource生成器
This commit is contained in:
@@ -49,7 +49,7 @@ using namespace toolkit;
|
||||
|
||||
namespace mediakit {
|
||||
|
||||
class RtspMediaSource: public MediaSource {
|
||||
class RtspMediaSource: public MediaSource , public RingDelegate<RtpPacket::Ptr> {
|
||||
public:
|
||||
typedef ResourcePool<RtpPacket> PoolType;
|
||||
typedef std::shared_ptr<RtspMediaSource> Ptr;
|
||||
@@ -93,6 +93,11 @@ public:
|
||||
trackRef.type = rtppt->type;
|
||||
_pRing->write(rtppt,keyPos);
|
||||
}
|
||||
|
||||
private:
|
||||
void onWrite(const RtpPacket::Ptr &rtppt, bool keyPos) override {
|
||||
onGetRTP(rtppt,keyPos);
|
||||
}
|
||||
protected:
|
||||
unordered_map<int, RtspTrack> _mapTracks;
|
||||
string _strSdp; //媒体描述信息
|
||||
|
||||
Reference in New Issue
Block a user