diff options
author | Rainer Hochecker <fernetmenta@online.de> | 2014-11-08 12:25:43 +0100 |
---|---|---|
committer | Rainer Hochecker <fernetmenta@online.de> | 2014-11-11 07:37:45 +0100 |
commit | 3b2ccfdbc469de6c480721361374c4cc265623ed (patch) | |
tree | 7f058fcdb6c85af30c3e15e2c3e2505276f166ea | |
parent | b69bbac208acad8e247908da3fae1a295a72c151 (diff) |
[infomanager] only update a/v info if something has changed and only by main thread
-rw-r--r-- | Kodi.xcodeproj/project.pbxproj | 10 | ||||
-rw-r--r-- | project/VS2010Express/XBMC.vcxproj | 2 | ||||
-rw-r--r-- | project/VS2010Express/XBMC.vcxproj.filters | 6 | ||||
-rw-r--r-- | xbmc/GUIInfoManager.cpp | 13 | ||||
-rw-r--r-- | xbmc/GUIInfoManager.h | 2 | ||||
-rw-r--r-- | xbmc/SystemGlobals.cpp | 3 | ||||
-rw-r--r-- | xbmc/cores/DataCacheCore.cpp | 38 | ||||
-rw-r--r-- | xbmc/cores/DataCacheCore.h | 34 | ||||
-rw-r--r-- | xbmc/cores/Makefile.in | 1 | ||||
-rw-r--r-- | xbmc/cores/VideoRenderers/RenderManager.cpp | 3 | ||||
-rw-r--r-- | xbmc/cores/dvdplayer/DVDPlayer.cpp | 6 | ||||
-rw-r--r-- | xbmc/cores/dvdplayer/DVDPlayerAudio.cpp | 6 | ||||
-rw-r--r-- | xbmc/cores/omxplayer/OMXPlayerAudio.cpp | 4 | ||||
-rw-r--r-- | xbmc/cores/paplayer/PAPlayer.cpp | 3 | ||||
-rw-r--r-- | xbmc/guilib/GUIWindowManager.cpp | 2 |
15 files changed, 119 insertions, 14 deletions
diff --git a/Kodi.xcodeproj/project.pbxproj b/Kodi.xcodeproj/project.pbxproj index bf49f6402f..23164991fe 100644 --- a/Kodi.xcodeproj/project.pbxproj +++ b/Kodi.xcodeproj/project.pbxproj @@ -1255,6 +1255,9 @@ DF89901D1709BB2D00B35C21 /* MediaSourceSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF8990181709BB2D00B35C21 /* MediaSourceSettings.cpp */; }; DF89901E1709BB2D00B35C21 /* SkinSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF89901A1709BB2D00B35C21 /* SkinSettings.cpp */; }; DF8990211709BB5400B35C21 /* ViewStateSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF89901F1709BB5400B35C21 /* ViewStateSettings.cpp */; }; + DF923E5D1A11536A008CDB0C /* DataCacheCore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF923E5B1A11536A008CDB0C /* DataCacheCore.cpp */; }; + DF923E5E1A11536A008CDB0C /* DataCacheCore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF923E5B1A11536A008CDB0C /* DataCacheCore.cpp */; }; + DF923E5F1A11536A008CDB0C /* DataCacheCore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF923E5B1A11536A008CDB0C /* DataCacheCore.cpp */; }; DF93D65D1444A7A3007C6459 /* SlingboxDirectory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D65C1444A7A3007C6459 /* SlingboxDirectory.cpp */; }; DF93D6991444A8B1007C6459 /* AFPFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D6631444A8B0007C6459 /* AFPFile.cpp */; }; DF93D69A1444A8B1007C6459 /* DirectoryCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF93D6651444A8B0007C6459 /* DirectoryCache.cpp */; }; @@ -4955,6 +4958,8 @@ DF89901B1709BB2D00B35C21 /* SkinSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkinSettings.h; sourceTree = "<group>"; }; DF89901F1709BB5400B35C21 /* ViewStateSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ViewStateSettings.cpp; sourceTree = "<group>"; }; DF8990201709BB5400B35C21 /* ViewStateSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewStateSettings.h; sourceTree = "<group>"; }; + DF923E5B1A11536A008CDB0C /* DataCacheCore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DataCacheCore.cpp; sourceTree = "<group>"; }; + DF923E5C1A11536A008CDB0C /* DataCacheCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataCacheCore.h; sourceTree = "<group>"; }; DF93D65B1444A7A3007C6459 /* SlingboxDirectory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SlingboxDirectory.h; sourceTree = "<group>"; }; DF93D65C1444A7A3007C6459 /* SlingboxDirectory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SlingboxDirectory.cpp; sourceTree = "<group>"; }; DF93D6631444A8B0007C6459 /* AFPFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AFPFile.cpp; sourceTree = "<group>"; }; @@ -8724,6 +8729,8 @@ E38E15D20D25F9FA00618676 /* paplayer */, F5E56B11108284E6006E788A /* playercorefactory */, E38E16580D25F9FA00618676 /* VideoRenderers */, + DF923E5B1A11536A008CDB0C /* DataCacheCore.cpp */, + DF923E5C1A11536A008CDB0C /* DataCacheCore.h */, E38E14F60D25F9F900618676 /* DummyVideoPlayer.cpp */, E38E14F70D25F9F900618676 /* DummyVideoPlayer.h */, 7CF05049190A1D7200222135 /* FFmpeg.cpp */, @@ -11626,6 +11633,7 @@ 7CC7B6B61918699000DDB120 /* GUIDialogSettingsManagerBase.cpp in Sources */, 7CC7B6B91918699000DDB120 /* GUIDialogSettingsManualBase.cpp in Sources */, 7CC7B6C0191869EA00DDB120 /* SettingCreator.cpp in Sources */, + DF923E5D1A11536A008CDB0C /* DataCacheCore.cpp in Sources */, 7CC7B6C3191869EA00DDB120 /* SettingUtils.cpp in Sources */, 7CC7B6C819186A8800DDB120 /* SettingConditions.cpp in Sources */, 7CCDA0DB192753E30074CF51 /* PltAction.cpp in Sources */, @@ -13064,6 +13072,7 @@ 7CCDACA919275D1F0074CF51 /* NptStdcDebug.cpp in Sources */, 7CCDACB219275D1F0074CF51 /* NptStdcEnvironment.cpp in Sources */, 7CCDACC319275D790074CF51 /* NptAppleAutoreleasePool.mm in Sources */, + DF923E5F1A11536A008CDB0C /* DataCacheCore.cpp in Sources */, 7CCDACCC19275D790074CF51 /* NptAppleLogConfig.mm in Sources */, 7CAA469219427AED00008885 /* PosixDirectory.cpp in Sources */, 7C525DF7195E2D8100BE3482 /* SaveFileStateJob.cpp in Sources */, @@ -14054,6 +14063,7 @@ 7CCDA20A192753E30074CF51 /* ContentDirectorywSearchSCPD.cpp in Sources */, 7CCDA215192753E30074CF51 /* PltDidl.cpp in Sources */, 7CCDA21E192753E30074CF51 /* PltFileMediaServer.cpp in Sources */, + DF923E5E1A11536A008CDB0C /* DataCacheCore.cpp in Sources */, 7CCDA227192753E30074CF51 /* PltMediaBrowser.cpp in Sources */, 7CCDA230192753E30074CF51 /* PltMediaCache.cpp in Sources */, 7CCDA239192753E30074CF51 /* PltMediaItem.cpp in Sources */, diff --git a/project/VS2010Express/XBMC.vcxproj b/project/VS2010Express/XBMC.vcxproj index c29fb2f17b..098879e31d 100644 --- a/project/VS2010Express/XBMC.vcxproj +++ b/project/VS2010Express/XBMC.vcxproj @@ -217,6 +217,7 @@ <ClCompile Include="..\..\xbmc\cores\AudioEngine\Utils\AEPackIEC61937.cpp" /> <ClCompile Include="..\..\xbmc\cores\AudioEngine\Utils\AEStreamInfo.cpp" /> <ClCompile Include="..\..\xbmc\cores\AudioEngine\Utils\AEUtil.cpp" /> + <ClCompile Include="..\..\xbmc\cores\DataCacheCore.cpp" /> <ClCompile Include="..\..\xbmc\cores\dvdplayer\DVDCodecs\Audio\DVDAudioCodecPassthrough.cpp" /> <ClCompile Include="..\..\xbmc\cores\dvdplayer\DVDCodecs\Video\DVDVideoCodec.cpp" /> <ClCompile Include="..\..\xbmc\cores\dvdplayer\DVDDemuxers\DVDDemuxBXA.cpp" /> @@ -806,6 +807,7 @@ <ClInclude Include="..\..\xbmc\ApplicationPlayer.h" /> <ClInclude Include="..\..\xbmc\AppParamParser.h" /> <ClInclude Include="..\..\xbmc\CompileInfo.h" /> + <ClInclude Include="..\..\xbmc\cores\DataCacheCore.h" /> <CustomBuild Include="..\..\xbmc\GitRevision.h"> <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CALL update_git_rev.bat</Command> <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\xbmc\win32\git_rev.h</Outputs> diff --git a/project/VS2010Express/XBMC.vcxproj.filters b/project/VS2010Express/XBMC.vcxproj.filters index dbb9b9d41f..0a04d7f20f 100644 --- a/project/VS2010Express/XBMC.vcxproj.filters +++ b/project/VS2010Express/XBMC.vcxproj.filters @@ -3083,6 +3083,9 @@ <ClCompile Include="..\..\xbmc\video\videosync\VideoSyncD3D.cpp"> <Filter>video\videosync</Filter> </ClCompile> + <ClCompile Include="..\..\xbmc\cores\DataCacheCore.cpp"> + <Filter>cores</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="..\..\xbmc\win32\pch.h"> @@ -6034,6 +6037,9 @@ <ClInclude Include="..\..\xbmc\video\videosync\VideoSync.h"> <Filter>video\videosync</Filter> </ClInclude> + <ClInclude Include="..\..\xbmc\cores\DataCacheCore.h"> + <Filter>cores</Filter> + </ClInclude> </ItemGroup> <ItemGroup> <ResourceCompile Include="..\..\xbmc\win32\XBMC_PC.rc"> diff --git a/xbmc/GUIInfoManager.cpp b/xbmc/GUIInfoManager.cpp index 30f95cefb5..de3e2fec84 100644 --- a/xbmc/GUIInfoManager.cpp +++ b/xbmc/GUIInfoManager.cpp @@ -60,6 +60,7 @@ #include "URL.h" #include "addons/Skin.h" #include "boost/make_shared.hpp" +#include "cores/DataCacheCore.h" // stuff for current song #include "music/MusicInfoLoader.h" @@ -124,7 +125,6 @@ CGUIInfoManager::CGUIInfoManager(void) : m_playerShowCodec = false; m_playerShowInfo = false; m_fps = 0.0f; - m_AVInfoValid = false; ResetLibraryBools(); } @@ -1631,35 +1631,30 @@ CStdString CGUIInfoManager::GetLabel(int info, int contextWindow, std::string *f case VIDEOPLAYER_VIDEO_CODEC: if(g_application.m_pPlayer->IsPlaying()) { - UpdateAVInfo(); strLabel = m_videoInfo.videoCodecName; } break; case VIDEOPLAYER_VIDEO_RESOLUTION: if(g_application.m_pPlayer->IsPlaying()) { - UpdateAVInfo(); return CStreamDetails::VideoDimsToResolutionDescription(m_videoInfo.width, m_videoInfo.height); } break; case VIDEOPLAYER_AUDIO_CODEC: if(g_application.m_pPlayer->IsPlaying()) { - UpdateAVInfo(); strLabel = m_audioInfo.audioCodecName; } break; case VIDEOPLAYER_VIDEO_ASPECT: if (g_application.m_pPlayer->IsPlaying()) { - UpdateAVInfo(); strLabel = CStreamDetails::VideoAspectToAspectDescription(m_videoInfo.videoAspectRatio); } break; case VIDEOPLAYER_AUDIO_CHANNELS: if(g_application.m_pPlayer->IsPlaying()) { - UpdateAVInfo(); strLabel = StringUtils::Format("%i", m_audioInfo.channels); } break; @@ -1674,7 +1669,6 @@ CStdString CGUIInfoManager::GetLabel(int info, int contextWindow, std::string *f case VIDEOPLAYER_STEREOSCOPIC_MODE: if(g_application.m_pPlayer->IsPlaying()) { - UpdateAVInfo(); strLabel = m_videoInfo.stereoMode; } break; @@ -2652,7 +2646,6 @@ bool CGUIInfoManager::GetBool(int condition1, int contextWindow, const CGUIListI case VIDEOPLAYER_IS_STEREOSCOPIC: if(g_application.m_pPlayer->IsPlaying()) { - UpdateAVInfo(); bReturn = !m_videoInfo.stereoMode.empty(); } break; @@ -3617,7 +3610,6 @@ CStdString CGUIInfoManager::GetMusicLabel(int item) { if (!g_application.m_pPlayer->IsPlaying() || !m_currentFile->HasMusicInfoTag()) return ""; - UpdateAVInfo(); switch (item) { case MUSICPLAYER_PLAYLISTLEN: @@ -4321,7 +4313,7 @@ void CGUIInfoManager::UpdateAVInfo() { if(g_application.m_pPlayer->IsPlaying()) { - if (!m_AVInfoValid) + if (g_dataCacheCore.HasAVInfoChanges()) { SPlayerVideoStreamInfo video; SPlayerAudioStreamInfo audio; @@ -4331,7 +4323,6 @@ void CGUIInfoManager::UpdateAVInfo() m_videoInfo = video; m_audioInfo = audio; - m_AVInfoValid = true; } } } diff --git a/xbmc/GUIInfoManager.h b/xbmc/GUIInfoManager.h index 519c635f21..deef952bd3 100644 --- a/xbmc/GUIInfoManager.h +++ b/xbmc/GUIInfoManager.h @@ -849,8 +849,6 @@ public: /// \brief iterates through boolean conditions and compares their stored values to current values. Returns true if any condition changed value. bool ConditionsChangedValues(const std::map<INFO::InfoPtr, bool>& map); - bool m_AVInfoValid; - protected: friend class INFO::InfoSingle; bool GetBool(int condition, int contextWindow = 0, const CGUIListItem *item=NULL); diff --git a/xbmc/SystemGlobals.cpp b/xbmc/SystemGlobals.cpp index 6166bd8060..0335613ce6 100644 --- a/xbmc/SystemGlobals.cpp +++ b/xbmc/SystemGlobals.cpp @@ -19,6 +19,7 @@ */ #include "system.h" #include "cores/VideoRenderers/RenderManager.h" +#include "cores/DataCacheCore.h" #include "input/MouseStat.h" #include "Application.h" #include "GUILargeTextureManager.h" @@ -85,3 +86,5 @@ #endif CZipManager g_ZipManager; + CDataCacheCore g_dataCacheCore; + diff --git a/xbmc/cores/DataCacheCore.cpp b/xbmc/cores/DataCacheCore.cpp new file mode 100644 index 0000000000..68cf2fb1c6 --- /dev/null +++ b/xbmc/cores/DataCacheCore.cpp @@ -0,0 +1,38 @@ +/* +* Copyright (C) 2005-2014 Team XBMC +* http://xbmc.org +* +* This Program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2, or (at your option) +* any later version. +* +* This Program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with XBMC; see the file COPYING. If not, see +* <http://www.gnu.org/licenses/>. +* +*/ + +#include "cores/DataCacheCore.h" + +bool CDataCacheCore::HasAVInfoChanges() +{ + bool ret = m_hasAVInfoChanges; + m_hasAVInfoChanges = false; + return ret; +} + +void CDataCacheCore::SignalVideoInfoChange() +{ + m_hasAVInfoChanges = true; +} + +void CDataCacheCore::SignalAudioInfoChange() +{ + m_hasAVInfoChanges = true; +}
\ No newline at end of file diff --git a/xbmc/cores/DataCacheCore.h b/xbmc/cores/DataCacheCore.h new file mode 100644 index 0000000000..0df013d2b6 --- /dev/null +++ b/xbmc/cores/DataCacheCore.h @@ -0,0 +1,34 @@ +#pragma once + +/* +* Copyright (C) 2005-2014 Team XBMC +* http://xbmc.org +* +* This Program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2, or (at your option) +* any later version. +* +* This Program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with XBMC; see the file COPYING. If not, see +* <http://www.gnu.org/licenses/>. +* +*/ + +class CDataCacheCore +{ +public: + bool HasAVInfoChanges(); + void SignalVideoInfoChange(); + void SignalAudioInfoChange(); + +protected: + volatile bool m_hasAVInfoChanges; +}; + +extern CDataCacheCore g_dataCacheCore;
\ No newline at end of file diff --git a/xbmc/cores/Makefile.in b/xbmc/cores/Makefile.in index c77beeb379..bdba155707 100644 --- a/xbmc/cores/Makefile.in +++ b/xbmc/cores/Makefile.in @@ -1,5 +1,6 @@ SRCS = DummyVideoPlayer.cpp SRCS += FFmpeg.cpp +SRCS += DataCacheCore.cpp LIB = cores.a diff --git a/xbmc/cores/VideoRenderers/RenderManager.cpp b/xbmc/cores/VideoRenderers/RenderManager.cpp index 529f62feb4..cd6a4baab9 100644 --- a/xbmc/cores/VideoRenderers/RenderManager.cpp +++ b/xbmc/cores/VideoRenderers/RenderManager.cpp @@ -38,6 +38,7 @@ #include "settings/MediaSettings.h" #include "settings/Settings.h" #include "guilib/GUIFontManager.h" +#include "cores/DataCacheCore.h" #if defined(HAS_GL) #include "LinuxRendererGL.h" @@ -644,6 +645,7 @@ void CXBMCRenderManager::SetViewMode(int iViewMode) CSharedLock lock(m_sharedSection); if (m_pRenderer) m_pRenderer->SetViewMode(iViewMode); + g_dataCacheCore.SignalVideoInfoChange(); } void CXBMCRenderManager::FlipPage(volatile bool& bStop, double timestamp /* = 0LL*/, int source /*= -1*/, EFIELDSYNC sync /*= FS_NONE*/) @@ -863,6 +865,7 @@ void CXBMCRenderManager::UpdateResolution() g_graphicsContext.SetVideoResolution(res); } m_bReconfigured = false; + g_dataCacheCore.SignalVideoInfoChange(); } } diff --git a/xbmc/cores/dvdplayer/DVDPlayer.cpp b/xbmc/cores/dvdplayer/DVDPlayer.cpp index 63cbe661b5..e647078995 100644 --- a/xbmc/cores/dvdplayer/DVDPlayer.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayer.cpp @@ -45,6 +45,7 @@ #include "utils/URIUtils.h" #include "GUIInfoManager.h" +#include "cores/DataCacheCore.h" #include "guilib/GUIWindowManager.h" #include "guilib/StereoscopicsManager.h" #include "Application.h" @@ -486,6 +487,8 @@ void CSelectionStreams::Update(CDVDInputStream* input, CDVDDemux* demuxer, std:: Update(s); } } + g_dataCacheCore.SignalAudioInfoChange(); + g_dataCacheCore.SignalVideoInfoChange(); } void CDVDPlayer::CreatePlayers() @@ -3230,6 +3233,9 @@ bool CDVDPlayer::OpenStream(CCurrentStream& current, int iStream, int source, bo } } + g_dataCacheCore.SignalAudioInfoChange(); + g_dataCacheCore.SignalVideoInfoChange(); + return res; } diff --git a/xbmc/cores/dvdplayer/DVDPlayerAudio.cpp b/xbmc/cores/dvdplayer/DVDPlayerAudio.cpp index 98da461d3b..f567518c4f 100644 --- a/xbmc/cores/dvdplayer/DVDPlayerAudio.cpp +++ b/xbmc/cores/dvdplayer/DVDPlayerAudio.cpp @@ -31,6 +31,7 @@ #include "utils/MathUtils.h" #include "cores/AudioEngine/AEFactory.h" #include "cores/AudioEngine/Utils/AEUtil.h" +#include "cores/DataCacheCore.h" #include <sstream> #include <iomanip> @@ -196,6 +197,8 @@ void CDVDPlayerAudio::OpenStream( CDVDStreamInfo &hints, CDVDAudioCodec* codec ) m_silence = false; m_maxspeedadjust = CSettings::Get().GetNumber("videoplayer.maxspeedadjust"); + + g_dataCacheCore.SignalAudioInfoChange(); } void CDVDPlayerAudio::CloseStream(bool bWaitForBuffers) @@ -554,6 +557,8 @@ void CDVDPlayerAudio::Process() CLog::Log(LOGERROR, "%s - failed to create audio renderer", __FUNCTION__); m_streaminfo.channels = audioframe.passthrough ? audioframe.encoded_channel_count : audioframe.channel_count; + + g_dataCacheCore.SignalAudioInfoChange(); } // Zero out the frame data if we are supposed to silence the audio @@ -786,6 +791,7 @@ bool CDVDPlayerAudio::SwitchCodecIfNeeded() delete m_pAudioCodec; m_pAudioCodec = codec; + return true; } diff --git a/xbmc/cores/omxplayer/OMXPlayerAudio.cpp b/xbmc/cores/omxplayer/OMXPlayerAudio.cpp index f1208e683f..a83fda8790 100644 --- a/xbmc/cores/omxplayer/OMXPlayerAudio.cpp +++ b/xbmc/cores/omxplayer/OMXPlayerAudio.cpp @@ -43,6 +43,7 @@ #include "DVDPlayer.h" #include "linux/RBP.h" #include "cores/AudioEngine/AEFactory.h" +#include "cores/DataCacheCore.h" #include <iostream> #include <sstream> @@ -145,6 +146,8 @@ void OMXPlayerAudio::OpenStream(CDVDStreamInfo &hints, COMXAudioCodecOMX *codec) m_format.m_dataFormat = GetDataFormat(m_hints); m_format.m_sampleRate = 0; m_format.m_channelLayout = 0; + + g_dataCacheCore.SignalAudioInfoChange(); } void OMXPlayerAudio::CloseStream(bool bWaitForBuffers) @@ -206,6 +209,7 @@ bool OMXPlayerAudio::CodecChange() (!m_passthrough && minor_change) || !m_DecoderOpen) { m_hints_current = m_hints; + g_dataCacheCore.SignalAudioInfoChange(); return true; } diff --git a/xbmc/cores/paplayer/PAPlayer.cpp b/xbmc/cores/paplayer/PAPlayer.cpp index 3802173bc7..4349ff6878 100644 --- a/xbmc/cores/paplayer/PAPlayer.cpp +++ b/xbmc/cores/paplayer/PAPlayer.cpp @@ -33,6 +33,7 @@ #include "cores/AudioEngine/AEFactory.h" #include "cores/AudioEngine/Utils/AEUtil.h" #include "cores/AudioEngine/Interfaces/AEStream.h" +#include "cores/DataCacheCore.h" #define TIME_TO_CACHE_NEXT_FILE 5000 /* 5 seconds before end of song, start caching the next song */ #define FAST_XFADE_TIME 80 /* 80 milliseconds */ @@ -1064,6 +1065,8 @@ void PAPlayer::UpdateGUIData(StreamInfo *si) total = m_currentStream->m_endOffset; total -= m_currentStream->m_startOffset; m_playerGUIData.m_totalTime = total; + + g_dataCacheCore.SignalAudioInfoChange(); } void PAPlayer::OnJobComplete(unsigned int jobID, bool success, CJob *job) diff --git a/xbmc/guilib/GUIWindowManager.cpp b/xbmc/guilib/GUIWindowManager.cpp index 969626c90e..788bbe9c34 100644 --- a/xbmc/guilib/GUIWindowManager.cpp +++ b/xbmc/guilib/GUIWindowManager.cpp @@ -639,7 +639,7 @@ void CGUIWindowManager::FrameMove() for (iDialog it = dialogs.begin(); it != dialogs.end(); ++it) (*it)->FrameMove(); - g_infoManager.m_AVInfoValid = false; + g_infoManager.UpdateAVInfo(); } CGUIWindow* CGUIWindowManager::GetWindow(int id) const |