lkml.org 
[lkml]   [2023]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2,5/7] media: mediatek: vcodec: Get get each instance format type
From
Il 22/03/23 10:46, Yunfei Dong ha scritto:
> Adding echo command to get capture and output queue format
> type:'echo -format > vdec'
>
> Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
> ---
> .../mediatek/vcodec/mtk_vcodec_dbgfs.c | 48 +++++++++++++++++++
> .../mediatek/vcodec/mtk_vcodec_dbgfs.h | 1 +
> 2 files changed, 49 insertions(+)
>
> diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dbgfs.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dbgfs.c
> index 19a1dc068efd..1b1b4301a83d 100644
> --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dbgfs.c
> +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dbgfs.c
> @@ -10,6 +10,48 @@
> #include "mtk_vcodec_drv.h"
> #include "mtk_vcodec_util.h"
>
> +static void mtk_vdec_dbgfs_get_format_type(struct mtk_vcodec_ctx *ctx, char *buf,
> + int *used, int total)
> +{
> + int curr_len;
> +
> + switch (ctx->current_codec) {
> + case V4L2_PIX_FMT_H264_SLICE:
> + curr_len = snprintf(buf + *used, total - *used,
> + "\toutput format: h264 slice\n");

Isn't this the same information that's also given by the VIDIOC_ENUM_FMT ioctl?

Check functions v4l_enum_fmt(), v4l_fill_fmtdesc().

Regards,
Angelo

\
 
 \ /
  Last update: 2023-03-27 01:12    [W:6.458 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site