MCPcopy Create free account
hub / github.com/alibaba/CicadaPlayer / pull_once

Method pull_once

framework/WebAssemblyPlayer/bitStreamDecoder.cpp:157–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155 }
156
157 void bitStreamDecoder::pull_once()
158 {
159 int ret;
160
161 if (decoderEOS) {
162 return;
163 }
164
165 if (needRead()) {
166 AF_LOGI("no data to decoder\n");
167 return;
168 }
169
170 // get the min pts frame to decode
171 int stream = getMinFramePTSStream();
172 unique_ptr<IAFPacket> pkt{};
173#if !AF_HAVE_PTHREAD
174
175 if (mPacketQues[stream].empty()) {
176 assert(inPutEOS);
177 stream = getMinPacketPTSStream();
178 }
179
180#else
181 stream = getMinPacketPTSStream();
182#endif
183
184 if (stream == -1) {
185 AF_LOGD("PacketQues is empty\n");
186 assert(inPutEOS);
187 flushDecoders();
188 return;
189 }
190
191 pkt = move(mPacketQues[stream].front());
192 mPacketQues[stream].pop();
193
194 do {
195 ret = decode(pkt);
196 } while (ret == STATUS_RETRY_IN);
197 }
198
199 void bitStreamDecoder::flushDecoders()
200 {

Callers 3

pull_onceFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80

Calls 4

assertClass · 0.85
frontMethod · 0.80
emptyMethod · 0.45
popMethod · 0.45

Tested by 2

mainFunction · 0.64
mainFunction · 0.64