// // H264FramedSource.h // FFmpegRTSPServer // // Created by Mina Saad on 9/22/15. // Created by HOU Xiao on 8/7/17. // Copyright (c) 2015 Mina Saad. All rights reserved. // #ifndef MESAI_H264FRAMEDSOURCE_HH #define MESAI_H264FRAMEDSOURCE_HH #include #include #include #include namespace MESAI { class H264FramedSource : public FramedSource { public: struct FrameCallbacks { void* args; typedef bool(*deliver_frame_callback_t)(void* args, uint8_t*& buffer, size_t& buffSize, timeval& pts); typedef void(*release_frame_callback_t)(void* args) ; deliver_frame_callback_t deliverFrameCallback; release_frame_callback_t releaseFrameCallback; }; public: static H264FramedSource* createNew(UsageEnvironment& env, const FrameCallbacks& _cbs); H264FramedSource(UsageEnvironment& env, const FrameCallbacks& _cbs); ~H264FramedSource(); virtual std::string getAuxLine() const; public: std::string spsBase64; std::string ppsBase64; private: virtual void doGetNextFrame(); FrameCallbacks cbs; }; } #endif