1
0
mirror of https://github.com/libretro/Lakka-LibreELEC.git synced 2024-11-28 01:34:40 +00:00
Lakka-LibreELEC/packages/multimedia/ffmpeg/patches/L4T/0022-codecs-nvv4l2-rename-AVCodec-to-fit-API-renames.patch
GavinDarkglider 66e50e96b9
Lakka v5.x switch 6 (#1926)
* L4T: Fix/Enable NVV4l2 decoder in libreelec builds.

* L4T: LibreELEC: Allow Kodi to run as root

* L4T: Small Tree Cleanup

* Bluez: Switch: LibreELEC: Fix fast connect on all switch builds, not just lakka.

* L4T: Finish ffmpeg 6.0 patchset

* L4T: Fix building newer libcec for switch

* L4T: switch-bsp: Update dock hotplug to check distro stuff, before integrating CEC and bump version.
2024-01-29 20:49:02 +02:00

102 lines
6.2 KiB
Diff

From b2a7cfdcf77cfd5c3ca864670aa949ddef17cd9a Mon Sep 17 00:00:00 2001
From: Azkali Manad <a.ffcc7@gmail.com>
Date: Wed, 25 Jan 2023 02:02:57 +0100
Subject: [PATCH 22/39] codecs: nvv4l2: rename AVCodec to fit API renames
---
libavcodec/nvv4l2_dec.c | 20 ++++++++++----------
libavcodec/nvv4l2_enc.c | 20 ++++++++++----------
2 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/libavcodec/nvv4l2_dec.c b/libavcodec/nvv4l2_dec.c
index 35784e0704..b56d35cf82 100644
--- a/libavcodec/nvv4l2_dec.c
+++ b/libavcodec/nvv4l2_dec.c
@@ -29,7 +29,7 @@
#include <string.h>
#include <fcntl.h>
#include <errno.h>
-#include "internal.h"
+#include "codec_internal.h"
#include "libavutil/log.h"
#include "nvv4l2.h"
@@ -1203,22 +1203,22 @@ nvv4l2dec_decode(AVCodecContext *avctx, void *data, int *got_frame,
#define NVV4L2_DEC(NAME, ID, BSFS) \
NVV4L2_DEC_CLASS(NAME) \
- AVCodec ff_##NAME##_nvv4l2_decoder = { \
- .name = #NAME "_nvv4l2", \
- .long_name = NULL_IF_CONFIG_SMALL(#NAME " NVV4L2 HW decoder for Tegra"), \
- .type = AVMEDIA_TYPE_VIDEO, \
- .id = ID, \
+ const FFCodec ff_##NAME##_nvv4l2_decoder = { \
+ .p.name = #NAME "_nvv4l2", \
+ .p.long_name = NULL_IF_CONFIG_SMALL(#NAME " NVV4L2 HW decoder for Tegra"), \
+ .p.type = AVMEDIA_TYPE_VIDEO, \
+ .p.id = ID, \
.priv_data_size = sizeof(nvv4l2DecodeContext), \
.init = nvv4l2dec_init, \
.close = nvv4l2dec_close, \
.decode = nvv4l2dec_decode, \
.flush = nvv4l2dec_flush, \
- .priv_class = &nvv4l2_##NAME##_dec_class, \
- .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE | \
+ .p.priv_class = &nvv4l2_##NAME##_dec_class, \
+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE | \
AV_CODEC_CAP_AVOID_PROBING, \
.bsfs = BSFS, \
- .wrapper_name = "nvv4l2", \
- .pix_fmts =(const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, \
+ .p.wrapper_name = "nvv4l2", \
+ .p.pix_fmts =(const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, \
AV_PIX_FMT_NV12, \
AV_PIX_FMT_NONE }, \
};
diff --git a/libavcodec/nvv4l2_enc.c b/libavcodec/nvv4l2_enc.c
index dc09236e0a..fad54868e3 100644
--- a/libavcodec/nvv4l2_enc.c
+++ b/libavcodec/nvv4l2_enc.c
@@ -28,7 +28,7 @@
#include <string.h>
#include <fcntl.h>
#include <errno.h>
-#include "internal.h"
+#include "codec_internal.h"
#include "libavutil/imgutils.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
@@ -1455,20 +1455,20 @@ static const AVOption options_hevc[] = {
#define NVV4L2_ENC(NAME, ID) \
NVV4L2_ENC_CLASS(NAME) \
- AVCodec ff_##NAME##_nvv4l2_encoder = { \
- .name = #NAME "_nvv4l2" , \
- .long_name = NULL_IF_CONFIG_SMALL(#NAME " NVV4L2 HW encoder for Tegra"), \
- .type = AVMEDIA_TYPE_VIDEO, \
- .id = ID, \
+ const FFCodec ff_##NAME##_nvv4l2_encoder = { \
+ .p.name = #NAME "_nvv4l2" , \
+ .p.long_name = NULL_IF_CONFIG_SMALL(#NAME " NVV4L2 HW encoder for Tegra"), \
+ .p.type = AVMEDIA_TYPE_VIDEO, \
+ .p.id = ID, \
.priv_data_size = sizeof(nvv4l2EncodeContext), \
.init = nvv4l2enc_init, \
.close = nvv4l2enc_close, \
.encode2 = nvv4l2enc_encode, \
- .priv_class = &nvv4l2_##NAME##_enc_class, \
- .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE, \
+ .p.priv_class = &nvv4l2_##NAME##_enc_class, \
+ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_HARDWARE, \
.defaults = defaults, \
- .wrapper_name = "nvv4l2", \
- .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P, \
+ .p.wrapper_name = "nvv4l2", \
+ .p.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P, \
AV_PIX_FMT_YUV444P, \
AV_PIX_FMT_NV12, \
AV_PIX_FMT_P010, \
--
2.25.1