svvitch
digital signage player
D:/vs_workspace/switch_sf/src/svvitch/CaptureContent.h
Go to the documentation of this file.
00001 #pragma once
00002 
00003 #include <queue>
00004 #include <Poco/Mutex.h>
00005 #include <Poco/Thread.h>
00006 #include <Poco/Runnable.h>
00007 
00008 #include "Content.h"
00009 #include "CaptureScene.h"
00010 #include "MediaItem.h"
00011 #include "PerformanceTimer.h"
00012 #include "Renderer.h"
00013 #include "Workspace.h"
00014 
00015 using std::queue;
00016 using std::string;
00017 using std::wstring;
00018 
00019 
00024 class CaptureContent: public Content
00025 {
00026 private:
00027     Poco::FastMutex _lock;
00028 
00029     CaptureScenePtr _scene;
00030 
00031     float _subtract;
00032     int _intervalDiff;
00033     int _intervalSmall;
00034 
00035     LPD3DXEFFECT _fx;
00036     LPDIRECT3DTEXTURE9 _small1;
00037     LPDIRECT3DTEXTURE9 _small2;
00038     LPDIRECT3DTEXTURE9 _diff;
00039     LPDIRECT3DSURFACE9 _diff2;
00040     LPDIRECT3DTEXTURE9 _image;
00041     int _detectThreshold;
00042     int _diffCount;
00043 
00044     bool _detected;
00045     int _doShutter;
00046     int _viewPhoto;
00047 
00048     bool _finished;
00049     bool _playing;
00050     PerformanceTimer _playTimer;
00051 
00052     DWORD _statusFrame;
00053     string _status;
00054 
00055 public:
00057     CaptureContent(Renderer& renderer, int splitType);
00058 
00060     ‾CaptureContent();
00061 
00062 
00064     void saveConfiguration();
00065 
00067     void initialize();
00068 
00070     bool open(const MediaItemPtr media, const int offset = 0);
00071 
00072 
00074     void play();
00075 
00077     void stop();
00078 
00080     bool useFastStop();
00081 
00083     const bool playing() const;
00084 
00086     const bool finished();
00087 
00089     void close();
00090 
00092     void process(const DWORD& frame);
00093 
00095     void draw(const DWORD& frame);
00096 };
00097 
00098 typedef CaptureContent* CaptureContentPtr;
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines