Show
Ignore:
Timestamp:
01/28/07 09:36:11 (16 years ago)
Author:
pieterpalmers
Message:

mostly whitespace fixes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/streaming-rework/src/libstreaming/StreamProcessor.h

    r312 r383  
    5050                        public PortManager { 
    5151 
    52        friend class StreamProcessorManager; 
     52    friend class StreamProcessorManager; 
    5353 
    5454public: 
    55        enum EProcessorType { 
    56                E_Receive, 
    57                E_Transmit 
    58        }; 
    59  
    60        StreamProcessor(enum IsoStream::EStreamType type, int port, int framerate); 
    61        virtual ~StreamProcessor(); 
    62  
    63        virtual enum raw1394_iso_disposition  
    64                putPacket(unsigned char *data, unsigned int length,  
    65                      unsigned char channel, unsigned char tag, unsigned char sy,  
    66                          unsigned int cycle, unsigned int dropped) = 0; 
    67        virtual enum raw1394_iso_disposition  
    68                getPacket(unsigned char *data, unsigned int *length, 
    69                      unsigned char *tag, unsigned char *sy, 
    70                      int cycle, unsigned int dropped, unsigned int max_length) = 0; 
    71  
    72        virtual enum EProcessorType getType() =0; 
    73  
    74        bool xrunOccurred() { return (m_xruns>0);}; 
     55    enum EProcessorType { 
     56            E_Receive, 
     57            E_Transmit 
     58    }; 
     59 
     60    StreamProcessor(enum IsoStream::EStreamType type, int port, int framerate); 
     61    virtual ~StreamProcessor(); 
     62 
     63    virtual enum raw1394_iso_disposition  
     64            putPacket(unsigned char *data, unsigned int length,  
     65                    unsigned char channel, unsigned char tag, unsigned char sy,  
     66                        unsigned int cycle, unsigned int dropped) = 0; 
     67    virtual enum raw1394_iso_disposition  
     68            getPacket(unsigned char *data, unsigned int *length, 
     69                    unsigned char *tag, unsigned char *sy, 
     70                    int cycle, unsigned int dropped, unsigned int max_length) = 0; 
     71 
     72    virtual enum EProcessorType getType() =0; 
     73 
     74    bool xrunOccurred() { return (m_xruns>0);}; 
    7575 
    7676    /** 
     
    8484     * @return  
    8585     */ 
    86        virtual bool isOnePeriodReady()=0; 
    87          
    88        unsigned int getNbPeriodsReady() { if(m_period) return m_framecounter/m_period; else return 0;}; 
     86    virtual bool isOnePeriodReady()=0; 
     87     
     88    unsigned int getNbPeriodsReady() { if(m_period) return m_framecounter/m_period; else return 0;}; 
    8989        virtual void decrementFrameCounter(); 
    9090        virtual void incrementFrameCounter(int nbframes); 
    91          
    92        // move to private? 
     91     
     92    // move to private? 
    9393        void resetFrameCounter(); 
    9494    void resetXrunCounter(); 
    9595 
    96        bool isRunning(); ///< returns true if there is some stream data processed 
    97        void enable(); ///< enable the stream processing  
    98        void disable() {m_disabled=true;}; ///< disable the stream processing  
    99        bool isEnabled() {return !m_disabled;}; 
    100  
    101        virtual bool transfer(); ///< transfer the buffer contents from/to client 
    102  
    103        virtual bool reset(); ///< reset the streams & buffers (e.g. after xrun) 
    104  
    105        virtual bool prepare(); ///< prepare the streams & buffers (e.g. prefill) 
    106  
    107        virtual void dumpInfo(); 
    108  
    109        virtual bool init(); 
    110  
    111        virtual void setVerboseLevel(int l); 
    112  
    113        virtual bool preparedForStop() {return true;}; 
    114        virtual bool preparedForStart() {return true;}; 
     96    bool isRunning(); ///< returns true if there is some stream data processed 
     97    void enable(); ///< enable the stream processing  
     98    void disable() {m_disabled=true;}; ///< disable the stream processing  
     99    bool isEnabled() {return !m_disabled;}; 
     100 
     101    virtual bool transfer(); ///< transfer the buffer contents from/to client 
     102 
     103    virtual bool reset(); ///< reset the streams & buffers (e.g. after xrun) 
     104 
     105    virtual bool prepare(); ///< prepare the streams & buffers (e.g. prefill) 
     106 
     107    virtual void dumpInfo(); 
     108 
     109    virtual bool init(); 
     110 
     111    virtual void setVerboseLevel(int l); 
     112 
     113    virtual bool preparedForStop() {return true;}; 
     114    virtual bool preparedForStart() {return true;}; 
    115115 
    116116protected: 
    117117         
    118118 
    119        void setManager(StreamProcessorManager *manager) {m_manager=manager;}; 
    120        void clearManager() {m_manager=0;}; 
    121  
    122        unsigned int m_nb_buffers; ///< cached from manager->getNbBuffers(), the number of periods to buffer 
    123        unsigned int m_period; ///< cached from manager->getPeriod(), the period size 
    124  
    125        unsigned int m_xruns; 
     119    void setManager(StreamProcessorManager *manager) {m_manager=manager;}; 
     120    void clearManager() {m_manager=0;}; 
     121 
     122    unsigned int m_nb_buffers; ///< cached from manager->getNbBuffers(), the number of periods to buffer 
     123    unsigned int m_period; ///< cached from manager->getPeriod(), the period size 
     124 
     125    unsigned int m_xruns; 
    126126        signed int m_framecounter; 
    127127 
    128        unsigned int m_framerate; 
    129  
    130        StreamProcessorManager *m_manager; 
    131  
    132        bool m_running; 
    133        bool m_disabled; 
     128    unsigned int m_framerate; 
     129 
     130    StreamProcessorManager *m_manager; 
     131 
     132    bool m_running; 
     133    bool m_disabled; 
    134134 
    135135    StreamStatistics m_PacketStat; 
     
    140140 
    141141    DECLARE_DEBUG_MODULE; 
    142  
     142     
    143143 
    144144};