| 278 | } |
| 279 | |
| 280 | int ActiveDecoder::getFrame(unique_ptr<IAFFrame> &frame, uint64_t timeOut) |
| 281 | { |
| 282 | #if AF_HAVE_PTHREAD |
| 283 | return thread_getFrame(frame); |
| 284 | #else |
| 285 | int ret; |
| 286 | ret = dequeue_decoder(); |
| 287 | |
| 288 | if (ret < 0) { |
| 289 | if (ret == AVERROR(EAGAIN)) { |
| 290 | return ret; |
| 291 | } |
| 292 | |
| 293 | if (ret == AVERROR_EOF) { |
| 294 | AF_LOGD("decoder out put eof\n"); |
| 295 | return STATUS_EOS; |
| 296 | } |
| 297 | |
| 298 | return ret; |
| 299 | } else { |
| 300 | frame = unique_ptr<AVAFFrame>(new AVAFFrame(mPDecoder->avFrame)); |
| 301 | return 0; |
| 302 | } |
| 303 | |
| 304 | #endif |
| 305 | } |
| 306 | |
| 307 | int ActiveDecoder::thread_getFrame(unique_ptr<IAFFrame> &frame) |
| 308 | { |
no outgoing calls