mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-07-04 18:17:34 +08:00
优化rtmp相关性能
This commit is contained in:
@@ -139,6 +139,24 @@ public:
|
||||
uint32_t streamId;
|
||||
uint32_t chunkId;
|
||||
std::string strBuf;
|
||||
|
||||
public:
|
||||
RtmpPacket() = default;
|
||||
RtmpPacket(const RtmpPacket &that) = default;
|
||||
RtmpPacket &operator=(const RtmpPacket &that) = default;
|
||||
RtmpPacket &operator=(RtmpPacket &&that) = default;
|
||||
|
||||
RtmpPacket(RtmpPacket &&that){
|
||||
typeId = that.typeId;
|
||||
bodySize = that.bodySize;
|
||||
timeStamp = that.timeStamp;
|
||||
hasAbsStamp = that.hasAbsStamp;
|
||||
hasExtStamp = that.hasExtStamp;
|
||||
deltaStamp = that.deltaStamp;
|
||||
streamId = that.streamId;
|
||||
chunkId = that.chunkId;
|
||||
strBuf = std::move(that.strBuf);
|
||||
}
|
||||
bool isVideoKeyFrame() const {
|
||||
return typeId == MSG_VIDEO && (uint8_t) strBuf[0] >> 4 == FLV_KEY_FRAME
|
||||
&& (uint8_t) strBuf[1] == 1;
|
||||
|
||||
Reference in New Issue
Block a user