RPi: rebase kodi patches

Signed-off-by: Matthias Reichl <hias@horus.com>
This commit is contained in:
Matthias Reichl 2023-05-10 13:21:31 +02:00
parent f6e32433ec
commit 153d6eccbb
6 changed files with 52 additions and 139 deletions

View File

@ -1,14 +1,14 @@
From 42b30508bfe5451d4dc2884acfde9e0ec2d58c92 Mon Sep 17 00:00:00 2001 From e181af5b2b97b3fbc69b9ad7318a3c02f6186ca5 Mon Sep 17 00:00:00 2001
From: Dom Cobley <popcornmix@gmail.com> From: Dom Cobley <popcornmix@gmail.com>
Date: Fri, 3 Dec 2021 16:00:50 +0000 Date: Fri, 3 Dec 2021 16:00:50 +0000
Subject: [PATCH 2/4] gbm: Set max bpc for high bit depth videos Subject: [PATCH 1/5] gbm: Set max bpc for high bit depth videos
--- ---
.../HwDecRender/VideoLayerBridgeDRMPRIME.cpp | 16 ++++++++++++++++ .../HwDecRender/VideoLayerBridgeDRMPRIME.cpp | 15 +++++++++++++++
1 file changed, 16 insertions(+) 1 file changed, 15 insertions(+)
diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VideoLayerBridgeDRMPRIME.cpp b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VideoLayerBridgeDRMPRIME.cpp diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VideoLayerBridgeDRMPRIME.cpp b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VideoLayerBridgeDRMPRIME.cpp
index 4b8ee5afbb..bd6623e8d1 100644 index 233e6310bb..9b36758c00 100644
--- a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VideoLayerBridgeDRMPRIME.cpp --- a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VideoLayerBridgeDRMPRIME.cpp
+++ b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VideoLayerBridgeDRMPRIME.cpp +++ b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VideoLayerBridgeDRMPRIME.cpp
@@ -34,6 +34,14 @@ void CVideoLayerBridgeDRMPRIME::Disable() @@ -34,6 +34,14 @@ void CVideoLayerBridgeDRMPRIME::Disable()
@ -26,21 +26,20 @@ index 4b8ee5afbb..bd6623e8d1 100644
m_DRM->AddProperty(plane, "FB_ID", 0); m_DRM->AddProperty(plane, "FB_ID", 0);
m_DRM->AddProperty(plane, "CRTC_ID", 0); m_DRM->AddProperty(plane, "CRTC_ID", 0);
@@ -175,6 +183,14 @@ void CVideoLayerBridgeDRMPRIME::Configure(CVideoBufferDRMPRIME* buffer) @@ -175,6 +183,13 @@ void CVideoLayerBridgeDRMPRIME::Configure(CVideoBufferDRMPRIME* buffer)
std::tie(result, value) = plane->GetPropertyValue("COLOR_RANGE", GetColorRange(picture)); plane->GetPropertyValue("COLOR_RANGE", GetColorRange(picture));
if (result) if (colorRange)
m_DRM->AddProperty(plane, "COLOR_RANGE", value); m_DRM->AddProperty(plane, "COLOR_RANGE", colorRange.value());
+ +
+ // set max bpc to allow the drm driver to choose a deep colour mode + // set max bpc to allow the drm driver to choose a deep colour mode
+ int bpc = buffer->GetPicture().colorBits > 8 ? 12 : 8; + int bpc = buffer->GetPicture().colorBits > 8 ? 12 : 8;
+ auto connector = m_DRM->GetConnector(); + auto connector = m_DRM->GetConnector();
+ result = m_DRM->AddProperty(connector, "max bpc", bpc); + bool result = m_DRM->AddProperty(connector, "max bpc", bpc);
+ CLog::Log(LOGDEBUG, "CVideoLayerBridgeDRMPRIME::{} - setting max bpc to {} ({})", __FUNCTION__, + CLog::Log(LOGDEBUG, "CVideoLayerBridgeDRMPRIME::{} - setting max bpc to {} ({})", __FUNCTION__,
+ bpc, result); + bpc, result);
+
} }
void CVideoLayerBridgeDRMPRIME::SetVideoPlane(CVideoBufferDRMPRIME* buffer, const CRect& destRect) void CVideoLayerBridgeDRMPRIME::SetVideoPlane(CVideoBufferDRMPRIME* buffer, const CRect& destRect)
-- --
2.39.0 2.39.2

