svvitch
digital signage player
D:/vs_workspace/switch_sf/src/svvitch/ImageContent.h
Go to the documentation of this file.
00001 #pragma once
00002 
00003 #include <Poco/Mutex.h>
00004 
00005 #include "Content.h"
00006 #include "PerformanceTimer.h"
00007 
00008 using std::string;
00009 using std::wstring;
00010 
00011 
00016 class ImageContent: public Content
00017 {
00018 private: 
00019     Poco::FastMutex _lock;
00020 
00021     int _iw;
00022     int _ih;
00023     LPDIRECT3DTEXTURE9 _target;
00024     int _tw;
00025     int _th;
00026     float _dy;
00027 
00028     bool _finished;
00029     bool _playing;
00030     PerformanceTimer _playTimer;
00031 
00032 public:
00033     ImageContent(Renderer& renderer, int splitType, float x = 0, float y = 0, float w = 0, float h = 0);
00034 
00035     virtual ‾ImageContent();
00036 
00037 
00038     void initialize();
00039 
00041     bool open(const MediaItemPtr media, const int offset = 0);
00042 
00043 
00047     void play();
00048 
00052     void stop();
00053 
00057     const bool playing() const;
00058 
00059     const bool finished();
00060 
00062     void close();
00063 
00064     virtual void process(const DWORD& frame);
00065 
00066     virtual void draw(const DWORD& frame);
00067 };
00068 
00069 typedef ImageContent* ImageContentPtr;
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines