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

Method FlushFrame

test/api/BaseThreadDecoderTest.cpp:213–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

211 }
212}
213void BaseThreadDecoderTest::FlushFrame (Callback* cbk) {
214 SBufferInfo bufInfo;
215 memset (pData, 0, sizeof (pData));
216 memset (&bufInfo, 0, sizeof (SBufferInfo));
217
218 DECODING_STATE rv = decoder_->FlushFrame (pData, &bufInfo);
219 ASSERT_TRUE (rv == dsErrorFree);
220 sBufInfo = bufInfo;
221 if (sBufInfo.iBufferStatus == 1 && cbk != NULL) {
222 if (bEnableYuvDumpTest) {
223 Process (&sBufInfo, pYuvFile);
224 }
225 const Frame frame = {
226 {
227 // y plane
228 sBufInfo.pDst[0],
229 sBufInfo.UsrData.sSystemBuffer.iWidth,
230 sBufInfo.UsrData.sSystemBuffer.iHeight,
231 sBufInfo.UsrData.sSystemBuffer.iStride[0]
232 },
233 {
234 // u plane
235 sBufInfo.pDst[1],
236 sBufInfo.UsrData.sSystemBuffer.iWidth / 2,
237 sBufInfo.UsrData.sSystemBuffer.iHeight / 2,
238 sBufInfo.UsrData.sSystemBuffer.iStride[1]
239 },
240 {
241 // v plane
242 sBufInfo.pDst[2],
243 sBufInfo.UsrData.sSystemBuffer.iWidth / 2,
244 sBufInfo.UsrData.sSystemBuffer.iHeight / 2,
245 sBufInfo.UsrData.sSystemBuffer.iStride[1]
246 },
247 };
248 cbk->onDecodeFrame (frame);
249 }
250}
251bool BaseThreadDecoderTest::ThreadDecodeFile (const char* fileName, Callback* cbk) {
252 std::ifstream file (fileName, std::ios::in | std::ios::binary);
253 if (!file.is_open())

Callers

nothing calls this directly

Calls 2

ProcessFunction · 0.70
onDecodeFrameMethod · 0.45

Tested by

no test coverage detected