From a8b447be656145c9ba2a2d8319a10ae8f726de1f Mon Sep 17 00:00:00 2001 From: zhangmeng <775834166@qq.com> Date: 星期五, 09 十月 2020 18:20:46 +0800 Subject: [PATCH] h264 mp4 --- csrc/ffmpeg/format/FormatIn.hpp | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/csrc/ffmpeg/format/FormatIn.hpp b/csrc/ffmpeg/format/FormatIn.hpp index e904145..b441c0b 100644 --- a/csrc/ffmpeg/format/FormatIn.hpp +++ b/csrc/ffmpeg/format/FormatIn.hpp @@ -13,6 +13,7 @@ struct AVFrame; struct AVCodec; struct AVIOContext; +struct AVBSFContext; typedef int(* read_packet)(void *opaque,uint8_t *buf, int buf_size); @@ -24,6 +25,7 @@ { public: explicit FormatIn(bool hw=true); + explicit FormatIn(const VideoProp &prop, bool hw=true); ~FormatIn(); public: @@ -50,12 +52,16 @@ 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_; + AVBSFContext *bsf_h264, *bsf_hevc; + + VideoProp *prop_; bool hw_accl_; double fps_; private: -- Gitblit v1.8.0