| | |
| | | |
| | | #include <stdint.h> |
| | | #include <memory> |
| | | #include <vector> |
| | | #include "PsToEs.hpp" |
| | | |
| | | struct AVFormatContext; |
| | |
| | | struct AVFrame; |
| | | struct AVCodec; |
| | | struct AVIOContext; |
| | | struct AVBSFContext; |
| | | |
| | | typedef int(* read_packet)(void *opaque,uint8_t *buf, int buf_size); |
| | | |
| | |
| | | { |
| | | public: |
| | | explicit FormatIn(bool hw=true); |
| | | explicit FormatIn(const VideoProp &prop, bool hw=true); |
| | | ~FormatIn(); |
| | | |
| | | public: |
| | |
| | | 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_; |
| | | |
| | | AVBSFContext *bsf_h264, *bsf_hevc; |
| | | |
| | | VideoProp *prop_; |
| | | bool hw_accl_; |
| | | double fps_; |
| | | private: |