2 * copyright (c) 2010 Sveriges Television AB <info@casparcg.com>
\r
4 * This file is part of CasparCG.
\r
6 * CasparCG is free software: you can redistribute it and/or modify
\r
7 * it under the terms of the GNU General Public License as published by
\r
8 * the Free Software Foundation, either version 3 of the License, or
\r
9 * (at your option) any later version.
\r
11 * CasparCG is distributed in the hope that it will be useful,
\r
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
14 * GNU General Public License for more details.
\r
16 * You should have received a copy of the GNU General Public License
\r
17 * along with CasparCG. If not, see <http://www.gnu.org/licenses/>.
\r
21 #ifndef TARGASCROLLMediaProducer_H
\r
22 #define TARGASCROLLMediaProducer_H
\r
24 #include "..\..\MediaProducer.h"
\r
25 #include "..\..\utils\Thread.h"
\r
26 #include "..\..\utils\Lockable.h"
\r
27 #include "..\..\frame\Framemediacontroller.h"
\r
28 #include "..\..\frame\buffers\MotionFrameBuffer.h"
\r
33 typedef std::tr1::shared_ptr<PixmapData> PixmapDataPtr;
\r
36 class TargaScrollMediaProducer : public MediaProducer, public FrameMediaController, public utils::IRunnable, utils::LockableObject
\r
38 static int DEFAULT_SPEED;
\r
40 explicit TargaScrollMediaProducer();
\r
41 TargaScrollMediaProducer(const TargaScrollMediaProducer&);
\r
42 virtual ~TargaScrollMediaProducer();
\r
44 bool Load(const tstring& filename);
\r
46 virtual IMediaController* QueryController(const tstring& id);
\r
47 virtual bool Initialize(FrameManagerPtr pFrameManager);
\r
48 virtual FrameBuffer& GetFrameBuffer() {
\r
52 virtual void Run(HANDLE stopEvent);
\r
53 virtual bool OnUnhandledException(const std::exception& ex) throw();
\r
56 void PadImageToFrameFormat();
\r
57 FramePtr FillVideoFrame(FramePtr pFrame);
\r
59 struct DirectionFlag
\r
61 enum DirectionFlagEnum
\r
73 utils::Thread workerThread;
\r
74 utils::PixmapDataPtr pImage;
\r
76 MotionFrameBuffer frameBuffer;
\r
77 DirectionFlag::DirectionFlagEnum direction;
\r
79 utils::Event initializeEvent_;
\r
80 FrameManagerPtr pFrameManager_;
\r
81 FrameManagerPtr pTempFrameManager_;
\r