// // FFmpegDecoder.h // FFmpegRTSPServer // // Created by Mina Saad on 9/22/15. // Copyright (c) 2015 Mina Saad. All rights reserved. // #ifndef MESAI_FFmpegDecoder_H #define MESAI_FFmpegDecoder_H #include #include #include #include #include extern "C" { #include #include #include #include #include } namespace MESAI { class FFmpegDecoder { public: FFmpegDecoder(std::string); ~FFmpegDecoder(); void intialize(); void playMedia(); void finalize(); void setOnframeCallbackFunction(std::function func); int width; int height; int GOP; int frameRate; int bitrate; std::function onFrame; private: std::string path; AVCodecContext *pCodecCtx; AVFormatContext *pFormatCtx; AVFrame *pFrameRGB; struct SwsContext * img_convert_ctx; int videoStream; }; } #endif