aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/nvdec_mjpeg.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-08-01 19:44:22 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-08-07 09:50:29 +0200
commite35dfe864d8fb1ee9e28684a5a93e4b75d0d8092 (patch)
treebbf1004fe094653f8dc00048137f17cc4cb06ab6 /libavcodec/nvdec_mjpeg.c
parentc48cc9c6e90bc8ca0304bd57cb77f7a689f83391 (diff)
downloadffmpeg-e35dfe864d8fb1ee9e28684a5a93e4b75d0d8092.tar.gz
avcodec/avcodec: Add FFHWAccel, hide internals of AVHWAccel
This commit is the AVHWAccel analogue of commit 20f972701806be20a77f808db332d9489343bb78: It moves the private fields of AVHWAccel to a new struct FFHWAccel extending AVHWAccel in an internal header (namely hwaccel_internal.h). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/nvdec_mjpeg.c')
-rw-r--r--libavcodec/nvdec_mjpeg.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libavcodec/nvdec_mjpeg.c b/libavcodec/nvdec_mjpeg.c
index daaf0072ed..850634bf1a 100644
--- a/libavcodec/nvdec_mjpeg.c
+++ b/libavcodec/nvdec_mjpeg.c
@@ -25,6 +25,7 @@
#include "mjpegdec.h"
#include "nvdec.h"
#include "decode.h"
+#include "hwaccel_internal.h"
static int nvdec_mjpeg_start_frame(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
{
@@ -69,11 +70,11 @@ static int nvdec_mjpeg_frame_params(AVCodecContext *avctx,
return ff_nvdec_frame_params(avctx, hw_frames_ctx, 1, 0);
}
-const AVHWAccel ff_mjpeg_nvdec_hwaccel = {
- .name = "mjpeg_nvdec",
- .type = AVMEDIA_TYPE_VIDEO,
- .id = AV_CODEC_ID_MJPEG,
- .pix_fmt = AV_PIX_FMT_CUDA,
+const FFHWAccel ff_mjpeg_nvdec_hwaccel = {
+ .p.name = "mjpeg_nvdec",
+ .p.type = AVMEDIA_TYPE_VIDEO,
+ .p.id = AV_CODEC_ID_MJPEG,
+ .p.pix_fmt = AV_PIX_FMT_CUDA,
.start_frame = nvdec_mjpeg_start_frame,
.end_frame = ff_nvdec_simple_end_frame,
.decode_slice = nvdec_mjpeg_decode_slice,