| 195 | } |
| 196 | |
| 197 | bool BaseDecoderTest::DecodeNextFrame (Callback* cbk) { |
| 198 | switch (decodeStatus_) { |
| 199 | case Decoding: |
| 200 | if (false == ReadFrame(&file_, &buf_)) |
| 201 | return false; |
| 202 | if (::testing::Test::HasFatalFailure()) { |
| 203 | return false; |
| 204 | } |
| 205 | if (buf_.Length() == 0) { |
| 206 | decodeStatus_ = EndOfStream; |
| 207 | return true; |
| 208 | } |
| 209 | DecodeFrame (buf_.data(), buf_.Length(), cbk); |
| 210 | if (::testing::Test::HasFatalFailure()) { |
| 211 | return false; |
| 212 | } |
| 213 | return true; |
| 214 | case EndOfStream: { |
| 215 | int32_t iEndOfStreamFlag = 1; |
| 216 | decoder_->SetOption (DECODER_OPTION_END_OF_STREAM, &iEndOfStreamFlag); |
| 217 | DecodeFrame (NULL, 0, cbk); |
| 218 | decodeStatus_ = End; |
| 219 | break; |
| 220 | } |
| 221 | case OpenFile: |
| 222 | case End: |
| 223 | break; |
| 224 | } |
| 225 | return false; |
| 226 | } |
nothing calls this directly
no test coverage detected