LCOV - code coverage report
Current view: top level - eq/server/equalizers - dfrEqualizer.h (source / functions) Hit Total Coverage
Test: lcov2.info Lines: 2 4 50.0 %
Date: 2014-06-18 Functions: 2 4 50.0 %

          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_DFREQUALIZER_H
      19             : #define EQS_DFREQUALIZER_H
      20             : 
      21             : #include "../channelListener.h" // base class
      22             : #include "equalizer.h"       // base class
      23             : 
      24             : #include <deque>
      25             : #include <map>
      26             : 
      27             : namespace eq
      28             : {
      29             : namespace server
      30             : {
      31             :     std::ostream& operator << ( std::ostream& os, const DFREqualizer* );
      32             : 
      33             :     /** Tries to maintain a constant frame rate by adapting the compound zoom.*/
      34             :     class DFREqualizer : public Equalizer, protected ChannelListener
      35             :     {
      36             :     public:
      37             :         DFREqualizer();
      38             :         virtual ~DFREqualizer();
      39           4 :         virtual void toStream( std::ostream& os ) const { os << this; }
      40             : 
      41             :         /** @sa Equalizer::attach */
      42             :         virtual void attach( Compound* compound );
      43             : 
      44             :         /** @sa CompoundListener::notifyUpdatePre */
      45             :         virtual void notifyUpdatePre( Compound* compound,
      46             :                                       const uint32_t frameNumber );
      47             : 
      48             :         /** @sa ChannelListener::notifyLoadData */
      49             :         virtual void notifyLoadData( Channel* channel,
      50             :                                      const uint32_t frameNumber,
      51             :                                      const Statistics& statistics,
      52             :                                      const Viewport& region );
      53             : 
      54           0 :         virtual uint32_t getType() const { return fabric::DFR_EQUALIZER; }
      55             : 
      56             :     protected:
      57          10 :         void notifyChildAdded( Compound*, Compound* ) override {}
      58           0 :         void notifyChildRemove( Compound*, Compound* ) override {}
      59             : 
      60             :     private:
      61             :         float _current; //!< Framerate of the last finished frame
      62             :         int64_t _lastTime; //!< Last frames' timestamp
      63             :     };
      64             : 
      65             : }
      66             : }
      67             : 
      68             : #endif // EQS_DFREQUALIZER_H

Generated by: LCOV version 1.10