svvitch
digital signage player
D:/vs_workspace/switch_sf/src/svvitch/DSContent.h
Go to the documentation of this file.
00001 #pragma once
00002 
00003 #include "Content.h"
00004 #include "Renderer.h"
00005 #include "DSVideoRenderer.h"
00006 #include "VideoTextureAllocator.h"
00007 #include <Poco/ActiveMethod.h>
00008 #include <Poco/Mutex.h>
00009 #include <streams.h>
00010 
00011 
00015 class DSContent: public Content {
00016 private:
00017     Poco::FastMutex _lock;
00018     IGraphBuilder* _gb;
00019     IBaseFilter* _vmr9;
00020     VideoTextureAllocatorPtr _allocator;
00021     DSVideoRendererPtr _vr;
00022     IMediaControl* _mc;
00023     IMediaSeeking* _ms;
00024     IMediaEvent* _me;
00025     bool _finished;
00026 
00027     ActiveMethod<void, void, DSContent> activePlay;
00028     void syncronizedPlay();
00029 
00030 public:
00031     DSContent(Renderer& renderer, int splitType);
00032 
00033     virtual ‾DSContent();
00034 
00035 
00036     void initialize();
00037 
00039     bool open(const MediaItemPtr media, const int offset = 0);
00040 
00044     void play();
00045 
00049     void stop();
00050 
00054     const bool playing() const;
00055 
00056     const bool finished();
00057 
00059     void close();
00060 
00061     void process(const DWORD& frame);
00062 
00063     void draw(const DWORD& frame);
00064 
00065 
00066     int getPinCount(IBaseFilter *pFilter, PIN_DIRECTION PinDir);
00067 
00071     bool getPin(IBaseFilter *pFilter, IPin** pPin, PIN_DIRECTION PinDir, int index = -1);
00072 
00073     bool getInPin(IBaseFilter *pFilter, IPin** pPin, int index = -1);
00074 
00075     bool getOutPin(IBaseFilter *pFilter, IPin** pPin, int index = -1);
00076 
00077     int dumpFilter(IGraphBuilder* gb);
00078 };
00079 
00080 typedef DSContent* DSContentPtr;
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines