MCPcopy Create free account
hub / github.com/cisco/openh264 / DecodeNextFrame

Method DecodeNextFrame

test/api/BaseDecoderTest.cpp:197–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

195}
196
197bool 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}

Callers

nothing calls this directly

Calls 5

DecodeFrameFunction · 0.85
LengthMethod · 0.80
dataMethod · 0.80
ReadFrameFunction · 0.70
SetOptionMethod · 0.45

Tested by

no test coverage detected