| 826 | } |
| 827 | |
| 828 | static int android_camera_read_packet(AVFormatContext *avctx, AVPacket *pkt) |
| 829 | { |
| 830 | AndroidCameraCtx *ctx = avctx->priv_data; |
| 831 | int ret; |
| 832 | |
| 833 | if (!atomic_load(&ctx->exit)) { |
| 834 | ret = av_thread_message_queue_recv(ctx->input_queue, pkt, |
| 835 | avctx->flags & AVFMT_FLAG_NONBLOCK ? AV_THREAD_MESSAGE_NONBLOCK : 0); |
| 836 | } else { |
| 837 | ret = AVERROR_EOF; |
| 838 | } |
| 839 | |
| 840 | if (ret < 0) { |
| 841 | return ret; |
| 842 | } else { |
| 843 | return pkt->size; |
| 844 | } |
| 845 | } |
| 846 | |
| 847 | #define OFFSET(x) offsetof(AndroidCameraCtx, x) |
| 848 | #define DEC AV_OPT_FLAG_DECODING_PARAM |
nothing calls this directly
no test coverage detected