1
0
mirror of https://github.com/dguglielmi/sunny-overlay.git synced 2025-12-06 16:02:39 +01:00

media-tv/kodi: rework ffmpeg handling (Thanks Gino McCarty)

This commit is contained in:
2023-09-26 21:29:40 +02:00
parent a880217175
commit 19084ce300
7 changed files with 72 additions and 418 deletions

View File

@@ -1,36 +0,0 @@
From 351184d7e4e3edc447d04a297769eb41a477ba68 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Markus=20H=C3=A4rer?= <markus.haerer@gmx.net>
Date: Sun, 28 May 2023 00:49:40 +0200
Subject: [PATCH] SavestateFlatBuffer: Remove forward declararion of
FlatBufferBuilder
This caused a compiler error with recent faltbuffers because the type changed:
In file included from xbmc/cores/RetroPlayer/savestates/SavestateDatabase.cpp:12:
xbmc/cores/RetroPlayer/savestates/SavestateFlatBuffer.h:19:7: error: definition of type 'FlatBufferBuilder' conflicts with type alias of the same name
class FlatBufferBuilder;
^
/usr/include/flatbuffers/flatbuffer_builder.h:1414:7: note: 'FlatBufferBuilder' declared here
using FlatBufferBuilder = FlatBufferBuilderImpl<false>;
^
1 error generated.
---
xbmc/cores/RetroPlayer/savestates/SavestateFlatBuffer.h | 5 -----
1 file changed, 5 deletions(-)
diff --git a/xbmc/cores/RetroPlayer/savestates/SavestateFlatBuffer.h b/xbmc/cores/RetroPlayer/savestates/SavestateFlatBuffer.h
index cb93e6bbc2e12..fa42a9bad7034 100644
--- a/xbmc/cores/RetroPlayer/savestates/SavestateFlatBuffer.h
+++ b/xbmc/cores/RetroPlayer/savestates/SavestateFlatBuffer.h
@@ -14,11 +14,6 @@
#include <flatbuffers/flatbuffers.h>
-namespace flatbuffers
-{
-class FlatBufferBuilder;
-}
-
namespace KODI
{
namespace RETRO

View File

@@ -0,0 +1,58 @@
From 8a29849250a13d93e27f1b39c64593c26503173b Mon Sep 17 00:00:00 2001
From: enen92 <92enen@gmail.com>
Date: Mon, 17 Jul 2023 00:08:42 +0100
Subject: [PATCH] [discs] Fix playback of optical dvds without mount support
Co-authored-by: Don Mahurin <@>
---
xbmc/Autorun.cpp | 11 ++++++++++-
xbmc/cores/VideoPlayer/VideoPlayer.cpp | 11 ++++++++---
2 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/xbmc/Autorun.cpp b/xbmc/Autorun.cpp
index 87a77857e8563..b7aac6855ed92 100644
--- a/xbmc/Autorun.cpp
+++ b/xbmc/Autorun.cpp
@@ -148,7 +148,16 @@ bool CAutorun::RunDisc(IDirectory* pDir, const std::string& strDrive, int& nAdde
bool bPlaying(false);
CFileItemList vecItems;
- const CURL pathToUrl(strDrive);
+ CURL pathToUrl{strDrive};
+ // if the url being requested is a generic "iso9660://" we need to expand it with the current drive device.
+ // use the hostname section to prepend the drive path
+ if (pathToUrl.GetRedacted() == "iso9660://")
+ {
+ pathToUrl.Reset();
+ pathToUrl.SetProtocol("iso9660");
+ pathToUrl.SetHostName(CServiceBroker::GetMediaManager().TranslateDevicePath(""));
+ }
+
if ( !pDir->GetDirectory( pathToUrl, vecItems ) )
{
return false;
diff --git a/xbmc/cores/VideoPlayer/VideoPlayer.cpp b/xbmc/cores/VideoPlayer/VideoPlayer.cpp
index 3b3f876eebe75..7de70724e11b8 100644
--- a/xbmc/cores/VideoPlayer/VideoPlayer.cpp
+++ b/xbmc/cores/VideoPlayer/VideoPlayer.cpp
@@ -767,12 +767,17 @@ bool CVideoPlayer::OpenInputStream()
CLog::Log(LOGINFO, "Creating InputStream");
// correct the filename if needed
- std::string filename(m_item.GetPath());
- if (URIUtils::IsProtocol(filename, "dvd") ||
- StringUtils::EqualsNoCase(filename, "iso9660://video_ts/video_ts.ifo"))
+ const CURL url{m_item.GetPath()};
+ if (url.GetProtocol() == "dvd")
{
+ // FIXME: we should deprecate this when more than one device drive is supported
m_item.SetPath(CServiceBroker::GetMediaManager().TranslateDevicePath(""));
}
+ else if (url.GetProtocol() == "iso9660" && !url.GetHostName().empty() &&
+ url.GetFileName() == "VIDEO_TS/video_ts.ifo")
+ {
+ m_item.SetPath(url.GetHostName());
+ }
m_pInputStream = CDVDFactoryInputStream::CreateInputStream(this, m_item, true);
if (m_pInputStream == nullptr)