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

Method send_packet

framework/codec/ActiveDecoder.cpp:189–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187}
188
189int ActiveDecoder::send_packet(unique_ptr<IAFPacket> &packet, uint64_t timeOut)
190{
191 if (needDrop(packet.get())) {
192 packet = nullptr;
193 return 0;
194 }
195
196#if AF_HAVE_PTHREAD
197 return thread_send_packet(packet);
198#else
199 int status = 0;
200 int ret = enqueue_decoder(packet.get());
201
202 if (ret == AVERROR(EAGAIN)) {
203 status = STATUS_RETRY_IN;
204 } else {
205 if (ret < 0) {
206 AF_LOGW("enqueue_decoder error %d\n", ret);
207 enqueueError(ret, packet->getInfo().pts);
208 }
209 }
210
211 return status;
212#endif
213}
214
215int ActiveDecoder::thread_send_packet(unique_ptr<IAFPacket> &packet)
216{

Callers 7

demuxer_threadFunction · 0.45
decodeMethod · 0.45
test_renderFunction · 0.45
test_codecFunction · 0.45
testDemuxerFunction · 0.45
testDemuxerFunction · 0.45
sendPacketMethod · 0.45

Calls 1

getMethod · 0.45

Tested by 5

demuxer_threadFunction · 0.36
test_renderFunction · 0.36
test_codecFunction · 0.36
testDemuxerFunction · 0.36
testDemuxerFunction · 0.36