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

Method DecodeFrame

test/api/BaseDecoderTest.cpp:79–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77
78
79void BaseDecoderTest::DecodeFrame (const uint8_t* src, size_t sliceSize, Callback* cbk) {
80 uint8_t* data[3];
81 SBufferInfo bufInfo;
82 memset (data, 0, sizeof (data));
83 memset (&bufInfo, 0, sizeof (SBufferInfo));
84
85 DECODING_STATE rv = decoder_->DecodeFrame2 (src, (int) sliceSize, data, &bufInfo);
86 ASSERT_TRUE (rv == dsErrorFree);
87
88 if (bufInfo.iBufferStatus == 1 && cbk != NULL) {
89 const Frame frame = {
90 {
91 // y plane
92 data[0],
93 bufInfo.UsrData.sSystemBuffer.iWidth,
94 bufInfo.UsrData.sSystemBuffer.iHeight,
95 bufInfo.UsrData.sSystemBuffer.iStride[0]
96 },
97 {
98 // u plane
99 data[1],
100 bufInfo.UsrData.sSystemBuffer.iWidth / 2,
101 bufInfo.UsrData.sSystemBuffer.iHeight / 2,
102 bufInfo.UsrData.sSystemBuffer.iStride[1]
103 },
104 {
105 // v plane
106 data[2],
107 bufInfo.UsrData.sSystemBuffer.iWidth / 2,
108 bufInfo.UsrData.sSystemBuffer.iHeight / 2,
109 bufInfo.UsrData.sSystemBuffer.iStride[1]
110 },
111 };
112 cbk->onDecodeFrame (frame);
113 }
114}
115void BaseDecoderTest::FlushFrame (Callback* cbk) {
116 uint8_t* data[3];
117 SBufferInfo bufInfo;

Callers

nothing calls this directly

Calls 2

DecodeFrame2Method · 0.45
onDecodeFrameMethod · 0.45

Tested by

no test coverage detected