Merge pull request #5546 from CvH/11.0/kodi_up

Kodi bump to 20.0 branch
This commit is contained in:
Jernej Škrabec
2021-09-26 14:44:17 +02:00
committed by GitHub
19 changed files with 1019 additions and 958 deletions

View File

@@ -5,4 +5,4 @@
OS_VERSION="11.0"
# ADDON_VERSION: Addon version
ADDON_VERSION="10.80.0"
ADDON_VERSION="10.80.1"

View File

@@ -3,8 +3,8 @@
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="kodi"
PKG_VERSION="6402a50950ff6463042f8891ec4029c782730391"
PKG_SHA256="56e1a64f2cd1b38e6997dac3057cdeb81e33109bfa449521493208b514466bd0"
PKG_VERSION="3d01768da145e67708ed378dfc36bb4b61a81624"
PKG_SHA256="fcc2ac30f62b55bf36fb5edf9026cdd4b1af2aaecd17accc0500705850de0cc3"
PKG_LICENSE="GPL"
PKG_SITE="http://www.kodi.tv"
PKG_URL="https://github.com/xbmc/xbmc/archive/${PKG_VERSION}.tar.gz"

View File

@@ -13,15 +13,15 @@ Subject: disable online check
{"uptime", SYSTEM_UPTIME},
--- a/xbmc/utils/SystemInfo.cpp
+++ b/xbmc/utils/SystemInfo.cpp
@@ -271,7 +271,6 @@ bool CSysInfoJob::DoWork()
@@ -274,7 +274,6 @@ bool CSysInfoJob::DoWork()
{
m_info.systemUptime = GetSystemUpTime(false);
m_info.systemTotalUptime = GetSystemUpTime(true);
- m_info.internetState = GetInternetState();
m_info.videoEncoder = GetVideoEncoder();
m_info.cpuFrequency =
StringUtils::Format("%4.0f MHz", CServiceBroker::GetCPUInfo()->GetCPUFrequency());
@@ -1000,9 +999,7 @@ int CSysInfo::GetXbmcBitness(void)
StringUtils::Format("{:4.0f} MHz", CServiceBroker::GetCPUInfo()->GetCPUFrequency());
@@ -1010,9 +1009,7 @@ int CSysInfo::GetXbmcBitness(void)
bool CSysInfo::HasInternet()
{
@@ -35,10 +35,10 @@ Subject: disable online check
--- a/xbmc/windows/GUIWindowSystemInfo.cpp
+++ b/xbmc/windows/GUIWindowSystemInfo.cpp
@@ -124,7 +124,6 @@ void CGUIWindowSystemInfo::FrameMove()
SetControlLabel(i++, "%s: %s", 13160, NETWORK_GATEWAY_ADDRESS);
SetControlLabel(i++, "%s: %s", 13161, NETWORK_DNS1_ADDRESS);
SetControlLabel(i++, "%s: %s", 20307, NETWORK_DNS2_ADDRESS);
- SetControlLabel(i++, "%s %s", 13295, SYSTEM_INTERNET_STATE);
SetControlLabel(i++, "{}: {}", 13160, NETWORK_GATEWAY_ADDRESS);
SetControlLabel(i++, "{}: {}", 13161, NETWORK_DNS1_ADDRESS);
SetControlLabel(i++, "{}: {}", 20307, NETWORK_DNS2_ADDRESS);
- SetControlLabel(i++, "{} {}", 13295, SYSTEM_INTERNET_STATE);
}
else if (m_section == CONTROL_BT_VIDEO)

View File

@@ -23,7 +23,7 @@ credits to vpeter4 for the patch
#include "AddonManager.h"
#include "addons/settings/AddonSettings.h"
#include "filesystem/Directory.h"
@@ -385,6 +389,28 @@ void OnPreInstall(const AddonPtr& addon)
@@ -390,6 +394,28 @@ void OnPreInstall(const AddonPtr& addon)
void OnPostInstall(const AddonPtr& addon, bool update, bool modal)
{

View File

@@ -14,7 +14,7 @@ this should probably be removed after OE 6
--- a/xbmc/windowing/X11/WinSystemX11.cpp
+++ b/xbmc/windowing/X11/WinSystemX11.cpp
@@ -753,8 +753,6 @@ bool CWinSystemX11::SetWindow(int width,
@@ -756,8 +756,6 @@ bool CWinSystemX11::SetWindow(int width,
if (fullscreen && hasWM)
{

View File

@@ -9,11 +9,11 @@ Subject: [PATCH 07/13] disable minimize
--- a/xbmc/Application.cpp
+++ b/xbmc/Application.cpp
@@ -4818,7 +4818,6 @@ bool CApplication::SwitchToFullScreen(bo
@@ -2055,7 +2055,6 @@ void CApplication::OnApplicationMessage(
break;
void CApplication::Minimize()
{
- CServiceBroker::GetWinSystem()->Minimize();
}
case TMSG_MINIMIZE:
- CServiceBroker::GetWinSystem()->Minimize();
break;
std::string CApplication::GetCurrentPlayer()
case TMSG_EXECUTE_OS:

View File

@@ -1,6 +1,6 @@
--- a/xbmc/addons/Addon.cpp
+++ b/xbmc/addons/Addon.cpp
@@ -380,6 +380,37 @@ AddonVersion CAddon::GetDependencyVersio
@@ -385,6 +385,37 @@ AddonVersion CAddon::GetDependencyVersio
return m_addonInfo->DependencyVersion(dependencyID);
}
@@ -38,7 +38,7 @@
void OnPreInstall(const AddonPtr& addon)
{
//Fallback to the pre-install callback in the addon.
@@ -409,6 +440,8 @@ void OnPostInstall(const AddonPtr& addon
@@ -414,6 +445,8 @@ void OnPostInstall(const AddonPtr& addon
}
closedir(addonsDir);
}
@@ -47,7 +47,7 @@
// OE
addon->OnPostInstall(update, modal);
@@ -416,6 +449,8 @@ void OnPostInstall(const AddonPtr& addon
@@ -421,6 +454,8 @@ void OnPostInstall(const AddonPtr& addon
void OnPreUnInstall(const AddonPtr& addon)
{
@@ -76,7 +76,7 @@
public:
--- a/xbmc/addons/AddonManager.cpp
+++ b/xbmc/addons/AddonManager.cpp
@@ -789,6 +789,7 @@ bool CAddonMgr::DisableAddon(const std::
@@ -795,6 +795,7 @@ bool CAddonMgr::DisableAddon(const std::
AddonPtr addon;
if (GetAddon(id, addon, ADDON_UNKNOWN, OnlyEnabled::NO) && addon != NULL)
{
@@ -84,7 +84,7 @@
CServiceBroker::GetEventLog().Add(EventPtr(new CAddonManagementEvent(addon, 24141)));
}
@@ -834,6 +835,7 @@ bool CAddonMgr::EnableSingle(const std::
@@ -840,6 +841,7 @@ bool CAddonMgr::EnableSingle(const std::
if (!m_database.EnableAddon(id))
return false;
m_disabled.erase(id);

View File

@@ -24,7 +24,7 @@ so, when shutdown/reboot is requested:
--- a/xbmc/Application.cpp
+++ b/xbmc/Application.cpp
@@ -2118,12 +2118,12 @@ void CApplication::OnApplicationMessage(
@@ -1935,12 +1935,12 @@ void CApplication::OnApplicationMessage(
switch (msg)
{
case TMSG_POWERDOWN:
@@ -39,7 +39,7 @@ so, when shutdown/reboot is requested:
break;
case TMSG_SHUTDOWN:
@@ -2144,12 +2144,13 @@ void CApplication::OnApplicationMessage(
@@ -1961,12 +1961,13 @@ void CApplication::OnApplicationMessage(
case TMSG_RESTART:
case TMSG_RESET:
@@ -54,7 +54,7 @@ so, when shutdown/reboot is requested:
Stop(EXITCODE_RESTARTAPP);
#endif
break;
@@ -2635,6 +2636,17 @@ bool CApplication::Cleanup()
@@ -2456,6 +2457,17 @@ bool CApplication::Cleanup()
}
}
@@ -72,7 +72,7 @@ so, when shutdown/reboot is requested:
void CApplication::Stop(int exitCode)
{
CLog::Log(LOGINFO, "Stopping player");
@@ -2661,7 +2673,7 @@ void CApplication::Stop(int exitCode)
@@ -2482,7 +2494,7 @@ void CApplication::Stop(int exitCode)
m_frameMoveGuard.unlock();
CVariant vExitCode(CVariant::VariantTypeObject);
@@ -81,7 +81,7 @@ so, when shutdown/reboot is requested:
CServiceBroker::GetAnnouncementManager()->Announce(ANNOUNCEMENT::System, "OnQuit", vExitCode);
// Abort any active screensaver
@@ -2693,7 +2705,6 @@ void CApplication::Stop(int exitCode)
@@ -2514,7 +2526,6 @@ void CApplication::Stop(int exitCode)
// Needs cleaning up
CApplicationMessenger::GetInstance().Stop();
m_AppFocused = false;
@@ -89,7 +89,7 @@ so, when shutdown/reboot is requested:
CLog::Log(LOGINFO, "Stopping all");
// cancel any jobs from the jobmanager
@@ -4347,7 +4358,7 @@ void CApplication::ProcessSlow()
@@ -4157,7 +4168,7 @@ void CApplication::ProcessSlow()
if (CPlatformPosix::TestQuitFlag())
{
CLog::Log(LOGINFO, "Quitting due to POSIX signal");
@@ -100,8 +100,8 @@ so, when shutdown/reboot is requested:
--- a/xbmc/Application.h
+++ b/xbmc/Application.h
@@ -156,6 +156,7 @@ public:
bool StartServer(enum ESERVERS eServer, bool bStart, bool bWait = false);
@@ -138,6 +138,7 @@ public:
bool InitWindow(RESOLUTION res = RES_INVALID);
bool IsCurrentThread() const;
+ void SetExitCode(int exitCode);
@@ -110,7 +110,7 @@ so, when shutdown/reboot is requested:
bool LoadCustomWindows();
--- a/xbmc/XBApplicationEx.cpp
+++ b/xbmc/XBApplicationEx.cpp
@@ -23,6 +23,7 @@ CXBApplicationEx::CXBApplicationEx()
@@ -22,6 +22,7 @@ CXBApplicationEx::CXBApplicationEx()
m_bStop = false;
m_AppFocused = true;
m_ExitCode = EXITCODE_QUIT;

View File

@@ -1,10 +1,10 @@
--- a/xbmc/windows/GUIWindowSystemInfo.cpp
+++ b/xbmc/windows/GUIWindowSystemInfo.cpp
@@ -99,7 +99,6 @@ void CGUIWindowSystemInfo::FrameMove()
SetControlLabel(i++, "%s %s", 13283, SYSTEM_OS_VERSION_INFO);
SetControlLabel(i++, "%s: %s", 12390, SYSTEM_UPTIME);
SetControlLabel(i++, "%s: %s", 12394, SYSTEM_TOTALUPTIME);
- SetControlLabel(i++, "%s: %s", 12395, SYSTEM_BATTERY_LEVEL);
SetControlLabel(i++, "{} {}", 13283, SYSTEM_OS_VERSION_INFO);
SetControlLabel(i++, "{}: {}", 12390, SYSTEM_UPTIME);
SetControlLabel(i++, "{}: {}", 12394, SYSTEM_TOTALUPTIME);
- SetControlLabel(i++, "{}: {}", 12395, SYSTEM_BATTERY_LEVEL);
}
else if (m_section == CONTROL_BT_STORAGE)

View File

@@ -9,7 +9,7 @@ Subject: [PATCH] refresh /etc/environment on install and uninstall
--- a/xbmc/addons/Addon.cpp
+++ b/xbmc/addons/Addon.cpp
@@ -445,6 +445,9 @@ void OnPostInstall(const AddonPtr& addon
@@ -450,6 +450,9 @@ void OnPostInstall(const AddonPtr& addon
// OE
addon->OnPostInstall(update, modal);
@@ -19,7 +19,7 @@ Subject: [PATCH] refresh /etc/environment on install and uninstall
}
void OnPreUnInstall(const AddonPtr& addon)
@@ -457,6 +460,9 @@ void OnPreUnInstall(const AddonPtr& addo
@@ -462,6 +465,9 @@ void OnPreUnInstall(const AddonPtr& addo
void OnPostUnInstall(const AddonPtr& addon)
{
addon->OnPostUnInstall();

View File

@@ -10,18 +10,13 @@ https://github.com/xbmc/xbmc/pull/19091
xbmc/platform/linux/PlatformLinux.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/xbmc/platform/linux/PlatformLinux.h b/xbmc/platform/linux/PlatformLinux.h
index c45d41143a..9a872a5f55 100644
--- a/xbmc/platform/linux/PlatformLinux.h
+++ b/xbmc/platform/linux/PlatformLinux.h
@@ -21,7 +21,6 @@ public:
~CPlatformLinux() override = default;
bool Init() override;
bool InitStageOne() override;
- bool IsConfigureAddonsAtStartupEnabled() override { return true; };
private:
std::unique_ptr<OPTIONALS::CLircContainer, OPTIONALS::delete_CLircContainer> m_lirc;
--
2.31.1

View File

@@ -3,8 +3,8 @@
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="ffmpeg"
PKG_VERSION="4.3.2-Matrix-19.1"
PKG_SHA256="c2558449f1eddb6b13ed168288388c7804049c2af8d6db4952ccd6b4af6e9fdd"
PKG_VERSION="4.4-N-Alpha1"
PKG_SHA256="eb396f46ef7c5ac01b67818d0f2c0516fd4ab32aa9065a9ffa71eebede67ff20"
PKG_LICENSE="LGPLv2.1+"
PKG_SITE="https://ffmpeg.org"
PKG_URL="https://github.com/xbmc/FFmpeg/archive/${PKG_VERSION}.tar.gz"

View File

@@ -1,4 +1,4 @@
From 823b70bfa0f451a0f8cd0539e1707f7bb7ff5891 Mon Sep 17 00:00:00 2001
From 8f7c8a0f9e28641880d72996b9452e0a9da1288c Mon Sep 17 00:00:00 2001
From: Lukas Rusak <lorusak@gmail.com>
Date: Wed, 10 Apr 2019 13:39:21 -0700
Subject: [PATCH 1/2] libavcodec/libdav1d: add libdav1d_get_format method to
@@ -18,10 +18,10 @@ decoding is properly activated.
1 file changed, 11 insertions(+)
diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c
index bbb3ec1e6c..d8a7555c29 100644
index 3c2a68b7e0..68996426cc 100644
--- a/libavcodec/libdav1d.c
+++ b/libavcodec/libdav1d.c
@@ -55,6 +55,16 @@ static const enum AVPixelFormat pix_fmt_rgb[3] = {
@@ -58,6 +58,16 @@ static const enum AVPixelFormat pix_fmt_rgb[3] = {
AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRP12,
};
@@ -38,7 +38,7 @@ index bbb3ec1e6c..d8a7555c29 100644
static void libdav1d_log_callback(void *opaque, const char *fmt, va_list vl)
{
AVCodecContext *c = opaque;
@@ -259,6 +269,7 @@ static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame)
@@ -264,6 +274,7 @@ static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame)
c->profile = p->seq_hdr->profile;
c->level = ((p->seq_hdr->operating_points[0].major_level - 2) << 2)
| p->seq_hdr->operating_points[0].minor_level;
@@ -47,7 +47,7 @@ index bbb3ec1e6c..d8a7555c29 100644
frame->height = p->p.h;
if (c->width != p->p.w || c->height != p->p.h) {
From 1485078472d107806d1d3f52f89e3ff47ae8715c Mon Sep 17 00:00:00 2001
From 635cf67be3d37159c96e75f00399b3e232372251 Mon Sep 17 00:00:00 2001
From: chewitt <github@chrishewitt.net>
Date: Sun, 11 Aug 2019 07:08:19 +0000
Subject: [PATCH 2/2] add long-term yuv2rgb logging patch
@@ -57,7 +57,7 @@ Subject: [PATCH 2/2] add long-term yuv2rgb logging patch
1 file changed, 4 deletions(-)
diff --git a/libswscale/yuv2rgb.c b/libswscale/yuv2rgb.c
index 588462504e..20364ff318 100644
index 6a3956e8e2..d6f9aea166 100644
--- a/libswscale/yuv2rgb.c
+++ b/libswscale/yuv2rgb.c
@@ -688,10 +688,6 @@ SwsFunc ff_yuv2rgb_get_func_ptr(SwsContext *c)

File diff suppressed because it is too large Load Diff

View File

@@ -1,122 +1,7 @@
From b29b5b9f529bbb10cd9880adebf0fb287dcf233b Mon Sep 17 00:00:00 2001
From: Andriy Gelman <andriy.gelman@gmail.com>
Date: Tue, 28 Apr 2020 22:54:21 -0400
Subject: [PATCH 01/11] avcodec/v4l2_m2m: Adapt to call close() on init fail
This fixes several mem leaks when init of encoder/decoder failed.
Fixes ticket #8285
Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
---
libavcodec/v4l2_m2m.c | 8 ++++++++
libavcodec/v4l2_m2m_dec.c | 10 ++--------
libavcodec/v4l2_m2m_enc.c | 1 +
3 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/libavcodec/v4l2_m2m.c b/libavcodec/v4l2_m2m.c
index e48b3a8ccf..bfea70ff0c 100644
--- a/libavcodec/v4l2_m2m.c
+++ b/libavcodec/v4l2_m2m.c
@@ -338,6 +338,13 @@ int ff_v4l2_m2m_codec_end(V4L2m2mPriv *priv)
V4L2m2mContext *s = priv->context;
int ret;
+ if (!s)
+ return 0;
+
+ if (av_codec_is_decoder(s->avctx->codec))
+ av_packet_unref(&s->buf_pkt);
+
+ if (s->fd >= 0) {
ret = ff_v4l2_context_set_status(&s->output, VIDIOC_STREAMOFF);
if (ret)
av_log(s->avctx, AV_LOG_ERROR, "VIDIOC_STREAMOFF %s\n", s->output.name);
@@ -345,6 +352,7 @@ int ff_v4l2_m2m_codec_end(V4L2m2mPriv *priv)
ret = ff_v4l2_context_set_status(&s->capture, VIDIOC_STREAMOFF);
if (ret)
av_log(s->avctx, AV_LOG_ERROR, "VIDIOC_STREAMOFF %s\n", s->capture.name);
+ }
ff_v4l2_context_release(&s->output);
diff --git a/libavcodec/v4l2_m2m_dec.c b/libavcodec/v4l2_m2m_dec.c
index 3e17e0fcac..a2ea0ff73a 100644
--- a/libavcodec/v4l2_m2m_dec.c
+++ b/libavcodec/v4l2_m2m_dec.c
@@ -212,9 +212,6 @@ static av_cold int v4l2_decode_init(AVCodecContext *avctx)
ret = ff_v4l2_m2m_codec_init(priv);
if (ret) {
av_log(avctx, AV_LOG_ERROR, "can't configure decoder\n");
- s->self_ref = NULL;
- av_buffer_unref(&priv->context_ref);
-
return ret;
}
@@ -223,10 +220,7 @@ static av_cold int v4l2_decode_init(AVCodecContext *avctx)
static av_cold int v4l2_decode_close(AVCodecContext *avctx)
{
- V4L2m2mPriv *priv = avctx->priv_data;
- V4L2m2mContext *s = priv->context;
- av_packet_unref(&s->buf_pkt);
- return ff_v4l2_m2m_codec_end(priv);
+ return ff_v4l2_m2m_codec_end(avctx->priv_data);
}
#define OFFSET(x) offsetof(V4L2m2mPriv, x)
@@ -261,7 +255,7 @@ static const AVOption options[] = {
.close = v4l2_decode_close, \
.bsfs = bsf_name, \
.capabilities = AV_CODEC_CAP_HARDWARE | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING, \
- .caps_internal = FF_CODEC_CAP_SETS_PKT_DTS, \
+ .caps_internal = FF_CODEC_CAP_SETS_PKT_DTS | FF_CODEC_CAP_INIT_CLEANUP, \
.wrapper_name = "v4l2m2m", \
}
diff --git a/libavcodec/v4l2_m2m_enc.c b/libavcodec/v4l2_m2m_enc.c
index 32321f392f..9f1b2c2ffc 100644
--- a/libavcodec/v4l2_m2m_enc.c
+++ b/libavcodec/v4l2_m2m_enc.c
@@ -416,6 +416,7 @@ static const AVCodecDefault v4l2_m2m_defaults[] = {
.close = v4l2_encode_close, \
.defaults = v4l2_m2m_defaults, \
.capabilities = AV_CODEC_CAP_HARDWARE | AV_CODEC_CAP_DELAY, \
+ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, \
.wrapper_name = "v4l2m2m", \
}
From 7aaac68934c0e03a78c9f477ec64e522729a64b7 Mon Sep 17 00:00:00 2001
From: Andriy Gelman <andriy.gelman@gmail.com>
Date: Tue, 5 May 2020 01:54:54 -0400
Subject: [PATCH 02/11] avcodec/v4l2_m2m_dec: Use av_packet_move_ref()
Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
---
libavcodec/v4l2_m2m_dec.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libavcodec/v4l2_m2m_dec.c b/libavcodec/v4l2_m2m_dec.c
index a2ea0ff73a..45e9a8e9fe 100644
--- a/libavcodec/v4l2_m2m_dec.c
+++ b/libavcodec/v4l2_m2m_dec.c
@@ -142,8 +142,7 @@ static int v4l2_receive_frame(AVCodecContext *avctx, AVFrame *frame)
int ret;
if (s->buf_pkt.size) {
- avpkt = s->buf_pkt;
- memset(&s->buf_pkt, 0, sizeof(AVPacket));
+ av_packet_move_ref(&avpkt, &s->buf_pkt);
} else {
ret = ff_decode_get_packet(avctx, &avpkt);
if (ret < 0 && ret != AVERROR_EOF)
From c6b85ed30f06ea99513b13cc768a922ebe4d68c2 Mon Sep 17 00:00:00 2001
From 40a990827399c05ad3ce3f8242321bd8a67aa0bd Mon Sep 17 00:00:00 2001
From: Lukas Rusak <lorusak@gmail.com>
Date: Tue, 24 Apr 2018 23:00:23 -0700
Subject: [PATCH 03/11] libavcodec: v4l2m2m: output AVDRMFrameDescriptor
Subject: [PATCH 1/9] libavcodec: v4l2m2m: output AVDRMFrameDescriptor
This allows for a zero-copy output by exporting the v4l2 buffer then wrapping that buffer
in the AVDRMFrameDescriptor like it is done in rkmpp.
@@ -157,7 +42,7 @@ V5:
5 files changed, 213 insertions(+), 12 deletions(-)
diff --git a/libavcodec/v4l2_buffers.c b/libavcodec/v4l2_buffers.c
index 02f23d954b..4bb2bf6f87 100644
index 4b2679eb38..cbd3e5680d 100644
--- a/libavcodec/v4l2_buffers.c
+++ b/libavcodec/v4l2_buffers.c
@@ -21,6 +21,7 @@
@@ -397,7 +282,7 @@ index 8dbc7fc104..037e667997 100644
* of how many context-refs we are holding. */
AVBufferRef *context_ref;
diff --git a/libavcodec/v4l2_context.c b/libavcodec/v4l2_context.c
index 29b144ed73..7a92df2c3e 100644
index ff1ea8e57b..e9e8c27a54 100644
--- a/libavcodec/v4l2_context.c
+++ b/libavcodec/v4l2_context.c
@@ -455,22 +455,54 @@ static int v4l2_release_buffers(V4L2Context* ctx)
@@ -460,10 +345,10 @@ index 29b144ed73..7a92df2c3e 100644
static inline int v4l2_try_raw_format(V4L2Context* ctx, enum AVPixelFormat pixfmt)
diff --git a/libavcodec/v4l2_m2m.h b/libavcodec/v4l2_m2m.h
index 456281f48c..4ee0be653b 100644
index b67b216331..0fbd19a013 100644
--- a/libavcodec/v4l2_m2m.h
+++ b/libavcodec/v4l2_m2m.h
@@ -63,6 +63,9 @@ typedef struct V4L2m2mContext {
@@ -66,6 +66,9 @@ typedef struct V4L2m2mContext {
/* reference back to V4L2m2mPriv */
void *priv;
@@ -474,7 +359,7 @@ index 456281f48c..4ee0be653b 100644
typedef struct V4L2m2mPriv {
diff --git a/libavcodec/v4l2_m2m_dec.c b/libavcodec/v4l2_m2m_dec.c
index 45e9a8e9fe..eb6ecc8ed5 100644
index ab07c0a24a..6bc7442702 100644
--- a/libavcodec/v4l2_m2m_dec.c
+++ b/libavcodec/v4l2_m2m_dec.c
@@ -23,6 +23,9 @@
@@ -497,7 +382,7 @@ index 45e9a8e9fe..eb6ecc8ed5 100644
#include "v4l2_context.h"
#include "v4l2_m2m.h"
#include "v4l2_fmt.h"
@@ -207,6 +213,15 @@ static av_cold int v4l2_decode_init(AVCodecContext *avctx)
@@ -201,6 +207,15 @@ static av_cold int v4l2_decode_init(AVCodecContext *avctx)
capture->av_codec_id = AV_CODEC_ID_RAWVIDEO;
capture->av_pix_fmt = avctx->pix_fmt;
@@ -513,7 +398,7 @@ index 45e9a8e9fe..eb6ecc8ed5 100644
s->avctx = avctx;
ret = ff_v4l2_m2m_codec_init(priv);
if (ret) {
@@ -232,6 +247,11 @@ static const AVOption options[] = {
@@ -226,6 +241,11 @@ static const AVOption options[] = {
{ NULL},
};
@@ -525,7 +410,7 @@ index 45e9a8e9fe..eb6ecc8ed5 100644
#define M2MDEC_CLASS(NAME) \
static const AVClass v4l2_m2m_ ## NAME ## _dec_class = { \
.class_name = #NAME "_v4l2m2m_decoder", \
@@ -255,6 +275,9 @@ static const AVOption options[] = {
@@ -249,6 +269,9 @@ static const AVOption options[] = {
.bsfs = bsf_name, \
.capabilities = AV_CODEC_CAP_HARDWARE | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING, \
.caps_internal = FF_CODEC_CAP_SETS_PKT_DTS | FF_CODEC_CAP_INIT_CLEANUP, \
@@ -536,10 +421,10 @@ index 45e9a8e9fe..eb6ecc8ed5 100644
}
From 2b5cd753892dceba3b211053a6266c40aab38c55 Mon Sep 17 00:00:00 2001
From 9a2a361c2c84c8da54cd3a74b0d0bb966df8fe69 Mon Sep 17 00:00:00 2001
From: Lukas Rusak <lorusak@gmail.com>
Date: Thu, 16 Aug 2018 21:09:40 -0700
Subject: [PATCH 04/11] libavcodec: v4l2m2m: depends on libdrm
Subject: [PATCH 2/9] libavcodec: v4l2m2m: depends on libdrm
---
configure | 1 +
@@ -547,10 +432,10 @@ Subject: [PATCH 04/11] libavcodec: v4l2m2m: depends on libdrm
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index 8569a60bf8..a049707dd6 100755
index d7a3f507e8..d203f6f7da 100755
--- a/configure
+++ b/configure
@@ -3401,6 +3401,7 @@ sndio_indev_deps="sndio"
@@ -3437,6 +3437,7 @@ sndio_indev_deps="sndio"
sndio_outdev_deps="sndio"
v4l2_indev_deps_any="linux_videodev2_h sys_videoio_h"
v4l2_indev_suggest="libv4l2"
@@ -559,7 +444,7 @@ index 8569a60bf8..a049707dd6 100755
v4l2_outdev_suggest="libv4l2"
vfwcap_indev_deps="vfw32 vfwcap_defines"
diff --git a/libavcodec/v4l2_buffers.c b/libavcodec/v4l2_buffers.c
index 4bb2bf6f87..c36a73d1fa 100644
index cbd3e5680d..bebe2c1796 100644
--- a/libavcodec/v4l2_buffers.c
+++ b/libavcodec/v4l2_buffers.c
@@ -21,7 +21,7 @@
@@ -572,10 +457,10 @@ index 4bb2bf6f87..c36a73d1fa 100644
#include <sys/ioctl.h>
#include <sys/mman.h>
From 09a0f1b99548a249991891ee4e02ae6613b545d7 Mon Sep 17 00:00:00 2001
From 7b0fa2d859c12a8a129c884d16673ca731336c06 Mon Sep 17 00:00:00 2001
From: Lukas Rusak <lorusak@gmail.com>
Date: Thu, 16 Aug 2018 21:10:13 -0700
Subject: [PATCH 05/11] libavcodec: v4l2m2m: set format_modifier to
Subject: [PATCH 3/9] libavcodec: v4l2m2m: set format_modifier to
DRM_FORMAT_MOD_LINEAR
---
@@ -583,7 +468,7 @@ Subject: [PATCH 05/11] libavcodec: v4l2m2m: set format_modifier to
1 file changed, 2 insertions(+)
diff --git a/libavcodec/v4l2_buffers.c b/libavcodec/v4l2_buffers.c
index c36a73d1fa..072b77bbda 100644
index bebe2c1796..12037d5d66 100644
--- a/libavcodec/v4l2_buffers.c
+++ b/libavcodec/v4l2_buffers.c
@@ -328,10 +328,12 @@ static int v4l2_buffer_export_drm(V4L2Buffer* avbuf)
@@ -600,10 +485,10 @@ index c36a73d1fa..072b77bbda 100644
}
From e8df5a982f705aaba1e03aef653169bc17a0d464 Mon Sep 17 00:00:00 2001
From e1857456c8f24e40d5c898886f2f51014e59ee9d Mon Sep 17 00:00:00 2001
From: Lukas Rusak <lorusak@gmail.com>
Date: Thu, 16 Aug 2018 21:10:53 -0700
Subject: [PATCH 06/11] libavcodec: v4l2m2m: only mmap the buffer when it is
Subject: [PATCH 4/9] libavcodec: v4l2m2m: only mmap the buffer when it is
output type and drm prime is used
---
@@ -611,7 +496,7 @@ Subject: [PATCH 06/11] libavcodec: v4l2m2m: only mmap the buffer when it is
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/libavcodec/v4l2_buffers.c b/libavcodec/v4l2_buffers.c
index 072b77bbda..8162531973 100644
index 12037d5d66..1adf518ab9 100644
--- a/libavcodec/v4l2_buffers.c
+++ b/libavcodec/v4l2_buffers.c
@@ -662,14 +662,22 @@ int ff_v4l2_buffer_initialize(V4L2Buffer* avbuf, int index)
@@ -644,20 +529,20 @@ index 072b77bbda..8162531973 100644
if (avbuf->plane_info[i].mm_addr == MAP_FAILED)
From 4fb7664bb6be542b691323a03050cdd024585afc Mon Sep 17 00:00:00 2001
From c8fc3ea1b5777546f7ec72a54b053a2d4fa9fd59 Mon Sep 17 00:00:00 2001
From: Lukas Rusak <lorusak@gmail.com>
Date: Thu, 16 Aug 2018 21:11:38 -0700
Subject: [PATCH 07/11] libavcodec: v4l2m2m: allow using software pixel formats
Subject: [PATCH 5/9] libavcodec: v4l2m2m: allow using software pixel formats
---
libavcodec/v4l2_m2m_dec.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/libavcodec/v4l2_m2m_dec.c b/libavcodec/v4l2_m2m_dec.c
index eb6ecc8ed5..3b2449ae6c 100644
index 6bc7442702..4b9baf833c 100644
--- a/libavcodec/v4l2_m2m_dec.c
+++ b/libavcodec/v4l2_m2m_dec.c
@@ -219,8 +219,16 @@ static av_cold int v4l2_decode_init(AVCodecContext *avctx)
@@ -213,8 +213,16 @@ static av_cold int v4l2_decode_init(AVCodecContext *avctx)
* - the DRM frame format is passed in the DRM frame descriptor layer.
* check the v4l2_get_drm_frame function.
*/
@@ -675,7 +560,7 @@ index eb6ecc8ed5..3b2449ae6c 100644
s->avctx = avctx;
ret = ff_v4l2_m2m_codec_init(priv);
@@ -276,6 +284,7 @@ static const AVCodecHWConfigInternal *v4l2_m2m_hw_configs[] = {
@@ -270,6 +278,7 @@ static const AVCodecHWConfigInternal *v4l2_m2m_hw_configs[] = {
.capabilities = AV_CODEC_CAP_HARDWARE | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING, \
.caps_internal = FF_CODEC_CAP_SETS_PKT_DTS | FF_CODEC_CAP_INIT_CLEANUP, \
.pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_DRM_PRIME, \
@@ -684,10 +569,10 @@ index eb6ecc8ed5..3b2449ae6c 100644
.hw_configs = v4l2_m2m_hw_configs, \
.wrapper_name = "v4l2m2m", \
From 27ae887df07992385b1afc9b532f978066e83774 Mon Sep 17 00:00:00 2001
From 13f02e940f083f19dbe8b9ac8fc7df45700dd36e Mon Sep 17 00:00:00 2001
From: Lukas Rusak <lorusak@gmail.com>
Date: Mon, 24 Sep 2018 13:39:31 -0700
Subject: [PATCH 08/11] libavcodec: v4l2m2m: implement hwcontext
Subject: [PATCH 6/9] libavcodec: v4l2m2m: implement hwcontext
---
libavcodec/v4l2_buffers.c | 22 ++++++++++++++++++++++
@@ -697,7 +582,7 @@ Subject: [PATCH 08/11] libavcodec: v4l2m2m: implement hwcontext
4 files changed, 37 insertions(+)
diff --git a/libavcodec/v4l2_buffers.c b/libavcodec/v4l2_buffers.c
index 8162531973..9c5d471c9b 100644
index 1adf518ab9..6e2a544394 100644
--- a/libavcodec/v4l2_buffers.c
+++ b/libavcodec/v4l2_buffers.c
@@ -435,6 +435,7 @@ static int v4l2_buffer_buf_to_swframe(AVFrame *frame, V4L2Buffer *avbuf)
@@ -750,10 +635,10 @@ index 22a9532444..e804e94131 100644
/**
diff --git a/libavcodec/v4l2_m2m.h b/libavcodec/v4l2_m2m.h
index 4ee0be653b..61cb919771 100644
index 0fbd19a013..adf5997bb5 100644
--- a/libavcodec/v4l2_m2m.h
+++ b/libavcodec/v4l2_m2m.h
@@ -64,6 +64,8 @@ typedef struct V4L2m2mContext {
@@ -67,6 +67,8 @@ typedef struct V4L2m2mContext {
/* reference back to V4L2m2mPriv */
void *priv;
@@ -763,7 +648,7 @@ index 4ee0be653b..61cb919771 100644
int output_drm;
} V4L2m2mContext;
diff --git a/libavcodec/v4l2_m2m_dec.c b/libavcodec/v4l2_m2m_dec.c
index 3b2449ae6c..c6b865fde8 100644
index 4b9baf833c..6c23693137 100644
--- a/libavcodec/v4l2_m2m_dec.c
+++ b/libavcodec/v4l2_m2m_dec.c
@@ -35,6 +35,7 @@
@@ -774,7 +659,7 @@ index 3b2449ae6c..c6b865fde8 100644
#include "v4l2_context.h"
#include "v4l2_m2m.h"
@@ -230,6 +231,16 @@ static av_cold int v4l2_decode_init(AVCodecContext *avctx)
@@ -224,6 +225,16 @@ static av_cold int v4l2_decode_init(AVCodecContext *avctx)
break;
}
@@ -792,10 +677,10 @@ index 3b2449ae6c..c6b865fde8 100644
ret = ff_v4l2_m2m_codec_init(priv);
if (ret) {
From aee464209ec6ad060d352dfb638344a1f4db3ce4 Mon Sep 17 00:00:00 2001
From 34be198b8039c9df434792f19f0985e45419407e Mon Sep 17 00:00:00 2001
From: Lukas Rusak <lorusak@gmail.com>
Date: Mon, 4 May 2020 13:01:29 -0700
Subject: [PATCH 09/11] libavcodec: v4l2m2m: allow lower minimum buffer values
Subject: [PATCH 7/9] libavcodec: v4l2m2m: allow lower minimum buffer values
There is no reason to enforce a high minimum. In the context
of streaming only a few output buffers and capture buffers
@@ -807,7 +692,7 @@ alleviate memory pressure when decoding 4K media.
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/v4l2_m2m.h b/libavcodec/v4l2_m2m.h
index 61cb919771..feeb162812 100644
index adf5997bb5..1082b9dad2 100644
--- a/libavcodec/v4l2_m2m.h
+++ b/libavcodec/v4l2_m2m.h
@@ -38,7 +38,7 @@
@@ -820,10 +705,10 @@ index 61cb919771..feeb162812 100644
typedef struct V4L2m2mContext {
char devname[PATH_MAX];
diff --git a/libavcodec/v4l2_m2m_dec.c b/libavcodec/v4l2_m2m_dec.c
index c6b865fde8..b9725be377 100644
index 6c23693137..e323c37052 100644
--- a/libavcodec/v4l2_m2m_dec.c
+++ b/libavcodec/v4l2_m2m_dec.c
@@ -262,7 +262,7 @@ static av_cold int v4l2_decode_close(AVCodecContext *avctx)
@@ -256,7 +256,7 @@ static av_cold int v4l2_decode_close(AVCodecContext *avctx)
static const AVOption options[] = {
V4L_M2M_DEFAULT_OPTS,
{ "num_capture_buffers", "Number of buffers in the capture context",
@@ -833,10 +718,10 @@ index c6b865fde8..b9725be377 100644
};
From ffc4419f456c00ab71cf93f792b0473c6de14e64 Mon Sep 17 00:00:00 2001
From 2956fd1881d28abf6bf77bd9a57866c4ba81d199 Mon Sep 17 00:00:00 2001
From: Lukas Rusak <lorusak@gmail.com>
Date: Wed, 6 May 2020 11:12:58 -0700
Subject: [PATCH 10/11] libavcodec: v4l2m2m: add option to specify pixel format
Subject: [PATCH 8/9] libavcodec: v4l2m2m: add option to specify pixel format
used by the decoder
---
@@ -846,7 +731,7 @@ Subject: [PATCH 10/11] libavcodec: v4l2m2m: add option to specify pixel format
3 files changed, 12 insertions(+)
diff --git a/libavcodec/v4l2_context.c b/libavcodec/v4l2_context.c
index 7a92df2c3e..fa2deae888 100644
index e9e8c27a54..a97b70e836 100644
--- a/libavcodec/v4l2_context.c
+++ b/libavcodec/v4l2_context.c
@@ -531,6 +531,8 @@ static inline int v4l2_try_raw_format(V4L2Context* ctx, enum AVPixelFormat pixfm
@@ -873,7 +758,7 @@ index 7a92df2c3e..fa2deae888 100644
ret = v4l2_try_raw_format(ctx, pixfmt);
if (ret){
diff --git a/libavcodec/v4l2_m2m.h b/libavcodec/v4l2_m2m.h
index feeb162812..0e88bf9329 100644
index 1082b9dad2..943a8923c4 100644
--- a/libavcodec/v4l2_m2m.h
+++ b/libavcodec/v4l2_m2m.h
@@ -30,6 +30,7 @@
@@ -884,7 +769,7 @@ index feeb162812..0e88bf9329 100644
#include "v4l2_context.h"
#define container_of(ptr, type, member) ({ \
@@ -78,6 +79,7 @@ typedef struct V4L2m2mPriv {
@@ -81,6 +82,7 @@ typedef struct V4L2m2mPriv {
int num_output_buffers;
int num_capture_buffers;
@@ -893,10 +778,10 @@ index feeb162812..0e88bf9329 100644
/**
diff --git a/libavcodec/v4l2_m2m_dec.c b/libavcodec/v4l2_m2m_dec.c
index b9725be377..6109deee8a 100644
index e323c37052..363e998142 100644
--- a/libavcodec/v4l2_m2m_dec.c
+++ b/libavcodec/v4l2_m2m_dec.c
@@ -263,6 +263,7 @@ static const AVOption options[] = {
@@ -257,6 +257,7 @@ static const AVOption options[] = {
V4L_M2M_DEFAULT_OPTS,
{ "num_capture_buffers", "Number of buffers in the capture context",
OFFSET(num_capture_buffers), AV_OPT_TYPE_INT, {.i64 = 20}, 2, INT_MAX, FLAGS },
@@ -905,20 +790,20 @@ index b9725be377..6109deee8a 100644
};
From 8595d06d4909bbec0aa14625fcfc869c6bcef696 Mon Sep 17 00:00:00 2001
From 2bb6d0cb244590f0c70dd111ed978cd87fa3bee1 Mon Sep 17 00:00:00 2001
From: Lukas Rusak <lorusak@gmail.com>
Date: Mon, 24 Sep 2018 13:39:56 -0700
Subject: [PATCH 11/11] libavcodec: v4l2m2m: implement flush
Subject: [PATCH 9/9] libavcodec: v4l2m2m: implement flush
---
libavcodec/v4l2_m2m_dec.c | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/libavcodec/v4l2_m2m_dec.c b/libavcodec/v4l2_m2m_dec.c
index 6109deee8a..820cdf241f 100644
index 363e998142..52ec67cb59 100644
--- a/libavcodec/v4l2_m2m_dec.c
+++ b/libavcodec/v4l2_m2m_dec.c
@@ -256,6 +256,41 @@ static av_cold int v4l2_decode_close(AVCodecContext *avctx)
@@ -250,6 +250,41 @@ static av_cold int v4l2_decode_close(AVCodecContext *avctx)
return ff_v4l2_m2m_codec_end(avctx->priv_data);
}
@@ -960,7 +845,7 @@ index 6109deee8a..820cdf241f 100644
#define OFFSET(x) offsetof(V4L2m2mPriv, x)
#define FLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM
@@ -292,6 +327,7 @@ static const AVCodecHWConfigInternal *v4l2_m2m_hw_configs[] = {
@@ -286,6 +321,7 @@ static const AVCodecHWConfigInternal *v4l2_m2m_hw_configs[] = {
.init = v4l2_decode_init, \
.receive_frame = v4l2_receive_frame, \
.close = v4l2_decode_close, \

View File

@@ -152,8 +152,8 @@ index 2b334c95d47a..1e5624e7af50 100644
+ const AVFilter* outFilter = avfilter_get_by_name("buffersink");
+ enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_DRM_PRIME, AV_PIX_FMT_NONE };
+
+ std::string args = StringUtils::Format("video_size=%dx%d:pix_fmt=%d:time_base=%d/%d:"
+ "pixel_aspect=%d/%d:sws_param=flags=2",
+ std::string args = StringUtils::Format("video_size={}x{}:pix_fmt={}:time_base={}/{}:"
+ "pixel_aspect={}/{}",
+ m_pCodecContext->width,
+ m_pCodecContext->height,
+ m_pCodecContext->pix_fmt,
@@ -273,7 +273,7 @@ index 2b334c95d47a..1e5624e7af50 100644
+ char* graphDump = avfilter_graph_dump(m_pFilterGraph, nullptr);
+ if (graphDump)
+ {
+ CLog::Log(LOGDEBUG, "CDVDVideoCodecDRMPRIME::FilterOpen - Final filter graph:\n%s",
+ CLog::Log(LOGDEBUG, "CDVDVideoCodecDRMPRIME::FilterOpen - Final filter graph:\n{}",
+ graphDump);
+ av_freep(&graphDump);
+ }

View File

@@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From 58f2acdc63d85eb9818d783a9a858b1ecc267fa7 Mon Sep 17 00:00:00 2001
From: Jernej Skrabec <jernej.skrabec@siol.net>
Date: Thu, 26 Dec 2019 11:01:51 +0100
Subject: [PATCH] WIP: DRMPRIME deinterlace filter
Subject: [PATCH 2/2] WIP: DRMPRIME deinterlace filter
---
.../DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp | 368 +++++++++++++++---
@@ -9,7 +9,7 @@ Subject: [PATCH] WIP: DRMPRIME deinterlace filter
2 files changed, 322 insertions(+), 55 deletions(-)
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
index 7507c12e9a..4759dde3f9 100644
index 2b334c95d47a..1e5624e7af50 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
@@ -79,12 +79,15 @@ CDVDVideoCodecDRMPRIME::CDVDVideoCodecDRMPRIME(CProcessInfo& processInfo)
@@ -28,7 +28,7 @@ index 7507c12e9a..4759dde3f9 100644
avcodec_free_context(&m_pCodecContext);
}
@@ -341,8 +344,19 @@ bool CDVDVideoCodecDRMPRIME::Open(CDVDStreamInfo& hints, CDVDCodecOptions& optio
@@ -330,8 +333,19 @@ bool CDVDVideoCodecDRMPRIME::Open(CDVDStreamInfo& hints, CDVDCodecOptions& optio
}
UpdateProcessInfo(m_pCodecContext, m_pCodecContext->pix_fmt);
@@ -49,7 +49,7 @@ index 7507c12e9a..4759dde3f9 100644
return true;
}
@@ -405,6 +419,8 @@ void CDVDVideoCodecDRMPRIME::Reset()
@@ -394,6 +408,8 @@ void CDVDVideoCodecDRMPRIME::Reset()
return;
Drain();
@@ -58,7 +58,7 @@ index 7507c12e9a..4759dde3f9 100644
do
{
@@ -443,7 +459,7 @@ void CDVDVideoCodecDRMPRIME::Drain()
@@ -432,7 +448,7 @@ void CDVDVideoCodecDRMPRIME::Drain()
}
}
@@ -67,7 +67,7 @@ index 7507c12e9a..4759dde3f9 100644
{
pVideoPicture->iWidth = m_pFrame->width;
pVideoPicture->iHeight = m_pFrame->height;
@@ -525,13 +541,232 @@ void CDVDVideoCodecDRMPRIME::SetPictureParams(VideoPicture* pVideoPicture)
@@ -514,13 +530,232 @@ void CDVDVideoCodecDRMPRIME::SetPictureParams(VideoPicture* pVideoPicture)
? DVD_NOPTS_VALUE
: static_cast<double>(pts) * DVD_TIME_BASE / AV_TIME_BASE;
pVideoPicture->dts = DVD_NOPTS_VALUE;
@@ -101,9 +101,8 @@ index 7507c12e9a..4759dde3f9 100644
+ }
+
+ return true;
}
-CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterIn()
+}
+
+void CDVDVideoCodecDRMPRIME::FilterTest()
+{
+ const AVFilter* filter;
@@ -153,8 +152,8 @@ index 7507c12e9a..4759dde3f9 100644
+ const AVFilter* outFilter = avfilter_get_by_name("buffersink");
+ enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_DRM_PRIME, AV_PIX_FMT_NONE };
+
+ std::string args = StringUtils::Format("video_size=%dx%d:pix_fmt=%d:time_base=%d/%d:"
+ "pixel_aspect=%d/%d:sws_param=flags=2",
+ std::string args = StringUtils::Format("video_size={}x{}:pix_fmt={}:time_base={}/{}:"
+ "pixel_aspect={}/{}",
+ m_pCodecContext->width,
+ m_pCodecContext->height,
+ m_pCodecContext->pix_fmt,
@@ -249,7 +248,7 @@ index 7507c12e9a..4759dde3f9 100644
+ {
+ char err[AV_ERROR_MAX_STRING_SIZE] = {};
+ av_strerror(result, err, AV_ERROR_MAX_STRING_SIZE);
+ CLog::Log(LOGDEBUG, "CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_config: {} ({})",
+ CLog::Log(LOGERROR, "CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_config: {} ({})",
+ err, result);
+ return false;
+ }
@@ -274,7 +273,7 @@ index 7507c12e9a..4759dde3f9 100644
+ char* graphDump = avfilter_graph_dump(m_pFilterGraph, nullptr);
+ if (graphDump)
+ {
+ CLog::Log(LOGDEBUG, "CDVDVideoCodecDRMPRIME::FilterOpen - Final filter graph:\n%s",
+ CLog::Log(LOGDEBUG, "CDVDVideoCodecDRMPRIME::FilterOpen - Final filter graph:\n{}",
+ graphDump);
+ av_freep(&graphDump);
+ }
@@ -284,9 +283,7 @@ index 7507c12e9a..4759dde3f9 100644
+}
+
+void CDVDVideoCodecDRMPRIME::FilterClose()
{
- if (!m_pFilterIn)
- return VC_PICTURE;
+{
+ if (m_pFilterGraph)
+ {
+ CLog::Log(LOGDEBUG, LOGVIDEO, "CDVDVideoCodecDRMPRIME::FilterClose - Freeing filter graph");
@@ -296,14 +293,17 @@ index 7507c12e9a..4759dde3f9 100644
+ m_pFilterIn = nullptr;
+ m_pFilterOut = nullptr;
+ }
+}
}
+CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterIn()
+{
CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterIn()
{
- if (!m_pFilterIn)
- return VC_PICTURE;
-
int ret = av_buffersrc_add_frame(m_pFilterIn, m_pFrame);
if (ret < 0)
{
@@ -547,21 +782,14 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterIn()
@@ -536,21 +771,14 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterIn()
CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterOut()
{
@@ -329,7 +329,7 @@ index 7507c12e9a..4759dde3f9 100644
}
else if (ret)
{
@@ -572,9 +800,27 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterOut()
@@ -561,9 +789,27 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterOut()
return VC_ERROR;
}
@@ -357,7 +357,7 @@ index 7507c12e9a..4759dde3f9 100644
CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::GetPicture(VideoPicture* pVideoPicture)
{
if (m_codecControlFlags & DVD_CODEC_CTRL_DRAIN)
@@ -586,57 +832,71 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::GetPicture(VideoPicture* pVideo
@@ -575,57 +821,71 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::GetPicture(VideoPicture* pVideo
pVideoPicture->videoBuffer = nullptr;
}
@@ -468,7 +468,7 @@ index 7507c12e9a..4759dde3f9 100644
return VC_PICTURE;
}
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h
index 7112d1b48a..13bec95135 100644
index 7112d1b48afb..13bec9513579 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.h
@@ -38,18 +38,25 @@ public:
@@ -498,3 +498,6 @@ index 7112d1b48a..13bec95135 100644
AVFilterGraph* m_pFilterGraph = nullptr;
AVFilterContext* m_pFilterIn = nullptr;
AVFilterContext* m_pFilterOut = nullptr;
--
2.29.2

View File

@@ -2,7 +2,7 @@
# base ffmpeg version
KODI_FFMPEG_REPO="https://github.com/xbmc/FFmpeg"
KODI_FFMPEG_VERSION="4.3.2-Matrix-19.1"
KODI_FFMPEG_VERSION="4.4-N-Alpha1"
ALL_FEATURE_SETS="v4l2-drmprime v4l2-request libreelec rpi"
@@ -24,20 +24,20 @@ create_patch() {
REFTYPE="branch"
case "${FEATURE_SET}" in
v4l2-drmprime)
REPO="https://github.com/lrusak/FFmpeg"
REFSPEC="v4l2-drmprime-v5"
REPO="https://github.com/jernejsk/FFmpeg"
REFSPEC="v4l2-drmprime-v6"
;;
v4l2-request)
REPO="https://github.com/jernejsk/FFmpeg"
REFSPEC="v4l2-request-hwaccel-4.3.1"
REFSPEC="v4l2-request-hwaccel-4.4"
;;
libreelec)
REPO="https://github.com/LibreELEC/FFmpeg"
REFSPEC="4.3-libreelec-misc"
REFSPEC="4.4-libreelec-misc"
;;
rpi)
REPO="https://github.com/jc-kynesim/rpi-ffmpeg"
REFSPEC="test/4.3.2/rpi_main"
REFSPEC="dev/4.4/rpi_import_1"
;;
*)
echo "illegal feature set ${FEATURE_SET}"