重写MP4点播

This commit is contained in:
xiongziliang
2020-04-03 20:45:58 +08:00
parent f03365efb1
commit 46be8a38e7
17 changed files with 205 additions and 530 deletions

View File

@@ -112,7 +112,7 @@ class AACFrameNoCacheAble : public FrameNoCacheAble {
public:
typedef std::shared_ptr<AACFrameNoCacheAble> Ptr;
AACFrameNoCacheAble(char *ptr,uint32_t size,uint32_t dts,int prefixeSize = 7){
AACFrameNoCacheAble(char *ptr,uint32_t size,uint32_t dts,uint32_t pts = 0,int prefixeSize = 7){
_ptr = ptr;
_size = size;
_dts = dts;

View File

@@ -268,7 +268,7 @@ public:
*/
void inputFrame(const Frame::Ptr &frame) override{
int type = H265_TYPE(*((uint8_t *)frame->data() + frame->prefixSize()));
if(type == H265Frame::NAL_VPS){
if(frame->configFrame()){
bool first_frame = true;
splitH264(frame->data() + frame->prefixSize(),
frame->size() - frame->prefixSize(),