mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 21:26:49 +00:00
kodi: drop upstream patches
This commit is contained in:
parent
bb69af9ea9
commit
2443f43471
@ -1,38 +0,0 @@
|
|||||||
From f70c4d76e1d9c0219a3927b6b66090b7575e7933 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Gerald Dachs <gda@dachsweb.de>
|
|
||||||
Date: Thu, 17 Mar 2016 12:12:51 +0100
|
|
||||||
Subject: [PATCH] use system audio mode request instead of power on to start
|
|
||||||
AVR reliable
|
|
||||||
|
|
||||||
---
|
|
||||||
src/libcec/devices/CECBusDevice.cpp | 13 +++++++++----
|
|
||||||
1 file changed, 9 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/libcec/devices/CECBusDevice.cpp b/src/libcec/devices/CECBusDevice.cpp
|
|
||||||
index 55939d1..e2d5ea3 100644
|
|
||||||
--- a/src/libcec/devices/CECBusDevice.cpp
|
|
||||||
+++ b/src/libcec/devices/CECBusDevice.cpp
|
|
||||||
@@ -1025,14 +1025,19 @@ bool CCECBusDevice::ActivateSource(uint64_t iDelay /* = 0 */)
|
|
||||||
bool bReturn(true);
|
|
||||||
if (iDelay == 0)
|
|
||||||
{
|
|
||||||
- /** some AVRs fail to be powered up by the TV when it powers up. power up the AVR explicitly */
|
|
||||||
+ /** send system audio mode request if AVR exists */
|
|
||||||
if (m_iLogicalAddress != CECDEVICE_AUDIOSYSTEM)
|
|
||||||
{
|
|
||||||
CCECBusDevice* audioSystem(m_processor->GetDevice(CECDEVICE_AUDIOSYSTEM));
|
|
||||||
- if (audioSystem && audioSystem->IsPresent() && audioSystem->GetPowerStatus(m_iLogicalAddress) != CEC_POWER_STATUS_ON)
|
|
||||||
+ if (audioSystem && audioSystem->IsPresent())
|
|
||||||
{
|
|
||||||
- LIB_CEC->AddLog(CEC_LOG_DEBUG, "powering up the AVR");
|
|
||||||
- audioSystem->PowerOn(m_iLogicalAddress);
|
|
||||||
+ cec_command command;
|
|
||||||
+
|
|
||||||
+ LIB_CEC->AddLog(CEC_LOG_DEBUG, "sending system audio mode request for '%s'", ToString(m_iLogicalAddress));
|
|
||||||
+ cec_command::Format(command, m_iLogicalAddress, CECDEVICE_AUDIOSYSTEM, CEC_OPCODE_SYSTEM_AUDIO_MODE_REQUEST);
|
|
||||||
+ command.parameters.PushBack((uint8_t) ((m_iPhysicalAddress >> 8) & 0xFF));
|
|
||||||
+ command.parameters.PushBack((uint8_t) (m_iPhysicalAddress & 0xFF));
|
|
||||||
+ bReturn = m_handler->Transmit(command, false, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
|||||||
diff -Naur a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp
|
|
||||||
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp 2016-02-14 00:19:32.000000000 +0100
|
|
||||||
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp 2016-03-02 09:36:04.503330833 +0100
|
|
||||||
@@ -1601,7 +1601,7 @@
|
|
||||||
am_private->gcodec.param = (void*)(EXTERNAL_PTS | SYNC_OUTSIDE);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
- am_private->gcodec.param = (void *)((unsigned int)am_private->gcodec.param | (am_private->video_rotation_degree << 16));
|
|
||||||
+ am_private->gcodec.param = (void *)((unsigned long)am_private->gcodec.param | (am_private->video_rotation_degree << 16));
|
|
||||||
|
|
||||||
// translate from generic to firemware version dependent
|
|
||||||
m_dll->codec_init_para(&am_private->gcodec, &am_private->vcodec);
|
|
@ -1,135 +0,0 @@
|
|||||||
From ee2dc577a03d86ac61e06bc95aaff1d1eddbf593 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Garrett Brown <themagnificentmrb@gmail.com>
|
|
||||||
Date: Thu, 18 Aug 2016 14:10:36 -0700
|
|
||||||
Subject: [PATCH] Rename CPeripherals::GetAddon() to GetAddonWithButtonMap()
|
|
||||||
and move to addon bus
|
|
||||||
|
|
||||||
---
|
|
||||||
xbmc/peripherals/Peripherals.cpp | 26 +++++----------------
|
|
||||||
xbmc/peripherals/Peripherals.h | 2 +-
|
|
||||||
xbmc/peripherals/addons/AddonButtonMapping.cpp | 2 +-
|
|
||||||
xbmc/peripherals/addons/AddonInputHandling.cpp | 2 +-
|
|
||||||
.../peripherals/bus/virtual/PeripheralBusAddon.cpp | 27 ++++++++++++++++++----
|
|
||||||
5 files changed, 31 insertions(+), 28 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/xbmc/peripherals/Peripherals.cpp b/xbmc/peripherals/Peripherals.cpp
|
|
||||||
index 629846d..30f160e 100644
|
|
||||||
--- a/xbmc/peripherals/Peripherals.cpp
|
|
||||||
+++ b/xbmc/peripherals/Peripherals.cpp
|
|
||||||
@@ -762,29 +762,15 @@ void CPeripherals::ProcessEvents(void)
|
|
||||||
bus->ProcessEvents();
|
|
||||||
}
|
|
||||||
|
|
||||||
-PeripheralAddonPtr CPeripherals::GetAddon(const CPeripheral* device)
|
|
||||||
+PeripheralAddonPtr CPeripherals::GetAddonWithButtonMap(const CPeripheral* device)
|
|
||||||
{
|
|
||||||
- PeripheralAddonPtr addon;
|
|
||||||
-
|
|
||||||
PeripheralBusAddonPtr addonBus = std::static_pointer_cast<CPeripheralBusAddon>(GetBusByType(PERIPHERAL_BUS_ADDON));
|
|
||||||
- if (device && addonBus)
|
|
||||||
- {
|
|
||||||
- PeripheralBusType busType = device->GetBusType();
|
|
||||||
|
|
||||||
- if (busType == PERIPHERAL_BUS_ADDON)
|
|
||||||
- {
|
|
||||||
- // If device is from an add-on, use that add-on
|
|
||||||
- PeripheralAddonPtr peripheralAddon;
|
|
||||||
- unsigned int index;
|
|
||||||
- if (addonBus->SplitLocation(device->Location(), addon, index))
|
|
||||||
- addon = std::move(peripheralAddon);
|
|
||||||
- }
|
|
||||||
- else
|
|
||||||
- {
|
|
||||||
- // Otherwise, have the add-on bus find a suitable add-on
|
|
||||||
- addonBus->GetAddonWithButtonMap(device, addon);
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
+ PeripheralAddonPtr addon;
|
|
||||||
+
|
|
||||||
+ PeripheralAddonPtr addonWithButtonMap;
|
|
||||||
+ if (addonBus && addonBus->GetAddonWithButtonMap(device, addonWithButtonMap))
|
|
||||||
+ addon = std::move(addonWithButtonMap);
|
|
||||||
|
|
||||||
return addon;
|
|
||||||
}
|
|
||||||
diff --git a/xbmc/peripherals/Peripherals.h b/xbmc/peripherals/Peripherals.h
|
|
||||||
index b66970d..33ca7fb 100644
|
|
||||||
--- a/xbmc/peripherals/Peripherals.h
|
|
||||||
+++ b/xbmc/peripherals/Peripherals.h
|
|
||||||
@@ -239,7 +239,7 @@ namespace PERIPHERALS
|
|
||||||
// implementation of IEventScannerCallback
|
|
||||||
virtual void ProcessEvents(void) override;
|
|
||||||
|
|
||||||
- virtual PeripheralAddonPtr GetAddon(const CPeripheral* device);
|
|
||||||
+ virtual PeripheralAddonPtr GetAddonWithButtonMap(const CPeripheral* device);
|
|
||||||
|
|
||||||
virtual void ResetButtonMaps(const std::string& controllerId);
|
|
||||||
|
|
||||||
diff --git a/xbmc/peripherals/addons/AddonButtonMapping.cpp b/xbmc/peripherals/addons/AddonButtonMapping.cpp
|
|
||||||
index 818e894..32a45c2 100644
|
|
||||||
--- a/xbmc/peripherals/addons/AddonButtonMapping.cpp
|
|
||||||
+++ b/xbmc/peripherals/addons/AddonButtonMapping.cpp
|
|
||||||
@@ -29,7 +29,7 @@ using namespace PERIPHERALS;
|
|
||||||
|
|
||||||
CAddonButtonMapping::CAddonButtonMapping(CPeripheral* peripheral, IButtonMapper* mapper)
|
|
||||||
{
|
|
||||||
- PeripheralAddonPtr addon = g_peripherals.GetAddon(peripheral);
|
|
||||||
+ PeripheralAddonPtr addon = g_peripherals.GetAddonWithButtonMap(peripheral);
|
|
||||||
|
|
||||||
if (!addon)
|
|
||||||
{
|
|
||||||
diff --git a/xbmc/peripherals/addons/AddonInputHandling.cpp b/xbmc/peripherals/addons/AddonInputHandling.cpp
|
|
||||||
index 7a29c9e..89527f4 100644
|
|
||||||
--- a/xbmc/peripherals/addons/AddonInputHandling.cpp
|
|
||||||
+++ b/xbmc/peripherals/addons/AddonInputHandling.cpp
|
|
||||||
@@ -32,7 +32,7 @@ using namespace PERIPHERALS;
|
|
||||||
|
|
||||||
CAddonInputHandling::CAddonInputHandling(CPeripheral* peripheral, IInputHandler* handler, IDriverReceiver* receiver)
|
|
||||||
{
|
|
||||||
- PeripheralAddonPtr addon = g_peripherals.GetAddon(peripheral);
|
|
||||||
+ PeripheralAddonPtr addon = g_peripherals.GetAddonWithButtonMap(peripheral);
|
|
||||||
|
|
||||||
if (!addon)
|
|
||||||
{
|
|
||||||
diff --git a/xbmc/peripherals/bus/virtual/PeripheralBusAddon.cpp b/xbmc/peripherals/bus/virtual/PeripheralBusAddon.cpp
|
|
||||||
index b533686..2426285 100644
|
|
||||||
--- a/xbmc/peripherals/bus/virtual/PeripheralBusAddon.cpp
|
|
||||||
+++ b/xbmc/peripherals/bus/virtual/PeripheralBusAddon.cpp
|
|
||||||
@@ -80,15 +80,32 @@ bool CPeripheralBusAddon::GetAddon(const std::string &strId, AddonPtr &addon) co
|
|
||||||
bool CPeripheralBusAddon::GetAddonWithButtonMap(const CPeripheral* device, PeripheralAddonPtr &addon) const
|
|
||||||
{
|
|
||||||
CSingleLock lock(m_critSection);
|
|
||||||
- for (const auto& addonIt : m_addons)
|
|
||||||
+
|
|
||||||
+ // If device is from an add-on, try to use that add-on
|
|
||||||
+ if (device && device->GetBusType() == PERIPHERAL_BUS_ADDON)
|
|
||||||
{
|
|
||||||
- if (addonIt->HasButtonMaps())
|
|
||||||
+ PeripheralAddonPtr addonWithButtonMap;
|
|
||||||
+ unsigned int index;
|
|
||||||
+ if (SplitLocation(device->Location(), addonWithButtonMap, index))
|
|
||||||
{
|
|
||||||
- addon = addonIt;
|
|
||||||
- return true;
|
|
||||||
+ if (addonWithButtonMap->HasButtonMaps())
|
|
||||||
+ addon = std::move(addonWithButtonMap);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
- return false;
|
|
||||||
+
|
|
||||||
+ if (!addon)
|
|
||||||
+ {
|
|
||||||
+ auto it = std::find_if(m_addons.begin(), m_addons.end(),
|
|
||||||
+ [](const PeripheralAddonPtr& addon)
|
|
||||||
+ {
|
|
||||||
+ return addon->HasButtonMaps();
|
|
||||||
+ });
|
|
||||||
+
|
|
||||||
+ if (it != m_addons.end())
|
|
||||||
+ addon = *it;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return addon.get() != nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned int CPeripheralBusAddon::GetAddonCount(void) const
|
|
@ -1,103 +0,0 @@
|
|||||||
commit 62fa4175cb82e40ea3b67887f08d1f9424aa8a8d
|
|
||||||
Author: MilhouseVH <milhouseVH.github@nmacleod.com>
|
|
||||||
Date: Wed Aug 31 04:37:27 2016
|
|
||||||
|
|
||||||
Revert "VideoPlayer: passthrough fixes"
|
|
||||||
|
|
||||||
This reverts commit 14af37aac18b0f471694dac7c65a96d39afaf327.
|
|
||||||
|
|
||||||
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Audio/DVDAudioCodecPassthrough.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/Audio/DVDAudioCodecPassthrough.cpp
|
|
||||||
index 3af25db..8009297 100644
|
|
||||||
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Audio/DVDAudioCodecPassthrough.cpp
|
|
||||||
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Audio/DVDAudioCodecPassthrough.cpp
|
|
||||||
@@ -27,10 +27,6 @@
|
|
||||||
|
|
||||||
#include "cores/AudioEngine/AEFactory.h"
|
|
||||||
|
|
||||||
-extern "C" {
|
|
||||||
-#include "libavcodec/avcodec.h"
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
#define TRUEHD_BUF_SIZE 61440
|
|
||||||
|
|
||||||
CDVDAudioCodecPassthrough::CDVDAudioCodecPassthrough(CProcessInfo &processInfo) :
|
|
||||||
@@ -118,7 +114,6 @@ void CDVDAudioCodecPassthrough::Dispose()
|
|
||||||
int CDVDAudioCodecPassthrough::Decode(uint8_t* pData, int iSize, double dts, double pts)
|
|
||||||
{
|
|
||||||
int used = 0;
|
|
||||||
- int skip = 0;
|
|
||||||
if (m_backlogSize)
|
|
||||||
{
|
|
||||||
if (m_currentPts == DVD_NOPTS_VALUE)
|
|
||||||
@@ -132,25 +127,12 @@ int CDVDAudioCodecPassthrough::Decode(uint8_t* pData, int iSize, double dts, dou
|
|
||||||
m_bufferSize = std::max(m_bufferSize, m_dataSize);
|
|
||||||
if (consumed != m_backlogSize)
|
|
||||||
{
|
|
||||||
- memmove(m_backlogBuffer, m_backlogBuffer+consumed, m_backlogSize-consumed);
|
|
||||||
+ memmove(m_backlogBuffer, m_backlogBuffer+consumed, consumed);
|
|
||||||
m_backlogSize -= consumed;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- // get rid of potential side data
|
|
||||||
- if (pData)
|
|
||||||
- {
|
|
||||||
- AVPacket pkt;
|
|
||||||
- av_init_packet(&pkt);
|
|
||||||
- pkt.data = pData;
|
|
||||||
- pkt.size = iSize;
|
|
||||||
- av_packet_split_side_data(&pkt);
|
|
||||||
- skip = iSize - pkt.size;
|
|
||||||
- pData = pkt.data;
|
|
||||||
- iSize = pkt.size;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- if (pData && !m_backlogSize)
|
|
||||||
+ if (pData && !m_dataSize)
|
|
||||||
{
|
|
||||||
if (iSize <= 0)
|
|
||||||
return 0;
|
|
||||||
@@ -187,20 +169,6 @@ int CDVDAudioCodecPassthrough::Decode(uint8_t* pData, int iSize, double dts, dou
|
|
||||||
if (!m_dataSize)
|
|
||||||
return used;
|
|
||||||
|
|
||||||
- if (m_dataSize)
|
|
||||||
- {
|
|
||||||
- m_format.m_dataFormat = AE_FMT_RAW;
|
|
||||||
- m_format.m_streamInfo = m_parser.GetStreamInfo();
|
|
||||||
- m_format.m_sampleRate = m_parser.GetSampleRate();
|
|
||||||
- m_format.m_frameSize = 1;
|
|
||||||
- CAEChannelInfo layout;
|
|
||||||
- for (unsigned int i=0; i<m_parser.GetChannels(); i++)
|
|
||||||
- {
|
|
||||||
- layout += AE_CH_RAW;
|
|
||||||
- }
|
|
||||||
- m_format.m_channelLayout = layout;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
if (m_format.m_streamInfo.m_type == CAEStreamInfo::STREAM_TYPE_TRUEHD)
|
|
||||||
{
|
|
||||||
if (!m_trueHDoffset)
|
|
||||||
@@ -222,7 +190,21 @@ int CDVDAudioCodecPassthrough::Decode(uint8_t* pData, int iSize, double dts, dou
|
|
||||||
m_dataSize = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
- return used + skip;
|
|
||||||
+ if (m_dataSize)
|
|
||||||
+ {
|
|
||||||
+ m_format.m_dataFormat = AE_FMT_RAW;
|
|
||||||
+ m_format.m_streamInfo = m_parser.GetStreamInfo();
|
|
||||||
+ m_format.m_sampleRate = m_parser.GetSampleRate();
|
|
||||||
+ m_format.m_frameSize = 1;
|
|
||||||
+ CAEChannelInfo layout;
|
|
||||||
+ for (unsigned int i=0; i<m_parser.GetChannels(); i++)
|
|
||||||
+ {
|
|
||||||
+ layout += AE_CH_RAW;
|
|
||||||
+ }
|
|
||||||
+ m_format.m_channelLayout = layout;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return used;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CDVDAudioCodecPassthrough::GetData(DVDAudioFrame &frame)
|
|
Loading…
x
Reference in New Issue
Block a user