int buffer_done(struct fimc_is_video_ctx *vctx, u32 index) { int ret = 0; struct fimc_is_queue *queue; BUG_ON(!vctx); BUG_ON(!vctx->video); BUG_ON(index >= FRAMEMGR_MAX_REQUEST); BUG_ON(vctx->type == FIMC_IS_VIDEO_TYPE_M2M); switch (vctx->type) { case FIMC_IS_VIDEO_TYPE_OUTPUT: queue = GET_SRC_QUEUE(vctx); queue_done(vctx, queue, index, VB2_BUF_STATE_DONE); break; case FIMC_IS_VIDEO_TYPE_CAPTURE: queue = GET_DST_QUEUE(vctx); queue_done(vctx, queue, index, VB2_BUF_STATE_DONE); break; default: merr("invalid type(%d)", vctx, vctx->type); ret = -EINVAL; break; } return ret; }
int pipe_done(packet_pipe_t * pipe){ if(pipe->packets){ queue_done(pipe->packets); } xfree(pipe); return XRTP_OK; }