mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-08-02 07:27:49 +00:00
xbmc: remove unused patches
This commit is contained in:
parent
e84840a378
commit
0602e65dc8
@ -1,35 +0,0 @@
|
||||
From efbf84893cb0d5d41232a29cd1f51f7d5cf53cb4 Mon Sep 17 00:00:00 2001
|
||||
From: xbmc <fernetmenta@online.de>
|
||||
Date: Sat, 16 Mar 2013 15:54:04 +0100
|
||||
Subject: [PATCH] skin.confluence: adjust row label 2 in VideoFullScreen to
|
||||
line break in codec info
|
||||
|
||||
---
|
||||
addons/skin.confluence/720p/VideoFullScreen.xml | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/720p/VideoFullScreen.xml b/720p/VideoFullScreen.xml
|
||||
index 43cf714..8bdc8c8 100644
|
||||
--- a/720p/VideoFullScreen.xml
|
||||
+++ b/720p/VideoFullScreen.xml
|
||||
@@ -339,7 +339,7 @@
|
||||
<control type="label" id="11">
|
||||
<description>row 2 label</description>
|
||||
<posx>50</posx>
|
||||
- <posy>40</posy>
|
||||
+ <posy>55</posy>
|
||||
<width>1180</width>
|
||||
<height>30</height>
|
||||
<align>left</align>
|
||||
@@ -350,7 +350,7 @@
|
||||
<control type="label" id="12">
|
||||
<description>row 3 label</description>
|
||||
<posx>50</posx>
|
||||
- <posy>85</posy>
|
||||
+ <posy>100</posy>
|
||||
<width>1180</width>
|
||||
<height>30</height>
|
||||
<align>left</align>
|
||||
--
|
||||
1.8.1.5
|
||||
|
@ -1,99 +0,0 @@
|
||||
diff -Naur xbmc-12.1/xbmc/cores/omxplayer/OMXPlayerAudio.cpp xbmc-12.1.patch/xbmc/cores/omxplayer/OMXPlayerAudio.cpp
|
||||
--- xbmc-12.1/xbmc/cores/omxplayer/OMXPlayerAudio.cpp 2013-04-07 22:10:57.264461705 +0200
|
||||
+++ xbmc-12.1.patch/xbmc/cores/omxplayer/OMXPlayerAudio.cpp 2013-04-07 22:18:08.064718783 +0200
|
||||
@@ -80,6 +80,7 @@
|
||||
m_send_eos = false;
|
||||
m_bad_state = false;
|
||||
m_hints_current.Clear();
|
||||
+ m_output_stalled = false;
|
||||
|
||||
m_av_clock->SetMasterClock(false);
|
||||
|
||||
@@ -154,6 +155,7 @@
|
||||
m_stalled = m_messageQueue.GetPacketCount(CDVDMsg::DEMUXER_PACKET) == 0;
|
||||
m_use_passthrough = (g_guiSettings.GetInt("audiooutput.mode") == AUDIO_HDMI) ? true : false ;
|
||||
m_use_hw_decode = g_advancedSettings.m_omxHWAudioDecode;
|
||||
+ m_output_stalled = m_stalled;
|
||||
}
|
||||
|
||||
bool OMXPlayerAudio::CloseStream(bool bWaitForBuffers)
|
||||
@@ -442,11 +444,11 @@
|
||||
}
|
||||
|
||||
if(bDropPacket)
|
||||
- m_stalled = false;
|
||||
+ m_stalled = m_output_stalled = false;
|
||||
|
||||
if(m_omxAudio.GetCacheTime() < 0.1 /*&& min(99,m_messageQueue.GetLevel() + MathUtils::round_int(100.0/8.0*GetCacheTime())) > 10*/)
|
||||
{
|
||||
- m_stalled = true;
|
||||
+ m_stalled = m_output_stalled = true;
|
||||
if(!m_av_clock->OMXAudioBuffer() && m_av_clock->HasVideo() && m_speed == DVD_PLAYSPEED_NORMAL)
|
||||
{
|
||||
clock_gettime(CLOCK_REALTIME, &m_starttime);
|
||||
@@ -454,6 +456,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ if (m_stalled && m_omxAudio.GetCacheTime() > 0.0)
|
||||
+ m_stalled = false;
|
||||
+
|
||||
// signal to our parent that we have initialized
|
||||
if(m_started == false)
|
||||
{
|
||||
@@ -478,6 +483,7 @@
|
||||
|
||||
if (ret == MSGQ_TIMEOUT)
|
||||
{
|
||||
+ m_stalled = true;
|
||||
Sleep(10);
|
||||
continue;
|
||||
}
|
||||
@@ -497,12 +503,14 @@
|
||||
CLog::Log(LOGINFO, "Audio: dts:%.0f pts:%.0f size:%d (s:%d f:%d d:%d l:%d) s:%d %d/%d late:%d,%d", pPacket->dts, pPacket->pts,
|
||||
(int)pPacket->iSize, m_started, m_flush, bPacketDrop, m_stalled, m_speed, 0, 0, (int)m_omxAudio.GetAudioRenderingLatency(), (int)m_hints_current.samplerate);
|
||||
#endif
|
||||
+
|
||||
+ m_stalled = false;
|
||||
if(Decode(pPacket, m_speed > DVD_PLAYSPEED_NORMAL || m_speed < 0 || bPacketDrop))
|
||||
{
|
||||
- if (m_stalled && (m_omxAudio.GetCacheTime() > (AUDIO_BUFFER_SECONDS * 0.75f)))
|
||||
+ if (m_output_stalled && (m_omxAudio.GetCacheTime() > (AUDIO_BUFFER_SECONDS * 0.75f)))
|
||||
{
|
||||
CLog::Log(LOGINFO, "COMXPlayerAudio - Switching to normal playback");
|
||||
- m_stalled = false;
|
||||
+ m_stalled = m_output_stalled = false;
|
||||
if(m_av_clock->HasVideo() && m_av_clock->OMXAudioBuffer())
|
||||
m_av_clock->OMXAudioBufferStop();
|
||||
}
|
||||
@@ -510,9 +518,9 @@
|
||||
// hard unlock audio out buffering
|
||||
clock_gettime(CLOCK_REALTIME, &m_endtime);
|
||||
//int iLevel = min(99,m_messageQueue.GetLevel() + MathUtils::round_int(100.0/8.0*GetCacheTime()));
|
||||
- if(/*iLevel < 10 &&*/ m_stalled && m_av_clock->OMXAudioBuffer() && (m_endtime.tv_sec - m_starttime.tv_sec) > 1)
|
||||
+ if(/*iLevel < 10 &&*/ m_output_stalled && m_av_clock->OMXAudioBuffer() && (m_endtime.tv_sec - m_starttime.tv_sec) > 1)
|
||||
{
|
||||
- m_stalled = false;
|
||||
+ m_stalled = m_output_stalled = false;
|
||||
if(m_av_clock->HasVideo() && m_av_clock->OMXAudioBuffer())
|
||||
m_av_clock->OMXAudioBufferStop();
|
||||
}
|
||||
@@ -563,6 +571,7 @@
|
||||
m_av_clock->UnLock();
|
||||
m_syncclock = true;
|
||||
m_stalled = true;
|
||||
+ m_output_stalled = true;
|
||||
m_started = false;
|
||||
|
||||
if (m_pAudioCodec)
|
||||
diff -Naur xbmc-12.1/xbmc/cores/omxplayer/OMXPlayerAudio.h xbmc-12.1.patch/xbmc/cores/omxplayer/OMXPlayerAudio.h
|
||||
--- xbmc-12.1/xbmc/cores/omxplayer/OMXPlayerAudio.h 2013-04-07 22:10:57.262461708 +0200
|
||||
+++ xbmc-12.1.patch/xbmc/cores/omxplayer/OMXPlayerAudio.h 2013-04-07 22:13:15.931280700 +0200
|
||||
@@ -76,6 +76,7 @@
|
||||
|
||||
bool m_stalled;
|
||||
bool m_started;
|
||||
+ bool m_output_stalled;
|
||||
|
||||
BitstreamStats m_audioStats;
|
||||
|
@ -1,69 +0,0 @@
|
||||
From eacf9a512d118e50a9777ae05460a2a344a408e6 Mon Sep 17 00:00:00 2001
|
||||
From: xbmc <fernetmenta@online.de>
|
||||
Date: Thu, 28 Mar 2013 15:18:53 +0100
|
||||
Subject: [PATCH] OMXPlayer: some caching fixes for pvr
|
||||
|
||||
---
|
||||
xbmc/cores/omxplayer/OMXPlayer.cpp | 13 +++++++------
|
||||
1 file changed, 7 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/xbmc/cores/omxplayer/OMXPlayer.cpp b/xbmc/cores/omxplayer/OMXPlayer.cpp
|
||||
index 28addd3..34f3acb 100644
|
||||
--- a/xbmc/cores/omxplayer/OMXPlayer.cpp
|
||||
+++ b/xbmc/cores/omxplayer/OMXPlayer.cpp
|
||||
@@ -1243,13 +1243,13 @@ void COMXPlayer::Process()
|
||||
if (!IsValidStream(m_CurrentAudio) && m_player_audio.IsStalled()) CloseAudioStream(true);
|
||||
if (!IsValidStream(m_CurrentVideo) && m_player_video.IsStalled()) CloseVideoStream(true);
|
||||
if (!IsValidStream(m_CurrentSubtitle) && m_player_subtitle.IsStalled()) CloseSubtitleStream(true);
|
||||
- if (!IsValidStream(m_CurrentTeletext)) CloseTeletextStream(true);
|
||||
+// if (!IsValidStream(m_CurrentTeletext)) CloseTeletextStream(true);
|
||||
|
||||
// see if we can find something better to play
|
||||
if (IsBetterStream(m_CurrentAudio, pStream)) OpenAudioStream (pStream->iId, pStream->source);
|
||||
if (IsBetterStream(m_CurrentVideo, pStream)) OpenVideoStream (pStream->iId, pStream->source);
|
||||
if (IsBetterStream(m_CurrentSubtitle, pStream)) OpenSubtitleStream(pStream->iId, pStream->source);
|
||||
- if (IsBetterStream(m_CurrentTeletext, pStream)) OpenTeletextStream(pStream->iId, pStream->source);
|
||||
+// if (IsBetterStream(m_CurrentTeletext, pStream)) OpenTeletextStream(pStream->iId, pStream->source);
|
||||
|
||||
if(m_change_volume)
|
||||
{
|
||||
@@ -2233,7 +2233,8 @@ void COMXPlayer::HandleMessages()
|
||||
// 1. disable audio
|
||||
// 2. skip frames and adjust their pts or the clock
|
||||
m_playSpeed = speed;
|
||||
- m_caching = CACHESTATE_DONE;
|
||||
+ if (m_caching != CACHESTATE_PVR && m_playSpeed != DVD_PLAYSPEED_NORMAL)
|
||||
+ SetCaching(CACHESTATE_DONE);
|
||||
m_av_clock.SetSpeed(speed);
|
||||
m_av_clock.OMXSetSpeed(speed);
|
||||
m_player_audio.SetSpeed(speed);
|
||||
@@ -3106,7 +3107,7 @@ bool COMXPlayer::CloseAudioStream(bool bWaitForBuffers)
|
||||
|
||||
CLog::Log(LOGNOTICE, "Closing audio stream");
|
||||
|
||||
- if(bWaitForBuffers)
|
||||
+ if(bWaitForBuffers && m_caching != CACHESTATE_PVR)
|
||||
SetCaching(CACHESTATE_DONE);
|
||||
|
||||
m_player_audio.CloseStream(bWaitForBuffers);
|
||||
@@ -3122,7 +3123,7 @@ bool COMXPlayer::CloseVideoStream(bool bWaitForBuffers)
|
||||
|
||||
CLog::Log(LOGNOTICE, "Closing video stream");
|
||||
|
||||
- if(bWaitForBuffers)
|
||||
+ if(bWaitForBuffers && m_caching != CACHESTATE_PVR)
|
||||
SetCaching(CACHESTATE_DONE);
|
||||
|
||||
m_player_video.CloseStream(bWaitForBuffers);
|
||||
@@ -3151,7 +3152,7 @@ bool COMXPlayer::CloseTeletextStream(bool bWaitForBuffers)
|
||||
|
||||
CLog::Log(LOGNOTICE, "Closing teletext stream");
|
||||
|
||||
- if(bWaitForBuffers)
|
||||
+ if(bWaitForBuffers && m_caching != CACHESTATE_PVR)
|
||||
SetCaching(CACHESTATE_DONE);
|
||||
|
||||
m_player_teletext.CloseStream(bWaitForBuffers);
|
||||
--
|
||||
1.8.1.5
|
||||
|
@ -1,19 +0,0 @@
|
||||
diff -Naur xbmc-frodo-5ea1d22/xbmc/interfaces/python/XBPython.cpp xbmc-frodo-5ea1d22.patch/xbmc/interfaces/python/XBPython.cpp
|
||||
--- xbmc-frodo-5ea1d22/xbmc/interfaces/python/XBPython.cpp 2012-09-05 13:28:20.000000000 +0200
|
||||
+++ xbmc-frodo-5ea1d22.patch/xbmc/interfaces/python/XBPython.cpp 2012-09-05 15:50:42.642317031 +0200
|
||||
@@ -525,11 +525,10 @@
|
||||
// at http://docs.python.org/using/cmdline.html#environment-variables
|
||||
|
||||
#if !defined(_WIN32) && !defined(TARGET_ANDROID)
|
||||
- /* PYTHONOPTIMIZE is set off intentionally when using external Python.
|
||||
- Reason for this is because we cannot be sure what version of Python
|
||||
- was used to compile the various Python object files (i.e. .pyo,
|
||||
- .pyc, etc.). */
|
||||
- // check if we are running as real xbmc.app or just binary
|
||||
+ // Required for python to find optimized code (pyo) files
|
||||
+ setenv("PYTHONOPTIMIZE", "1", 1);
|
||||
+
|
||||
+ // check if we are running as real xbmc.app or just binary
|
||||
if (!CUtil::GetFrameworksPath(true).IsEmpty())
|
||||
{
|
||||
// using external python, it's build looking for xxx/lib/python2.6
|
@ -1,12 +0,0 @@
|
||||
diff -Naur xbmc-pvr-3513480/userdata/LCD.xml xbmc-pvr-3513480.patch/userdata/LCD.xml
|
||||
--- xbmc-pvr-3513480/userdata/LCD.xml 2011-04-25 02:36:33.000000000 +0200
|
||||
+++ xbmc-pvr-3513480.patch/userdata/LCD.xml 2011-04-25 05:27:34.956125133 +0200
|
||||
@@ -21,7 +21,7 @@
|
||||
<line>Freemem: $INFO[System.FreeMemory]</line>
|
||||
</video>
|
||||
<general>
|
||||
- <line>XBMC running...</line>
|
||||
+ <line>*** OpenELEC ***</line>
|
||||
<line>$INFO[System.Time] $INFO[System.Date]</line>
|
||||
<line>Freemem: $INFO[System.FreeMemory]</line>
|
||||
<line>$INFO[System.ScreenWidth]x$INFO[System.ScreenHeight] $INFO[System.ScreenMode]</line>
|
@ -1,11 +0,0 @@
|
||||
diff -Naur xbmc-12.0.7/userdata/RssFeeds.xml xbmc-12.0.7.patch/userdata/RssFeeds.xml
|
||||
--- xbmc-12.0.7/userdata/RssFeeds.xml 2013-03-15 14:25:26.000000000 +0100
|
||||
+++ xbmc-12.0.7.patch/userdata/RssFeeds.xml 2013-03-15 14:40:54.695338102 +0100
|
||||
@@ -3,6 +3,7 @@
|
||||
<!-- RSS feeds. To have multiple feeds, just add a feed to the set. You can also have multiple sets. !-->
|
||||
<!-- To use different sets in your skin, each must be called from skin with a unique id. !-->
|
||||
<set id="1">
|
||||
+ <feed updateinterval="30">http://feeds.openelec.tv/news</feed>
|
||||
<feed updateinterval="30">http://feeds.xbmc.org/xbmc</feed>
|
||||
</set>
|
||||
</rssfeeds>
|
@ -1,13 +0,0 @@
|
||||
diff --git a/xbmc/settings/GUIWindowSettingsCategory.cpp b/xbmc/settings/GUIWindowSettingsCategory.cpp
|
||||
index cbf0acb..f789e18 100644
|
||||
--- a/xbmc/settings/GUIWindowSettingsCategory.cpp
|
||||
+++ b/xbmc/settings/GUIWindowSettingsCategory.cpp
|
||||
@@ -2434,7 +2434,7 @@ DisplayMode CGUIWindowSettingsCategory::FillInScreens(CStdString strSetting, RES
|
||||
pControl->Clear();
|
||||
|
||||
CStdString strScreen;
|
||||
- if (g_advancedSettings.m_canWindowed)
|
||||
+ if (g_advancedSettings.m_canWindowed && !g_application.IsStandAlone())
|
||||
pControl->AddLabel(g_localizeStrings.Get(242), -1);
|
||||
|
||||
#if !defined(HAS_GLX)
|
@ -1,24 +0,0 @@
|
||||
From 6a4d9b842a29fa9b0c233517826baffe5caec0cb Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Saraev <stefan@saraev.ca>
|
||||
Date: Wed, 11 Sep 2013 22:52:10 +0300
|
||||
Subject: [PATCH] keep old repo content if update fails
|
||||
|
||||
---
|
||||
xbmc/addons/Repository.cpp | 1 +
|
||||
1 files changed, 1 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/xbmc/addons/Repository.cpp b/xbmc/addons/Repository.cpp
|
||||
index 0958d47..77b1d9a 100644
|
||||
--- a/xbmc/addons/Repository.cpp
|
||||
+++ b/xbmc/addons/Repository.cpp
|
||||
@@ -273,6 +273,7 @@ VECADDONS CRepositoryUpdateJob::GrabAddons(RepositoryPtr& repo)
|
||||
{
|
||||
CLog::Log(LOGERROR,"Repository %s returned no add-ons, listing may have failed",repo->Name().c_str());
|
||||
reposum = checksum; // don't update the checksum
|
||||
+ database.GetRepository(repo->ID(),addons); // keep old addons
|
||||
}
|
||||
database.AddRepository(repo->ID(),addons,reposum);
|
||||
}
|
||||
--
|
||||
1.7.2.5
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff -Naur xbmc-12.2-68a881d/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp xbmc-12.2-68a881d.patch/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
|
||||
--- xbmc-12.2-68a881d/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp 2013-09-12 19:41:16.000000000 +0200
|
||||
+++ xbmc-12.2-68a881d.patch/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp 2013-09-13 00:12:05.538128585 +0200
|
||||
@@ -1180,7 +1180,7 @@
|
||||
char *errorStr;
|
||||
if (vasprintf(&errorStr, fmt, arg) >= 0)
|
||||
{
|
||||
- CLog::Log(LOGINFO, "CAESinkALSA - ALSA: %s:%d:(%s) %s%s%s",
|
||||
+ CLog::Log(LOGDEBUG, "CAESinkALSA - ALSA: %s:%d:(%s) %s%s%s",
|
||||
file, line, function, errorStr, err ? ": " : "", err ? snd_strerror(err) : "");
|
||||
free(errorStr);
|
||||
}
|
@ -1,74 +0,0 @@
|
||||
From 7cd450bb2b8ea18277efff955202bf3b36573898 Mon Sep 17 00:00:00 2001
|
||||
From: verybadsoldier <vbs@springrts.de>
|
||||
Date: Sun, 1 Sep 2013 17:10:19 +0200
|
||||
Subject: [PATCH] After suspend wait for the first NIC to come up before
|
||||
continuing
|
||||
|
||||
---
|
||||
xbmc/powermanagement/PowerManager.cpp | 24 ++++++++++++++++++++++++
|
||||
xbmc/powermanagement/PowerManager.h | 2 ++
|
||||
2 files changed, 26 insertions(+)
|
||||
|
||||
diff --git a/xbmc/powermanagement/PowerManager.cpp b/xbmc/powermanagement/PowerManager.cpp
|
||||
index a68910b..8e93492 100644
|
||||
--- a/xbmc/powermanagement/PowerManager.cpp
|
||||
+++ b/xbmc/powermanagement/PowerManager.cpp
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "Application.h"
|
||||
#include "cores/AudioEngine/AEFactory.h"
|
||||
#include "input/KeyboardStat.h"
|
||||
+#include "network/Network.h"
|
||||
#include "settings/GUISettings.h"
|
||||
#include "windowing/WindowingFactory.h"
|
||||
#include "utils/log.h"
|
||||
@@ -207,6 +207,8 @@ void CPowerManager::OnWake()
|
||||
{
|
||||
CLog::Log(LOGNOTICE, "%s: Running resume jobs", __FUNCTION__);
|
||||
|
||||
+ WaitForNic();
|
||||
+
|
||||
// reset out timers
|
||||
g_application.ResetShutdownTimers();
|
||||
|
||||
@@ -254,3 +256,25 @@ void CPowerManager::OnLowBattery()
|
||||
|
||||
CAnnouncementManager::Announce(System, "xbmc", "OnLowBattery");
|
||||
}
|
||||
+
|
||||
+void CPowerManager::WaitForNic()
|
||||
+{
|
||||
+ CLog::Log(LOGDEBUG, "%s: Waithing for first NIC to come up", __FUNCTION__);
|
||||
+
|
||||
+ const unsigned maxLoopCount = 50u;
|
||||
+ const unsigned sleepTimeMs = 200u;
|
||||
+
|
||||
+ for(unsigned i=0; i < maxLoopCount; ++i)
|
||||
+ {
|
||||
+ CNetworkInterface* pIface = g_application.getNetwork().GetFirstConnectedInterface();
|
||||
+ if (pIface && pIface->IsEnabled() && pIface->IsConnected())
|
||||
+ {
|
||||
+ CLog::Log(LOGDEBUG, "%s: NIC is up after waiting %d ms", __FUNCTION__, i * sleepTimeMs);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ Sleep(sleepTimeMs);
|
||||
+ }
|
||||
+
|
||||
+ CLog::Log(LOGDEBUG, "%s: NIC did not come up within %d ms... Lets give up...", __FUNCTION__, maxLoopCount * sleepTimeMs);
|
||||
+}
|
||||
diff --git a/xbmc/powermanagement/PowerManager.h b/xbmc/powermanagement/PowerManager.h
|
||||
index deb4b66..476cdc1 100644
|
||||
--- a/xbmc/powermanagement/PowerManager.h
|
||||
+++ b/xbmc/powermanagement/PowerManager.h
|
||||
@@ -73,6 +73,8 @@ class CPowerManager : public IPowerEventsCallback
|
||||
|
||||
void OnLowBattery();
|
||||
|
||||
+ void WaitForNic();
|
||||
+
|
||||
IPowerSyscall *m_instance;
|
||||
};
|
||||
|
||||
--
|
||||
1.8.4
|
||||
|
@ -1,66 +0,0 @@
|
||||
From 35400b9a93e5c2c9aa6dc389736af293fc623a5b Mon Sep 17 00:00:00 2001
|
||||
From: davilla <davilla@4pi.com>
|
||||
Date: Thu, 3 Jan 2013 11:20:22 -0500
|
||||
Subject: [PATCH] [aml] fixed context menu 'remove safely' selection
|
||||
|
||||
---
|
||||
xbmc/linux/PosixMountProvider.cpp | 10 ++++++++++
|
||||
xbmc/linux/PosixMountProvider.h | 2 +-
|
||||
xbmc/storage/linux/UDevProvider.cpp | 7 ++++++-
|
||||
3 files changed, 17 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/xbmc/linux/PosixMountProvider.cpp b/xbmc/linux/PosixMountProvider.cpp
|
||||
index 2420491..27d639e 100644
|
||||
--- a/xbmc/linux/PosixMountProvider.cpp
|
||||
+++ b/xbmc/linux/PosixMountProvider.cpp
|
||||
@@ -127,6 +127,16 @@ void CPosixMountProvider::GetDrives(VECSOURCES &drives)
|
||||
return result;
|
||||
}
|
||||
|
||||
+bool CPosixMountProvider::Eject(CStdString mountpath)
|
||||
+{
|
||||
+ // just go ahead and try to umount the disk
|
||||
+ // if it does umount, life is good, if not, no loss.
|
||||
+ std::string cmd = "umount " + mountpath;
|
||||
+ system(cmd.c_str());
|
||||
+
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
bool CPosixMountProvider::PumpDriveChangeEvents(IStorageEventsCallback *callback)
|
||||
{
|
||||
VECSOURCES drives;
|
||||
diff --git a/xbmc/linux/PosixMountProvider.h b/xbmc/linux/PosixMountProvider.h
|
||||
index da0506c..02ff302 100644
|
||||
--- a/xbmc/linux/PosixMountProvider.h
|
||||
+++ b/xbmc/linux/PosixMountProvider.h
|
||||
@@ -34,7 +34,7 @@ class CPosixMountProvider : public IStorageProvider
|
||||
|
||||
virtual std::vector<CStdString> GetDiskUsage();
|
||||
|
||||
- virtual bool Eject(CStdString mountpath) { return false; }
|
||||
+ virtual bool Eject(CStdString mountpath);
|
||||
|
||||
virtual bool PumpDriveChangeEvents(IStorageEventsCallback *callback);
|
||||
private:
|
||||
diff --git a/xbmc/storage/linux/UDevProvider.cpp b/xbmc/storage/linux/UDevProvider.cpp
|
||||
index 21b6b50..d9e6a4f 100644
|
||||
--- a/xbmc/storage/linux/UDevProvider.cpp
|
||||
+++ b/xbmc/storage/linux/UDevProvider.cpp
|
||||
@@ -179,7 +179,12 @@ void CUDevProvider::GetRemovableDrives(VECSOURCES &removableDrives)
|
||||
|
||||
bool CUDevProvider::Eject(CStdString mountpath)
|
||||
{
|
||||
- return false;
|
||||
+ // just go ahead and try to umount the disk
|
||||
+ // if it does umount, life is good, if not, no loss.
|
||||
+ std::string cmd = "umount " + mountpath;
|
||||
+ system(cmd.c_str());
|
||||
+
|
||||
+ return true;
|
||||
}
|
||||
|
||||
std::vector<CStdString> CUDevProvider::GetDiskUsage()
|
||||
--
|
||||
1.8.4
|
||||
|
@ -1,39 +0,0 @@
|
||||
From 023acdbbe7b3766e3e1bf509e92d967903aee680 Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Saraev <stefan@saraev.ca>
|
||||
Date: Sat, 31 Aug 2013 18:19:43 +0300
|
||||
Subject: [PATCH] use udevil to umount. escape mountpath
|
||||
|
||||
---
|
||||
xbmc/linux/PosixMountProvider.cpp | 2 +-
|
||||
xbmc/storage/linux/UDevProvider.cpp | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/xbmc/linux/PosixMountProvider.cpp b/xbmc/linux/PosixMountProvider.cpp
|
||||
index bbf47fa..2004b44 100644
|
||||
--- a/xbmc/linux/PosixMountProvider.cpp
|
||||
+++ b/xbmc/linux/PosixMountProvider.cpp
|
||||
@@ -130,7 +130,7 @@ bool CPosixMountProvider::Eject(CStdString mountpath)
|
||||
{
|
||||
// just go ahead and try to umount the disk
|
||||
// if it does umount, life is good, if not, no loss.
|
||||
- std::string cmd = "umount " + mountpath;
|
||||
+ std::string cmd = "udevil umount \"" + mountpath + "\"";
|
||||
system(cmd.c_str());
|
||||
|
||||
return true;
|
||||
diff --git a/xbmc/storage/linux/UDevProvider.cpp b/xbmc/storage/linux/UDevProvider.cpp
|
||||
index e9c86ab..2f3a5ea 100644
|
||||
--- a/xbmc/storage/linux/UDevProvider.cpp
|
||||
+++ b/xbmc/storage/linux/UDevProvider.cpp
|
||||
@@ -183,7 +183,7 @@ bool CUDevProvider::Eject(CStdString mountpath)
|
||||
{
|
||||
// just go ahead and try to umount the disk
|
||||
// if it does umount, life is good, if not, no loss.
|
||||
- std::string cmd = "umount " + mountpath;
|
||||
+ std::string cmd = "udevil umount \"" + mountpath + "\"";
|
||||
system(cmd.c_str());
|
||||
|
||||
return true;
|
||||
--
|
||||
1.7.2.5
|
||||
|
Loading…
x
Reference in New Issue
Block a user