#ifndef __VIDEOAVLIBSOURCE_H_INCL__ #define __VIDEOAVLIBSOURCE_H_INCL__ #include "../../../components/base/basicLIBAV.h" #include "../../../components/base/basicMediaSource.h" #include "../../../components/base/basicSettings.h" #include "../../../alg/generic/md5.h" #ifndef __linux__ //#include "platform/ms/platform_support.h" #endif /** * TODO: Add class description * * @author Gagua */ class videoAVLIBSource : public basicMediaSource { private: config_setting_t *m_pConfig; char m_pCookie[33]; VideoState *m_pVideoState; AVFrame *m_pFrame; #ifdef PROCESS_YUV420P #else AVFrame *m_pFrameBGR; #endif uint8_t *m_pOut_buffer; AVPacket *m_pPacket; int m_nWidth; int m_nHeight; int m_iY_size; struct SwsContext *img_convert_ctx; void m_fThreadProc( void ); #ifndef _NOAUDIO_ mediaBus *m_pAudioBus; static void *m_tAudioProc( void *args); #endif bool m_bSizeIsAutomatic; public: bool _open( CSTR URI, bool ShowDeviceMenu = false, float framerate=-1.f, int inputPin = -1, int width = -1, int height = -1 , bool scaled=false, int s_width=-1, int s_height=-1 ); bool _close( void ); bool _stop( void ); // Constructor videoAVLIBSource(); videoAVLIBSource( CSTR URI ); videoAVLIBSource( config_setting_t *CFG ); // Destructor virtual ~videoAVLIBSource(); bool setSize( int Width, int Height ); bool setProportionalByWidth( int Width ); bool setProportionalByHeight( int Height ); bool setFPS( int ); bool setName( CSTR Name ); bool setFrameAspectRatio( FrameAspectRatio AspectRatio ); //bool setConfig(); }; #endif // __VIDEOAVLIBSOURCE_H_INCL__