View File

@ -1,7 +1,7 @@
From 97d39a46091b65e4355ce7e545bdec46ff2f87de Mon Sep 17 00:00:00 2001 From 05fbbc78734827304edd3eb10de0a0117d10a8b9 Mon Sep 17 00:00:00 2001
From: popcornmix <popcornmix@gmail.com> From: popcornmix <popcornmix@gmail.com>
Date: Sat, 11 Sep 2021 14:03:05 +0100 Date: Sat, 11 Sep 2021 14:03:05 +0100
Subject: [PATCH 1/4] CDVDVideoCodecDRMPRIME: Also support YUV420 buffers Subject: [PATCH 2/5] CDVDVideoCodecDRMPRIME: Also support YUV420 buffers
CDVDVideoCodecDRMPRIME: Add support for deinterlace of sw decoded buffers CDVDVideoCodecDRMPRIME: Add support for deinterlace of sw decoded buffers
@ -11,10 +11,10 @@ Need to call SetDimensions earlier and store the drm descriptor in expected plac
1 file changed, 12 insertions(+), 2 deletions(-) 1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
index 20a5c24f53..a36107c515 100644 index b221cdaf75..c0efa91770 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp --- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp +++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
@@ -582,7 +582,7 @@ bool CDVDVideoCodecDRMPRIME::SetPictureParams(VideoPicture* pVideoPicture) @@ -619,7 +619,7 @@ bool CDVDVideoCodecDRMPRIME::SetPictureParams(VideoPicture* pVideoPicture)
pVideoPicture->videoBuffer = nullptr; pVideoPicture->videoBuffer = nullptr;
} }
@ -23,7 +23,7 @@ index 20a5c24f53..a36107c515 100644
{ {
CVideoBufferDRMPRIMEFFmpeg* buffer = CVideoBufferDRMPRIMEFFmpeg* buffer =
dynamic_cast<CVideoBufferDRMPRIMEFFmpeg*>(m_videoBufferPool->Get()); dynamic_cast<CVideoBufferDRMPRIMEFFmpeg*>(m_videoBufferPool->Get());
@@ -660,7 +660,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test) @@ -697,7 +697,7 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
const AVFilter* srcFilter = avfilter_get_by_name("buffer"); const AVFilter* srcFilter = avfilter_get_by_name("buffer");
const AVFilter* outFilter = avfilter_get_by_name("buffersink"); const AVFilter* outFilter = avfilter_get_by_name("buffersink");
@ -32,7 +32,7 @@ index 20a5c24f53..a36107c515 100644
std::string args = StringUtils::Format("video_size={}x{}:pix_fmt={}:time_base={}/{}:" std::string args = StringUtils::Format("video_size={}x{}:pix_fmt={}:time_base={}/{}:"
"pixel_aspect={}/{}", "pixel_aspect={}/{}",
@@ -808,6 +808,16 @@ void CDVDVideoCodecDRMPRIME::FilterClose() @@ -845,6 +845,16 @@ void CDVDVideoCodecDRMPRIME::FilterClose()
CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterIn() CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterIn()
{ {
@ -50,5 +50,5 @@ index 20a5c24f53..a36107c515 100644
if (ret < 0) if (ret < 0)
{ {
-- --
2.39.0 2.39.2

View File

@ -1,7 +1,7 @@
From 518d8487d090af854fb72a7d0e5efc075d97228c Mon Sep 17 00:00:00 2001 From 8fbcf5fada25720b5c6f66959d5ee1c28cff04f9 Mon Sep 17 00:00:00 2001
From: Dom Cobley <popcornmix@gmail.com> From: Dom Cobley <popcornmix@gmail.com>
Date: Wed, 18 Jan 2023 16:41:00 +0000 Date: Wed, 18 Jan 2023 16:41:00 +0000
Subject: [PATCH 4/4] CDVDVideoCodecDRMPRIME: Adjust av formats to match recent Subject: [PATCH 3/5] CDVDVideoCodecDRMPRIME: Adjust av formats to match recent
ffmpeg changes ffmpeg changes
--- ---
@ -9,10 +9,10 @@ Subject: [PATCH 4/4] CDVDVideoCodecDRMPRIME: Adjust av formats to match recent
1 file changed, 4 insertions(+), 2 deletions(-) 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
index a36107c515..d5b3289680 100644 index c0efa91770..29d38a3ec0 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp --- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp +++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
@@ -319,6 +319,7 @@ bool CDVDVideoCodecDRMPRIME::Open(CDVDStreamInfo& hints, CDVDCodecOptions& optio @@ -355,6 +355,7 @@ bool CDVDVideoCodecDRMPRIME::Open(CDVDStreamInfo& hints, CDVDCodecOptions& optio
m_pCodecContext->bits_per_coded_sample = hints.bitsperpixel; m_pCodecContext->bits_per_coded_sample = hints.bitsperpixel;
m_pCodecContext->time_base.num = 1; m_pCodecContext->time_base.num = 1;
m_pCodecContext->time_base.den = DVD_TIME_BASE; m_pCodecContext->time_base.den = DVD_TIME_BASE;
@ -20,7 +20,7 @@ index a36107c515..d5b3289680 100644
m_pCodecContext->thread_count = CServiceBroker::GetCPUInfo()->GetCPUCount(); m_pCodecContext->thread_count = CServiceBroker::GetCPUInfo()->GetCPUCount();
if (hints.extradata && hints.extrasize > 0) if (hints.extradata && hints.extrasize > 0)
@@ -660,13 +661,13 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test) @@ -697,13 +698,13 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
const AVFilter* srcFilter = avfilter_get_by_name("buffer"); const AVFilter* srcFilter = avfilter_get_by_name("buffer");
const AVFilter* outFilter = avfilter_get_by_name("buffersink"); const AVFilter* outFilter = avfilter_get_by_name("buffersink");
@ -36,7 +36,7 @@ index a36107c515..d5b3289680 100644
m_pCodecContext->time_base.num ? m_pCodecContext->time_base.num ?
m_pCodecContext->time_base.num : 1, m_pCodecContext->time_base.num : 1,
m_pCodecContext->time_base.num ? m_pCodecContext->time_base.num ?
@@ -818,6 +819,7 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterIn() @@ -855,6 +856,7 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterIn()
m_pFrame->data[0] = reinterpret_cast<uint8_t*>(descriptor); m_pFrame->data[0] = reinterpret_cast<uint8_t*>(descriptor);
} }
@ -45,5 +45,5 @@ index a36107c515..d5b3289680 100644
if (ret < 0) if (ret < 0)
{ {
-- --
2.39.0 2.39.2

View File

@ -1,87 +0,0 @@
From 0b9b204c6560f3aff39697f92616b48102840dfe Mon Sep 17 00:00:00 2001
From: Lukas Rusak <lorusak@gmail.com>
Date: Mon, 29 Apr 2019 18:48:45 -0700
Subject: [PATCH 3/4] CVideoLayerBridgeDRMPRIME add colourspace connector
property
---
.../Buffers/VideoBufferDRMPRIME.cpp | 12 ++++++++++++
.../VideoPlayer/Buffers/VideoBufferDRMPRIME.h | 1 +
.../HwDecRender/VideoLayerBridgeDRMPRIME.cpp | 19 +++++++++++++++++++
3 files changed, 32 insertions(+)
diff --git a/xbmc/cores/VideoPlayer/Buffers/VideoBufferDRMPRIME.cpp b/xbmc/cores/VideoPlayer/Buffers/VideoBufferDRMPRIME.cpp
index b1c23ffc3d..a5fb7ddf44 100644
--- a/xbmc/cores/VideoPlayer/Buffers/VideoBufferDRMPRIME.cpp
+++ b/xbmc/cores/VideoPlayer/Buffers/VideoBufferDRMPRIME.cpp
@@ -20,6 +20,18 @@ extern "C"
namespace DRMPRIME
{
+std::string GetColorimetry(const VideoPicture& picture)
+{
+ switch (picture.color_space)
+ {
+ case AVCOL_SPC_BT2020_CL:
+ case AVCOL_SPC_BT2020_NCL:
+ return "BT2020_RGB";
+ }
+
+ return "Default";
+}
+
std::string GetColorEncoding(const VideoPicture& picture)
{
switch (picture.color_space)
diff --git a/xbmc/cores/VideoPlayer/Buffers/VideoBufferDRMPRIME.h b/xbmc/cores/VideoPlayer/Buffers/VideoBufferDRMPRIME.h
index e77f75b58b..4de9732308 100644
--- a/xbmc/cores/VideoPlayer/Buffers/VideoBufferDRMPRIME.h
+++ b/xbmc/cores/VideoPlayer/Buffers/VideoBufferDRMPRIME.h
@@ -34,6 +34,7 @@ enum hdmi_eotf
HDMI_EOTF_BT_2100_HLG,
};
+std::string GetColorimetry(const VideoPicture& picture);
std::string GetColorEncoding(const VideoPicture& picture);
std::string GetColorRange(const VideoPicture& picture);
uint8_t GetEOTF(const VideoPicture& picture);
diff --git a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VideoLayerBridgeDRMPRIME.cpp b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VideoLayerBridgeDRMPRIME.cpp
index bd6623e8d1..a1342595c6 100644
--- a/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VideoLayerBridgeDRMPRIME.cpp
+++ b/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/VideoLayerBridgeDRMPRIME.cpp
@@ -42,6 +42,16 @@ void CVideoLayerBridgeDRMPRIME::Disable()
CLog::Log(LOGDEBUG, "CVideoLayerBridgeDRMPRIME::{} - setting max bpc to {} ({})",
__FUNCTION__, bpc, result);
+ uint64_t value;
+ std::tie(result, value) = connector->GetPropertyValue("Colorspace", "Default");
+ if (result)
+ {
+ CLog::Log(LOGDEBUG, "CVideoLayerBridgeDRMPRIME::{} - setting connector colorspace to Default",
+ __FUNCTION__);
+ m_DRM->AddProperty(connector, "Colorspace", value);
+ m_DRM->SetActive(true);
+ }
+
m_DRM->AddProperty(plane, "FB_ID", 0);
m_DRM->AddProperty(plane, "CRTC_ID", 0);
@@ -191,6 +201,15 @@ void CVideoLayerBridgeDRMPRIME::Configure(CVideoBufferDRMPRIME* buffer)
CLog::Log(LOGDEBUG, "CVideoLayerBridgeDRMPRIME::{} - setting max bpc to {} ({})", __FUNCTION__,
bpc, result);
+ std::tie(result, value) = connector->GetPropertyValue("Colorspace", GetColorimetry(picture));
+ if (result)
+ {
+ CLog::Log(LOGDEBUG, "CVideoLayerBridgeDRMPRIME::{} - setting connector colorspace to {}",
+ __FUNCTION__, GetColorimetry(picture));
+ m_DRM->AddProperty(connector, "Colorspace", value);
+ m_DRM->SetActive(true);
+ }
+
}
void CVideoLayerBridgeDRMPRIME::SetVideoPlane(CVideoBufferDRMPRIME* buffer, const CRect& destRect)
--
2.39.0

View File

@ -1,8 +1,8 @@
From 4b60bcc31eddb776d0134c4f2a64ad36969bde1b Mon Sep 17 00:00:00 2001 From 56117d2874dcc36ac779609c63f1a8b0bace5366 Mon Sep 17 00:00:00 2001
From: Dom Cobley <popcornmix@gmail.com> From: Dom Cobley <popcornmix@gmail.com>
Date: Mon, 6 Feb 2023 15:19:51 +0000 Date: Mon, 6 Feb 2023 15:19:51 +0000
Subject: [PATCH] DVDVideoCodecDRMPRIME: Add support for arbitrary output pixel Subject: [PATCH 4/5] DVDVideoCodecDRMPRIME: Add support for arbitrary output
formats pixel formats
This enables any ffmpeg pixel formats to be supported by DRMPRIME decoder This enables any ffmpeg pixel formats to be supported by DRMPRIME decoder
by creating a scale ffmpeg filter to convert it to a supported format. by creating a scale ffmpeg filter to convert it to a supported format.
@ -20,10 +20,10 @@ And it happens automatically without requiring user video settings
2 files changed, 77 insertions(+), 50 deletions(-) 2 files changed, 77 insertions(+), 50 deletions(-)
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
index 347dce1ae8..e071de2e53 100644 index 29d38a3ec0..611876ba8d 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp --- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp +++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
@@ -201,7 +201,7 @@ enum AVPixelFormat CDVDVideoCodecDRMPRIME::GetFormat(struct AVCodecContext* avct @@ -219,7 +219,7 @@ enum AVPixelFormat CDVDVideoCodecDRMPRIME::GetFormat(struct AVCodecContext* avct
{ {
for (int n = 0; fmt[n] != AV_PIX_FMT_NONE; n++) for (int n = 0; fmt[n] != AV_PIX_FMT_NONE; n++)
{ {
@ -32,7 +32,7 @@ index 347dce1ae8..e071de2e53 100644
{ {
CDVDVideoCodecDRMPRIME* ctx = static_cast<CDVDVideoCodecDRMPRIME*>(avctx->opaque); CDVDVideoCodecDRMPRIME* ctx = static_cast<CDVDVideoCodecDRMPRIME*>(avctx->opaque);
ctx->UpdateProcessInfo(avctx, fmt[n]); ctx->UpdateProcessInfo(avctx, fmt[n]);
@@ -222,7 +222,8 @@ enum AVPixelFormat CDVDVideoCodecDRMPRIME::GetFormat(struct AVCodecContext* avct @@ -240,7 +240,8 @@ enum AVPixelFormat CDVDVideoCodecDRMPRIME::GetFormat(struct AVCodecContext* avct
int CDVDVideoCodecDRMPRIME::GetBuffer(struct AVCodecContext* avctx, AVFrame* frame, int flags) int CDVDVideoCodecDRMPRIME::GetBuffer(struct AVCodecContext* avctx, AVFrame* frame, int flags)
{ {
@ -42,7 +42,7 @@ index 347dce1ae8..e071de2e53 100644
{ {
int width = frame->width; int width = frame->width;
int height = frame->height; int height = frame->height;
@@ -230,7 +231,7 @@ int CDVDVideoCodecDRMPRIME::GetBuffer(struct AVCodecContext* avctx, AVFrame* fra @@ -248,7 +249,7 @@ int CDVDVideoCodecDRMPRIME::GetBuffer(struct AVCodecContext* avctx, AVFrame* fra
AlignedSize(avctx, width, height); AlignedSize(avctx, width, height);
int size; int size;
@ -51,7 +51,7 @@ index 347dce1ae8..e071de2e53 100644
{ {
case AV_PIX_FMT_YUV420P: case AV_PIX_FMT_YUV420P:
case AV_PIX_FMT_YUVJ420P: case AV_PIX_FMT_YUVJ420P:
@@ -250,13 +251,12 @@ int CDVDVideoCodecDRMPRIME::GetBuffer(struct AVCodecContext* avctx, AVFrame* fra @@ -268,13 +269,12 @@ int CDVDVideoCodecDRMPRIME::GetBuffer(struct AVCodecContext* avctx, AVFrame* fra
CDVDVideoCodecDRMPRIME* ctx = static_cast<CDVDVideoCodecDRMPRIME*>(avctx->opaque); CDVDVideoCodecDRMPRIME* ctx = static_cast<CDVDVideoCodecDRMPRIME*>(avctx->opaque);
auto buffer = dynamic_cast<CVideoBufferDMA*>( auto buffer = dynamic_cast<CVideoBufferDMA*>(
@ -67,7 +67,7 @@ index 347dce1ae8..e071de2e53 100644
buffer->Export(frame, width, height); buffer->Export(frame, width, height);
buffer->SyncStart(); buffer->SyncStart();
@@ -611,9 +611,9 @@ bool CDVDVideoCodecDRMPRIME::SetPictureParams(VideoPicture* pVideoPicture) @@ -628,9 +628,9 @@ bool CDVDVideoCodecDRMPRIME::SetPictureParams(VideoPicture* pVideoPicture)
buffer->SetRef(m_pFrame); buffer->SetRef(m_pFrame);
pVideoPicture->videoBuffer = buffer; pVideoPicture->videoBuffer = buffer;
} }
@ -79,7 +79,7 @@ index 347dce1ae8..e071de2e53 100644
buffer->SetPictureParams(*pVideoPicture); buffer->SetPictureParams(*pVideoPicture);
buffer->Acquire(); buffer->Acquire();
buffer->SyncEnd(); buffer->SyncEnd();
@@ -647,13 +647,13 @@ void CDVDVideoCodecDRMPRIME::FilterTest() @@ -664,13 +664,13 @@ void CDVDVideoCodecDRMPRIME::FilterTest()
if (name.find("deinterlace") != std::string::npos) if (name.find("deinterlace") != std::string::npos)
{ {
@ -96,7 +96,7 @@ index 347dce1ae8..e071de2e53 100644
return; return;
} }
} }
@@ -663,14 +663,31 @@ void CDVDVideoCodecDRMPRIME::FilterTest() @@ -680,14 +680,31 @@ void CDVDVideoCodecDRMPRIME::FilterTest()
__FUNCTION__); __FUNCTION__);
} }
@ -130,7 +130,7 @@ index 347dce1ae8..e071de2e53 100644
return true; return true;
if (!(m_pFilterGraph = avfilter_graph_alloc())) if (!(m_pFilterGraph = avfilter_graph_alloc()))
@@ -681,13 +698,13 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test) @@ -698,13 +715,13 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
const AVFilter* srcFilter = avfilter_get_by_name("buffer"); const AVFilter* srcFilter = avfilter_get_by_name("buffer");
const AVFilter* outFilter = avfilter_get_by_name("buffersink"); const AVFilter* outFilter = avfilter_get_by_name("buffersink");
@ -146,7 +146,7 @@ index 347dce1ae8..e071de2e53 100644
m_pCodecContext->time_base.num ? m_pCodecContext->time_base.num ?
m_pCodecContext->time_base.num : 1, m_pCodecContext->time_base.num : 1,
m_pCodecContext->time_base.num ? m_pCodecContext->time_base.num ?
@@ -706,7 +723,6 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test) @@ -723,7 +740,6 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
CLog::Log(LOGERROR, CLog::Log(LOGERROR,
"CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_create_filter: src: {} ({})", "CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_create_filter: src: {} ({})",
err, result); err, result);
@ -154,7 +154,7 @@ index 347dce1ae8..e071de2e53 100644
return false; return false;
} }
@@ -714,7 +730,6 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test) @@ -731,7 +747,6 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
if (!par) if (!par)
{ {
CLog::Log(LOGERROR, "CDVDVideoCodecDRMPRIME::FilterOpen - unable to alloc buffersrc"); CLog::Log(LOGERROR, "CDVDVideoCodecDRMPRIME::FilterOpen - unable to alloc buffersrc");
@ -162,7 +162,7 @@ index 347dce1ae8..e071de2e53 100644
return false; return false;
} }
@@ -730,7 +745,6 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test) @@ -747,7 +762,6 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
CLog::Log(LOGERROR, CLog::Log(LOGERROR,
"CDVDVideoCodecDRMPRIME::FilterOpen - av_buffersrc_parameters_set: {} ({})", "CDVDVideoCodecDRMPRIME::FilterOpen - av_buffersrc_parameters_set: {} ({})",
err, result); err, result);
@ -170,7 +170,7 @@ index 347dce1ae8..e071de2e53 100644
return false; return false;
} }
av_freep(&par); av_freep(&par);
@@ -744,7 +758,6 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test) @@ -761,7 +775,6 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
CLog::Log(LOGERROR, CLog::Log(LOGERROR,
"CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_create_filter: out: {} ({})", "CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_create_filter: out: {} ({})",
err, result); err, result);
@ -178,7 +178,7 @@ index 347dce1ae8..e071de2e53 100644
return false; return false;
} }
@@ -753,32 +766,46 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test) @@ -770,32 +783,46 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
if (result < 0) if (result < 0)
{ {
CLog::Log(LOGERROR, "CDVDVideoCodecDRMPRIME::FilterOpen - failed settings pix formats"); CLog::Log(LOGERROR, "CDVDVideoCodecDRMPRIME::FilterOpen - failed settings pix formats");
@ -243,7 +243,7 @@ index 347dce1ae8..e071de2e53 100644
} }
if ((result = avfilter_graph_config(m_pFilterGraph, nullptr)) < 0) if ((result = avfilter_graph_config(m_pFilterGraph, nullptr)) < 0)
@@ -787,15 +814,11 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test) @@ -804,15 +831,11 @@ bool CDVDVideoCodecDRMPRIME::FilterOpen(const std::string& filters, bool test)
av_strerror(result, err, AV_ERROR_MAX_STRING_SIZE); av_strerror(result, err, AV_ERROR_MAX_STRING_SIZE);
CLog::Log(LOGERROR, "CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_config: {} ({})", CLog::Log(LOGERROR, "CDVDVideoCodecDRMPRIME::FilterOpen - avfilter_graph_config: {} ({})",
err, result); err, result);
@ -259,7 +259,7 @@ index 347dce1ae8..e071de2e53 100644
m_processInfo.SetVideoDeintMethod(filters); m_processInfo.SetVideoDeintMethod(filters);
@@ -830,16 +853,16 @@ void CDVDVideoCodecDRMPRIME::FilterClose() @@ -847,16 +870,16 @@ void CDVDVideoCodecDRMPRIME::FilterClose()
CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterIn() CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::ProcessFilterIn()
{ {
// sw decoded buffers need cache flush and for descripter to be set // sw decoded buffers need cache flush and for descripter to be set
@ -279,7 +279,7 @@ index 347dce1ae8..e071de2e53 100644
int ret = av_buffersrc_add_frame(m_pFilterIn, m_pFrame); int ret = av_buffersrc_add_frame(m_pFilterIn, m_pFrame);
if (ret < 0) if (ret < 0)
{ {
@@ -932,25 +955,28 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::GetPicture(VideoPicture* pVideo @@ -949,25 +972,28 @@ CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::GetPicture(VideoPicture* pVideo
return VC_ERROR; return VC_ERROR;
} }

View File

@ -1,17 +1,18 @@
From 12b3f602eb11e348e29c61ad162734dab3f51520 Mon Sep 17 00:00:00 2001 From 85c8218d79f042c6d16b1d1ff6479743f095994e Mon Sep 17 00:00:00 2001
From: Matthias Reichl <hias@horus.com> From: Dom Cobley <popcornmix@gmail.com>
Date: Tue, 21 Mar 2023 19:53:12 +0100 Date: Fri, 14 Apr 2023 19:59:42 +0100
Subject: [PATCH] fixup DVDVideoCodecDRMPRIME av formats for latest ffmpeg Subject: [PATCH 5/5] DVDVideoCodecDRMPRIME: Remove obsolete
thread_safe_callbacks
--- ---
xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp | 1 - xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp | 1 -
1 file changed, 1 deletion(-) 1 file changed, 1 deletion(-)
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
index f9c69d6871..1030ed4aa3 100644 index 611876ba8d..f7022e1854 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp --- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp +++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
@@ -337,7 +337,6 @@ bool CDVDVideoCodecDRMPRIME::Open(CDVDStreamInfo& hints, CDVDCodecOptions& optio @@ -355,7 +355,6 @@ bool CDVDVideoCodecDRMPRIME::Open(CDVDStreamInfo& hints, CDVDCodecOptions& optio
m_pCodecContext->bits_per_coded_sample = hints.bitsperpixel; m_pCodecContext->bits_per_coded_sample = hints.bitsperpixel;
m_pCodecContext->time_base.num = 1; m_pCodecContext->time_base.num = 1;
m_pCodecContext->time_base.den = DVD_TIME_BASE; m_pCodecContext->time_base.den = DVD_TIME_BASE;