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

Method DecodeFrame

test/api/BaseThreadDecoderTest.cpp:174–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172
173
174void BaseThreadDecoderTest::DecodeFrame (const uint8_t* src, size_t sliceSize, Callback* cbk) {
175 SBufferInfo bufInfo;
176 memset (pData, 0, sizeof (pData));
177 memset (&bufInfo, 0, sizeof (SBufferInfo));
178 bufInfo.uiInBsTimeStamp = ++uiTimeStamp;
179
180 DECODING_STATE rv = decoder_->DecodeFrameNoDelay (src, (int) sliceSize, pData, &bufInfo);
181 ASSERT_TRUE (rv == dsErrorFree);
182 sBufInfo = bufInfo;
183 if (sBufInfo.iBufferStatus == 1 && cbk != NULL) {
184 if (bEnableYuvDumpTest) {
185 Process (&sBufInfo, pYuvFile);
186 }
187 const Frame frame = {
188 {
189 // y plane
190 sBufInfo.pDst[0],
191 bufInfo.UsrData.sSystemBuffer.iWidth,
192 bufInfo.UsrData.sSystemBuffer.iHeight,
193 bufInfo.UsrData.sSystemBuffer.iStride[0]
194 },
195 {
196 // u plane
197 sBufInfo.pDst[1],
198 sBufInfo.UsrData.sSystemBuffer.iWidth / 2,
199 sBufInfo.UsrData.sSystemBuffer.iHeight / 2,
200 sBufInfo.UsrData.sSystemBuffer.iStride[1]
201 },
202 {
203 // v plane
204 sBufInfo.pDst[2],
205 sBufInfo.UsrData.sSystemBuffer.iWidth / 2,
206 sBufInfo.UsrData.sSystemBuffer.iHeight / 2,
207 sBufInfo.UsrData.sSystemBuffer.iStride[1]
208 },
209 };
210 cbk->onDecodeFrame (frame);
211 }
212}
213void BaseThreadDecoderTest::FlushFrame (Callback* cbk) {
214 SBufferInfo bufInfo;
215 memset (pData, 0, sizeof (pData));

Callers

nothing calls this directly

Calls 3

ProcessFunction · 0.70
DecodeFrameNoDelayMethod · 0.45
onDecodeFrameMethod · 0.45

Tested by

no test coverage detected