Stefan Schuermans commited on 2011-12-04 14:57:24
Showing 9 changed files, with 24 additions and 24 deletions.
... | ... |
@@ -96,7 +96,7 @@ bool Canvas::Input::draw() |
96 | 96 |
// get current frame from stream (leave if no stream or no frame) |
97 | 97 |
if (!m_pInStream) |
98 | 98 |
return false; |
99 |
- m_pInStream->getCurFrame(pFrame); |
|
99 |
+ pFrame = m_pInStream->getCurFrame(); |
|
100 | 100 |
if (!pFrame) |
101 | 101 |
return false; |
102 | 102 |
|
... | ... |
@@ -169,7 +169,7 @@ void Priority::selectLower() |
169 | 169 |
// search inputs with lower priority until a frame is found |
170 | 170 |
while (m_itCurIn != m_inList.rend()) { |
171 | 171 |
// check for frame |
172 |
- if (m_itCurIn->m_pInput->getCurFrame(pFrame)) { |
|
172 |
+ if ((pFrame = m_itCurIn->m_pInput->getCurFrame())) { |
|
173 | 173 |
// frame found -> keep this input as current, send frame |
174 | 174 |
frame(pFrame); |
175 | 175 |
return; |
... | ... |
@@ -189,7 +189,7 @@ void Priority::curFrame() |
189 | 189 |
|
190 | 190 |
// current input available and frame it it available -> send frame |
191 | 191 |
if (m_itCurIn != m_inList.rend() && |
192 |
- m_itCurIn->m_pInput->getCurFrame(pFrame)) |
|
192 |
+ (pFrame = m_itCurIn->m_pInput->getCurFrame())) |
|
193 | 193 |
frame(pFrame); |
194 | 194 |
// no frame available -> send this information |
195 | 195 |
else |
... | ... |
@@ -65,13 +65,11 @@ void Priority::Input::setFrame(const std::string &stream, stBlinkenFrame *pFrame |
65 | 65 |
|
66 | 66 |
/** |
67 | 67 |
* @brief get current frame |
68 |
- * @param[out] pFrame current frame |
|
69 |
- * @return if a current frame exists |
|
68 |
+ * @return current frame (NULL if none) |
|
70 | 69 |
*/ |
71 |
-bool Priority::Input::getCurFrame(stBlinkenFrame *&pFrame) |
|
70 |
+stBlinkenFrame * Priority::Input::getCurFrame() |
|
72 | 71 |
{ |
73 |
- pFrame = m_pFrame; |
|
74 |
- return pFrame; |
|
72 |
+ return m_pFrame; |
|
75 | 73 |
} |
76 | 74 |
|
77 | 75 |
/// get input stream and attach to it |
... | ... |
@@ -54,10 +54,9 @@ public: |
54 | 54 |
|
55 | 55 |
/** |
56 | 56 |
* @brief get current frame |
57 |
- * @param[out] pFrame current frame |
|
58 |
- * @return if a current frame exists |
|
57 |
+ * @return current frame (NULL if none) |
|
59 | 58 |
*/ |
60 |
- bool getCurFrame(stBlinkenFrame *&pFrame); |
|
59 |
+ stBlinkenFrame * getCurFrame(); |
|
61 | 60 |
|
62 | 61 |
protected: |
63 | 62 |
/// get input stream and attach to it |
... | ... |
@@ -141,11 +141,13 @@ void Resizer::releaseOutStream() |
141 | 141 |
/// send current frame to output stream |
142 | 142 |
void Resizer::sendFrame() |
143 | 143 |
{ |
144 |
- stBlinkenFrame *pFrame = NULL; |
|
144 |
+ stBlinkenFrame *pFrame; |
|
145 | 145 |
|
146 | 146 |
// get current frame from input stream and process it |
147 | 147 |
if (m_pInStream) |
148 |
- m_pInStream->getCurFrame(pFrame); |
|
148 |
+ pFrame = m_pInStream->getCurFrame(); |
|
149 |
+ else |
|
150 |
+ pFrame = NULL; |
|
149 | 151 |
procFrame(pFrame); |
150 | 152 |
} |
151 | 153 |
|
... | ... |
@@ -141,11 +141,13 @@ void Scaler::releaseOutStream() |
141 | 141 |
/// send current frame to output stream |
142 | 142 |
void Scaler::sendFrame() |
143 | 143 |
{ |
144 |
- stBlinkenFrame *pFrame = NULL; |
|
144 |
+ stBlinkenFrame *pFrame; |
|
145 | 145 |
|
146 | 146 |
// get current frame from input stream and process it |
147 | 147 |
if (m_pInStream) |
148 |
- m_pInStream->getCurFrame(pFrame); |
|
148 |
+ pFrame = m_pInStream->getCurFrame(); |
|
149 |
+ else |
|
150 |
+ pFrame = NULL; |
|
149 | 151 |
procFrame(pFrame); |
150 | 152 |
} |
151 | 153 |
|
... | ... |
@@ -162,7 +162,6 @@ template<typename ADDR, typename SOCK> |
162 | 162 |
void Sender<ADDR, SOCK>::readProto() |
163 | 163 |
{ |
164 | 164 |
std::string strProto; |
165 |
- stBlinkenFrame *pFrame; |
|
166 | 165 |
|
167 | 166 |
// send "no frame" to all destinations |
168 | 167 |
// (stream with old protocol will stop now) |
... | ... |
@@ -183,10 +182,10 @@ void Sender<ADDR, SOCK>::readProto() |
183 | 182 |
// create new no frame protocol data and new protocol data |
184 | 183 |
if (m_haveProtocol) { |
185 | 184 |
frame2data(NULL, m_noFrameData); |
186 |
- pFrame = NULL; |
|
187 | 185 |
if (m_pInStream) |
188 |
- m_pInStream->getCurFrame(pFrame); |
|
189 |
- frame2data(pFrame, m_data); |
|
186 |
+ frame2data(m_pInStream->getCurFrame(), m_data); |
|
187 |
+ else |
|
188 |
+ frame2data(NULL, m_data); |
|
190 | 189 |
} |
191 | 190 |
|
192 | 191 |
// send current protocol data to all destinations |
... | ... |
@@ -77,11 +77,11 @@ void Stream::setFrame(stBlinkenFrame *pFrame) |
77 | 77 |
|
78 | 78 |
/** |
79 | 79 |
* @brief get current frame |
80 |
- * @param[out] pFrame current frame (NULL for none) |
|
80 |
+ * @return current frame (NULL for none) |
|
81 | 81 |
*/ |
82 |
-void Stream::getCurFrame(stBlinkenFrame *&pFrame) |
|
82 |
+stBlinkenFrame * Stream::getCurFrame() const |
|
83 | 83 |
{ |
84 |
- pFrame = m_pFrame; |
|
84 |
+ return m_pFrame; |
|
85 | 85 |
} |
86 | 86 |
|
87 | 87 |
} // namespace Blinker |
... | ... |
@@ -50,9 +50,9 @@ public: |
50 | 50 |
|
51 | 51 |
/** |
52 | 52 |
* @brief get current frame |
53 |
- * @param[out] pFrame current frame (NULL for none) |
|
53 |
+ * @return current frame (NULL for none) |
|
54 | 54 |
*/ |
55 |
- void getCurFrame(stBlinkenFrame *&pFrame); |
|
55 |
+ stBlinkenFrame * getCurFrame() const; |
|
56 | 56 |
|
57 | 57 |
protected: |
58 | 58 |
/// stream name |
59 | 59 |