Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
84540b2b
Commit
84540b2b
authored
Aug 27, 2019
by
Aman Gupta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/v4l2_m2m_enc: fix indentation and add M2MENC_CLASS macro
Signed-off-by:
Aman Gupta
<
aman@tmm1.net
>
parent
f9b0f88a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
21 deletions
+23
-21
v4l2_m2m_enc.c
libavcodec/v4l2_m2m_enc.c
+23
-21
No files found.
libavcodec/v4l2_m2m_enc.c
View file @
84540b2b
...
...
@@ -332,28 +332,30 @@ static const AVOption options[] = {
{
NULL
},
};
#define M2MENC_CLASS(NAME) \
static const AVClass v4l2_m2m_ ## NAME ## _enc_class = { \
.class_name = #NAME "_v4l2m2m_encoder", \
.item_name = av_default_item_name, \
.option = options, \
.version = LIBAVUTIL_VERSION_INT, \
};
#define M2MENC(NAME, LONGNAME, CODEC) \
static const AVClass v4l2_m2m_ ## NAME ## _enc_class = {\
.class_name = #NAME "_v4l2_m2m_encoder",\
.item_name = av_default_item_name,\
.option = options,\
.version = LIBAVUTIL_VERSION_INT,\
};\
\
AVCodec ff_ ## NAME ## _v4l2m2m_encoder = { \
.name = #NAME "_v4l2m2m" ,\
.long_name = NULL_IF_CONFIG_SMALL("V4L2 mem2mem " LONGNAME " encoder wrapper"),\
.type = AVMEDIA_TYPE_VIDEO,\
.id = CODEC ,\
.priv_data_size = sizeof(V4L2m2mPriv),\
.priv_class = &v4l2_m2m_ ## NAME ##_enc_class,\
.init = v4l2_encode_init,\
.send_frame = v4l2_send_frame,\
.receive_packet = v4l2_receive_packet,\
.close = v4l2_encode_close,\
.capabilities = AV_CODEC_CAP_HARDWARE | AV_CODEC_CAP_DELAY, \
.wrapper_name = "v4l2m2m", \
};
M2MENC_CLASS(NAME) \
AVCodec ff_ ## NAME ## _v4l2m2m_encoder = { \
.name = #NAME "_v4l2m2m" , \
.long_name = NULL_IF_CONFIG_SMALL("V4L2 mem2mem " LONGNAME " encoder wrapper"), \
.type = AVMEDIA_TYPE_VIDEO, \
.id = CODEC , \
.priv_data_size = sizeof(V4L2m2mPriv), \
.priv_class = &v4l2_m2m_ ## NAME ##_enc_class, \
.init = v4l2_encode_init, \
.send_frame = v4l2_send_frame, \
.receive_packet = v4l2_receive_packet, \
.close = v4l2_encode_close, \
.capabilities = AV_CODEC_CAP_HARDWARE | AV_CODEC_CAP_DELAY, \
.wrapper_name = "v4l2m2m", \
};
M2MENC
(
mpeg4
,
"MPEG4"
,
AV_CODEC_ID_MPEG4
);
M2MENC
(
h263
,
"H.263"
,
AV_CODEC_ID_H263
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment