mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-07-06 19:58:10 +08:00
完成FLV复用器改造
优化代码结构
This commit is contained in:
@@ -87,6 +87,7 @@ public:
|
||||
virtual void onGetSDP(const string& sdp) {
|
||||
//派生类设置该媒体源媒体描述信息
|
||||
m_strSdp = sdp;
|
||||
regist();
|
||||
}
|
||||
virtual void onGetRTP(const RtpPacket::Ptr &rtppt, bool keyPos) {
|
||||
auto &trackRef = m_mapTracks[rtppt->type];
|
||||
|
||||
@@ -50,20 +50,6 @@ RtspToRtmpMediaSource::~RtspToRtmpMediaSource() {
|
||||
|
||||
}
|
||||
|
||||
bool RtspToRtmpMediaSource::regist() {
|
||||
if (m_pRtmpSrc) {
|
||||
m_pRtmpSrc->regist();
|
||||
}
|
||||
return MediaSource::regist();
|
||||
}
|
||||
|
||||
bool RtspToRtmpMediaSource::unregist() {
|
||||
if (m_pRtmpSrc) {
|
||||
m_pRtmpSrc->unregist();
|
||||
}
|
||||
return MediaSource::unregist();
|
||||
}
|
||||
|
||||
void RtspToRtmpMediaSource::makeVideoConfigPkt() {
|
||||
int8_t flags = 7; //h.264
|
||||
flags |= (FLV_KEY_FRAME << 4);
|
||||
|
||||
@@ -68,8 +68,6 @@ public:
|
||||
}
|
||||
RtspMediaSource::onGetRTP(pRtppkt, bKeyPos);
|
||||
}
|
||||
virtual bool regist() override ;
|
||||
virtual bool unregist() override;
|
||||
|
||||
int readerCount(){
|
||||
return getRing()->readerCount() + (m_pRtmpSrc ? m_pRtmpSrc->getRing()->readerCount() : 0);
|
||||
|
||||
Reference in New Issue
Block a user