重新mp4录制

This commit is contained in:
xiongziliang
2019-08-01 18:49:04 +08:00
parent 12e1068a39
commit 383a14a76d
14 changed files with 470 additions and 417 deletions

View File

@@ -82,6 +82,16 @@ public:
bool keyFrame() const override {
return H264_TYPE(buffer[iPrefixSize]) == H264Frame::NAL_IDR;
}
bool configFrame() const override{
switch(H264_TYPE(buffer[iPrefixSize]) ){
case H264Frame::NAL_SPS:
case H264Frame::NAL_PPS:
return true;
default:
return false;
}
}
public:
uint32_t timeStamp;
uint32_t ptsStamp = 0;
@@ -118,6 +128,16 @@ public:
bool keyFrame() const override {
return H264_TYPE(_ptr[_prefixSize]) == H264Frame::NAL_IDR;
}
bool configFrame() const override{
switch(H264_TYPE(_ptr[_prefixSize])){
case H264Frame::NAL_SPS:
case H264Frame::NAL_PPS:
return true;
default:
return false;
}
}
};
/**