mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-19 05:49:09 +02:00
avcodec/v4l2_m2m_dec: fix indentation and add M2MDEC_CLASS macro
This just makes the M2MDEC_CLASS similar to how it is done in rkmpp. It looks clean and has proper indentation Signed-off-by: Aman Gupta <aman@tmm1.net>
This commit is contained in:
parent
c0c7946196
commit
f9b0f88aa4
@ -220,29 +220,30 @@ static const AVOption options[] = {
|
|||||||
{ NULL},
|
{ NULL},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define M2MDEC_CLASS(NAME) \
|
||||||
|
static const AVClass v4l2_m2m_ ## NAME ## _dec_class = { \
|
||||||
|
.class_name = #NAME "_v4l2m2m_decoder", \
|
||||||
|
.item_name = av_default_item_name, \
|
||||||
|
.option = options, \
|
||||||
|
.version = LIBAVUTIL_VERSION_INT, \
|
||||||
|
};
|
||||||
|
|
||||||
#define M2MDEC(NAME, LONGNAME, CODEC, bsf_name) \
|
#define M2MDEC(NAME, LONGNAME, CODEC, bsf_name) \
|
||||||
static const AVClass v4l2_m2m_ ## NAME ## _dec_class = {\
|
M2MDEC_CLASS(NAME) \
|
||||||
.class_name = #NAME "_v4l2_m2m_decoder",\
|
AVCodec ff_ ## NAME ## _v4l2m2m_decoder = { \
|
||||||
.item_name = av_default_item_name,\
|
.name = #NAME "_v4l2m2m" , \
|
||||||
.option = options,\
|
.long_name = NULL_IF_CONFIG_SMALL("V4L2 mem2mem " LONGNAME " decoder wrapper"), \
|
||||||
.version = LIBAVUTIL_VERSION_INT,\
|
.type = AVMEDIA_TYPE_VIDEO, \
|
||||||
};\
|
.id = CODEC , \
|
||||||
\
|
.priv_data_size = sizeof(V4L2m2mPriv), \
|
||||||
AVCodec ff_ ## NAME ## _v4l2m2m_decoder = { \
|
.priv_class = &v4l2_m2m_ ## NAME ## _dec_class, \
|
||||||
.name = #NAME "_v4l2m2m" ,\
|
.init = v4l2_decode_init, \
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("V4L2 mem2mem " LONGNAME " decoder wrapper"),\
|
.receive_frame = v4l2_receive_frame, \
|
||||||
.type = AVMEDIA_TYPE_VIDEO,\
|
.close = v4l2_decode_close, \
|
||||||
.id = CODEC ,\
|
.bsfs = bsf_name, \
|
||||||
.priv_data_size = sizeof(V4L2m2mPriv),\
|
.capabilities = AV_CODEC_CAP_HARDWARE | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING, \
|
||||||
.priv_class = &v4l2_m2m_ ## NAME ## _dec_class,\
|
.wrapper_name = "v4l2m2m", \
|
||||||
.init = v4l2_decode_init,\
|
};
|
||||||
.receive_frame = v4l2_receive_frame,\
|
|
||||||
.close = v4l2_decode_close,\
|
|
||||||
.bsfs = bsf_name, \
|
|
||||||
.capabilities = AV_CODEC_CAP_HARDWARE | AV_CODEC_CAP_DELAY | \
|
|
||||||
AV_CODEC_CAP_AVOID_PROBING, \
|
|
||||||
.wrapper_name = "v4l2m2m", \
|
|
||||||
};
|
|
||||||
|
|
||||||
M2MDEC(h264, "H.264", AV_CODEC_ID_H264, "h264_mp4toannexb");
|
M2MDEC(h264, "H.264", AV_CODEC_ID_H264, "h264_mp4toannexb");
|
||||||
M2MDEC(hevc, "HEVC", AV_CODEC_ID_HEVC, "hevc_mp4toannexb");
|
M2MDEC(hevc, "HEVC", AV_CODEC_ID_HEVC, "hevc_mp4toannexb");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user