void vdec_frame_buffer_release(void *data)
{
- struct file_privdata *priv_data =
- (struct file_privdata *) data;
+ struct file_private_data *priv_data =
+ (struct file_private_data *) data;
struct vframe_s *vf = &priv_data->vf;
if (decoder_bmmu_box_valide_check(vf->mm_box.bmmu_box)) {
aml_v4l2_debug(2, "%s vf idx: %d, mmu_idx: %d, mmu_box: %p",
__func__, vf->index, vf->mm_box.mmu_idx, vf->mm_box.mmu_box);
- memset(data, 0, sizeof(struct file_privdata));
+ memset(data, 0, sizeof(struct file_private_data));
kfree(data);
}
/* binding vframe handle. */
vf->flag |= VFRAME_FLAG_VIDEO_LINEAR;
dstbuf->privdata.vf = *vf;
+ dstbuf->privdata.vf.omx_index =
+ dstbuf->vb.vb2_buf.index;
v4l2_m2m_buf_done(&dstbuf->vb, VB2_BUF_STATE_DONE);
}
file = fget(vb2_v4l2->private);
if (is_v4l2_buf_file(file) &&
- !aml_buf->privdata.is_install) {
+ !aml_buf->is_install_privdata) {
dmabuf_fd_install_data(vb2_v4l2->private,
(void*)&aml_buf->privdata,
- sizeof(struct file_privdata));
- aml_buf->privdata.is_install = true;
+ sizeof(struct file_private_data));
+ aml_buf->is_install_privdata = true;
}
fput(file);
mutex_unlock(&ctx->lock);
if (!buf->que_in_m2m) {
aml_v4l2_debug(2, "[%d] enque capture buf idx %d, %p",
ctx->id, vb->index, vb);
+
v4l2_m2m_buf_queue(ctx->m2m_ctx, vb2_v4l2);
buf->que_in_m2m = true;
buf->queued_in_vb2 = true;
buf = container_of(vb2_v4l2, struct aml_video_dec_buf, vb);
buf->frame_buffer.status = FB_ST_NORMAL;
buf->que_in_m2m = false;
- buf->privdata.is_install = false;
+ buf->is_install_privdata = false;
if (vb2_v4l2->vb2_buf.state == VB2_BUF_STATE_ACTIVE)
v4l2_m2m_buf_done(vb2_v4l2, VB2_BUF_STATE_ERROR);
#include <media/videobuf2-core.h>
#include <media/videobuf2-v4l2.h>
#include <linux/amlogic/media/codec_mm/codec_mm.h>
+#include <linux/amlogic/media/video_sink/v4lvideo_ext.h>
#include "aml_vcodec_util.h"
#define VCODEC_CAPABILITY_4K_DISABLED 0x10
#define AML_V4L2_SET_DECMODE (V4L2_CID_USER_AMLOGIC_BASE + 0)
-/* for video composer metafd private_data struct */
-struct file_privdata {
- struct vframe_s vf;
- struct vframe_s *vf_p;
- bool is_keep;
- int keep_id;
- int keep_head_id;
- bool is_install;
-};
-
/**
* struct vdec_fb - decoder frame buffer
* @mem_type : gather or scatter memory.
struct list_head list;
struct vdec_v4l2_buffer frame_buffer;
- struct file_privdata privdata;
+ struct file_private_data privdata;
struct codec_mm_s *mem[2];
char mem_onwer[32];
bool used;
bool queued_in_v4l2;
bool lastframe;
bool error;
+ bool is_install_privdata;
};
extern const struct v4l2_ioctl_ops aml_vdec_ioctl_ops;