mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
新增支持播发器画面秒开功能
This commit is contained in:
parent
24bbdb48cb
commit
f3b5c8f75b
@ -41,7 +41,7 @@ public:
|
||||
RtmpMediaSource(const string &strApp, const string &strId) :
|
||||
m_strApp(strApp),
|
||||
m_strId(strId),
|
||||
m_pRing( new RingBuffer<RtmpPacket>(1)),
|
||||
m_pRing(new RingBuffer<RtmpPacket>()),
|
||||
m_thPool( MediaSender::sendThread()) {
|
||||
}
|
||||
virtual ~RtmpMediaSource() {
|
||||
@ -120,7 +120,7 @@ public:
|
||||
}
|
||||
auto _ring = m_pRing;
|
||||
m_thPool.async([_ring,pkt]() {
|
||||
_ring->write(pkt);
|
||||
_ring->write(pkt,pkt.isVideoKeyFrame());
|
||||
});
|
||||
}
|
||||
bool seekTo(uint32_t ui32Stamp) {
|
||||
|
@ -40,7 +40,7 @@ public:
|
||||
RtspMediaSource(const string &strApp, const string &strId) :
|
||||
m_strApp(strApp),
|
||||
m_strId(strId),
|
||||
m_pRing(new RingBuffer<RtpPacket::Ptr>(1)),
|
||||
m_pRing(new RingBuffer<RtpPacket::Ptr>()),
|
||||
m_thPool(MediaSender::sendThread()) {
|
||||
}
|
||||
virtual ~RtspMediaSource() {
|
||||
@ -114,7 +114,7 @@ public:
|
||||
//派生类设置该媒体源媒体描述信息
|
||||
this->m_strSdp = sdp;
|
||||
}
|
||||
virtual void onGetRTP(const RtpPacket::Ptr &rtppt, bool keyPos = true) {
|
||||
virtual void onGetRTP(const RtpPacket::Ptr &rtppt, bool keyPos) {
|
||||
auto &trackRef = m_mapTracks[rtppt->interleaved / 2];
|
||||
trackRef.seq = rtppt->sequence;
|
||||
trackRef.timeStamp = rtppt->timeStamp;
|
||||
@ -122,7 +122,7 @@ public:
|
||||
trackRef.type = rtppt->type;
|
||||
auto _outRing = m_pRing;
|
||||
m_thPool.async([_outRing,rtppt,keyPos]() {
|
||||
_outRing->write(rtppt);
|
||||
_outRing->write(rtppt,keyPos);
|
||||
});
|
||||
}
|
||||
bool seekTo(uint32_t ui32Stamp) {
|
||||
|
@ -40,7 +40,7 @@ public:
|
||||
}
|
||||
RtspMediaSource::onGetSDP(strSdp);
|
||||
}
|
||||
virtual void onGetRTP(const RtpPacket::Ptr &pRtppkt, bool bKeyPos = true) override{
|
||||
virtual void onGetRTP(const RtpPacket::Ptr &pRtppkt, bool bKeyPos) override{
|
||||
if (m_pParser) {
|
||||
bKeyPos = m_pParser->inputRtp(*pRtppkt);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user