From 25a151d517f60a76de91095abcbf32a395949825 Mon Sep 17 00:00:00 2001 From: zhangmeng <775834166@qq.com> Date: 星期二, 25 五月 2021 15:14:02 +0800 Subject: [PATCH] bug avoid gb28181 lib --- csrc/ffmpeg/format/FormatIn.hpp | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/csrc/ffmpeg/format/FormatIn.hpp b/csrc/ffmpeg/format/FormatIn.hpp index 4eb7847..aebdbf8 100644 --- a/csrc/ffmpeg/format/FormatIn.hpp +++ b/csrc/ffmpeg/format/FormatIn.hpp @@ -3,7 +3,6 @@ #include <stdint.h> #include <memory> -#include <vector> #include "PsToEs.hpp" struct AVFormatContext; @@ -25,6 +24,7 @@ { public: explicit FormatIn(bool hw=true); + explicit FormatIn(const VideoProp &prop, bool hw=true); ~FormatIn(); public: @@ -47,16 +47,19 @@ bool allocCodec(AVCodec *dec, AVStream *s, AVDictionary **options); public: AVStream *getStream(int type = -1); - std::vector<AVStream*> allStreams(); AVCodecContext *getCodecContext(int type = 0); AVFormatContext *getFromatContext(){return ctx_;} const double getFPS()const{return fps_;} + const bool IsHEVC()const; + const bool IsAVC1()const; private: AVFormatContext *ctx_; AVCodecContext *dec_ctx_; int vs_idx_; int as_idx_; + + VideoProp *prop_; bool hw_accl_; double fps_; private: -- Gitblit v1.8.0