Line data Source code
1 :
2 : /* Copyright (c) 2009-2013, Stefan Eilemann <eile@equalizergraphics.com>
3 : *
4 : * This library is free software; you can redistribute it and/or modify it under
5 : * the terms of the GNU Lesser General Public License version 2.1 as published
6 : * by the Free Software Foundation.
7 : *
8 : * This library is distributed in the hope that it will be useful, but WITHOUT
9 : * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10 : * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
11 : * details.
12 : *
13 : * You should have received a copy of the GNU Lesser General Public License
14 : * along with this library; if not, write to the Free Software Foundation, Inc.,
15 : * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16 : */
17 :
18 : #ifndef EQS_MONITOREQUALIZER_H
19 : #define EQS_MONITOREQUALIZER_H
20 :
21 : #include "equalizer.h" // base class
22 :
23 : #include <eq/client/types.h>
24 : #include <deque>
25 : #include <map>
26 :
27 : namespace eq
28 : {
29 : namespace server
30 : {
31 : std::ostream& operator << ( std::ostream& os, const MonitorEqualizer* );
32 :
33 : /** Destination-driven scaling.*/
34 : class MonitorEqualizer : public Equalizer
35 : {
36 : public:
37 : MonitorEqualizer();
38 : MonitorEqualizer( const MonitorEqualizer& from );
39 : virtual ~MonitorEqualizer();
40 1 : virtual void toStream( std::ostream& os ) const { os << this; }
41 :
42 : /** @sa Equalizer::attach. */
43 : virtual void attach( Compound* compound );
44 :
45 : /** @sa CompoundListener::notifyUpdatePre */
46 : virtual void notifyUpdatePre( Compound* compound,
47 : const uint32_t frameNumber );
48 :
49 0 : virtual uint32_t getType() const { return fabric::MONITOR_EQUALIZER; }
50 :
51 : protected:
52 0 : void notifyChildAdded( Compound*, Compound* ) override {}
53 0 : void notifyChildRemove( Compound*, Compound* ) override {}
54 :
55 : private:
56 : /** Init the source frame viewports. */
57 : void _updateViewports();
58 :
59 : /** compute destination size, input frame offset and
60 : output frame zoom value */
61 : void _updateZoomAndOffset();
62 :
63 : eq::Viewports _viewports;
64 : Frames _outputFrames;
65 : };
66 : }
67 : }
68 :
69 : #endif // EQS_MONITOREQUALIZER_H
|