aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/msmpeg4dec.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-03-16 21:09:54 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-03-21 01:33:09 +0100
commit20f972701806be20a77f808db332d9489343bb78 (patch)
tree8d8b588c0ca06fa652518a5685db8280b0bf532d /libavcodec/msmpeg4dec.c
parenta688f3c13ce55c2ba51dbbb344564649f1bb52fe (diff)
downloadffmpeg-20f972701806be20a77f808db332d9489343bb78.tar.gz
avcodec/codec_internal: Add FFCodec, hide internal part of AVCodec
Up until now, codec.h contains both public and private parts of AVCodec. This exposes the internals of AVCodec to users and leads them into the temptation of actually using them and forces us to forward-declare structures and types that users can't use at all. This commit changes this by adding a new structure FFCodec to codec_internal.h that extends AVCodec, i.e. contains the public AVCodec as first member; the private fields of AVCodec are moved to this structure, leaving codec.h clean. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/msmpeg4dec.c')
-rw-r--r--libavcodec/msmpeg4dec.c64
1 files changed, 32 insertions, 32 deletions
diff --git a/libavcodec/msmpeg4dec.c b/libavcodec/msmpeg4dec.c
index f2eb9cbb33..f0cb11eceb 100644
--- a/libavcodec/msmpeg4dec.c
+++ b/libavcodec/msmpeg4dec.c
@@ -864,77 +864,77 @@ void ff_msmpeg4_decode_motion(MpegEncContext *s, int *mx_ptr, int *my_ptr)
*my_ptr = my;
}
-const AVCodec ff_msmpeg4v1_decoder = {
- .name = "msmpeg4v1",
- .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 1"),
- .type = AVMEDIA_TYPE_VIDEO,
- .id = AV_CODEC_ID_MSMPEG4V1,
+const FFCodec ff_msmpeg4v1_decoder = {
+ .p.name = "msmpeg4v1",
+ .p.long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 1"),
+ .p.type = AVMEDIA_TYPE_VIDEO,
+ .p.id = AV_CODEC_ID_MSMPEG4V1,
.priv_data_size = sizeof(MpegEncContext),
.init = ff_msmpeg4_decode_init,
.close = ff_h263_decode_end,
.decode = ff_h263_decode_frame,
- .capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1,
+ .p.capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM,
- .max_lowres = 3,
- .pix_fmts = (const enum AVPixelFormat[]) {
+ .p.max_lowres = 3,
+ .p.pix_fmts = (const enum AVPixelFormat[]) {
AV_PIX_FMT_YUV420P,
AV_PIX_FMT_NONE
},
};
-const AVCodec ff_msmpeg4v2_decoder = {
- .name = "msmpeg4v2",
- .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 2"),
- .type = AVMEDIA_TYPE_VIDEO,
- .id = AV_CODEC_ID_MSMPEG4V2,
+const FFCodec ff_msmpeg4v2_decoder = {
+ .p.name = "msmpeg4v2",
+ .p.long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 2"),
+ .p.type = AVMEDIA_TYPE_VIDEO,
+ .p.id = AV_CODEC_ID_MSMPEG4V2,
.priv_data_size = sizeof(MpegEncContext),
.init = ff_msmpeg4_decode_init,
.close = ff_h263_decode_end,
.decode = ff_h263_decode_frame,
- .capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1,
+ .p.capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM,
- .max_lowres = 3,
- .pix_fmts = (const enum AVPixelFormat[]) {
+ .p.max_lowres = 3,
+ .p.pix_fmts = (const enum AVPixelFormat[]) {
AV_PIX_FMT_YUV420P,
AV_PIX_FMT_NONE
},
};
-const AVCodec ff_msmpeg4v3_decoder = {
- .name = "msmpeg4",
- .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 3"),
- .type = AVMEDIA_TYPE_VIDEO,
- .id = AV_CODEC_ID_MSMPEG4V3,
+const FFCodec ff_msmpeg4v3_decoder = {
+ .p.name = "msmpeg4",
+ .p.long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 3"),
+ .p.type = AVMEDIA_TYPE_VIDEO,
+ .p.id = AV_CODEC_ID_MSMPEG4V3,
.priv_data_size = sizeof(MpegEncContext),
.init = ff_msmpeg4_decode_init,
.close = ff_h263_decode_end,
.decode = ff_h263_decode_frame,
- .capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1,
+ .p.capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM,
- .max_lowres = 3,
- .pix_fmts = (const enum AVPixelFormat[]) {
+ .p.max_lowres = 3,
+ .p.pix_fmts = (const enum AVPixelFormat[]) {
AV_PIX_FMT_YUV420P,
AV_PIX_FMT_NONE
},
};
-const AVCodec ff_wmv1_decoder = {
- .name = "wmv1",
- .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 7"),
- .type = AVMEDIA_TYPE_VIDEO,
- .id = AV_CODEC_ID_WMV1,
+const FFCodec ff_wmv1_decoder = {
+ .p.name = "wmv1",
+ .p.long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 7"),
+ .p.type = AVMEDIA_TYPE_VIDEO,
+ .p.id = AV_CODEC_ID_WMV1,
.priv_data_size = sizeof(MpegEncContext),
.init = ff_msmpeg4_decode_init,
.close = ff_h263_decode_end,
.decode = ff_h263_decode_frame,
- .capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1,
+ .p.capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM,
- .max_lowres = 3,
- .pix_fmts = (const enum AVPixelFormat[]) {
+ .p.max_lowres = 3,
+ .p.pix_fmts = (const enum AVPixelFormat[]) {
AV_PIX_FMT_YUV420P,
AV_PIX_FMT_NONE
},