svvitch
digital signage player
D:/vs_workspace/switch_sf/src/svvitch/FFBaseDecoder.h
Go to the documentation of this file.
00001 #pragma once
00002 
00003 #include <queue>
00004 #include <Poco/Logger.h>
00005 #include <Poco/Mutex.h>
00006 
00007 #include "FFmpeg.h"
00008 
00009 #include "Renderer.h"
00010 
00011 using std::queue;
00012 
00013 
00018 class FFBaseDecoder
00019 {
00020 private:
00021     queue<AVPacketList*> _packets;
00022 
00023 protected:
00024     Poco::FastMutex _lock;
00025     Poco::Logger& _log;
00026 
00027     Renderer& _renderer;
00028     AVFormatContext* _ic;
00029     int _streamNo;
00030 
00031     DWORD _readTime;
00032     int _readCount;
00033     float _avgTime;
00034 
00035 public:
00036     FFBaseDecoder(Renderer& renderer, AVFormatContext* ic, const int streamNo);
00037 
00038     virtual ‾FFBaseDecoder();
00039 
00040     virtual bool isReady() = 0;
00041 
00045     void clearAllPackets();
00046 
00050     const UINT bufferedPackets();
00051 
00055     void pushPacket(AVPacket* packet);
00056 
00060     AVPacketList* popPacket();
00061 
00062 
00066     const float getAvgTime() const;
00067 };
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines