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);}; |
---|
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;}; |
---|
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; |
---|