#ifndef _NVIDIA_VIDEO_DECODER_H_ #define _NVIDIA_VIDEO_DECODER_H_ #include #include "NvDecoder.h" #include "video_decoder.h" class NvidiaVideoDecoder : public VideoDecoder { public: NvidiaVideoDecoder(); virtual ~NvidiaVideoDecoder(); public: int Init(); int Decode(const uint8_t* data, size_t size, std::function on_receive_decoded_frame); std::string GetDecoderName() { return "NvidiaH264"; } private: NvDecoder* decoder = nullptr; bool get_first_keyframe_ = false; bool skip_frame_ = false; FILE* file_h264_ = nullptr; FILE* file_nv12_ = nullptr; }; #endif