before_code
stringlengths
14
465k
reviewer_comment
stringlengths
16
64.5k
after_code
stringlengths
9
467k
diff_context
stringlengths
0
97k
file_path
stringlengths
5
226
comment_line
int32
0
26
language
stringclasses
37 values
quality_score
float32
0.07
1
comment_type
stringclasses
9 values
comment_length
int32
16
64.5k
before_lines
int32
1
17.2k
after_lines
int32
1
12.1k
is_negative
bool
2 classes
pr_title
stringlengths
1
308
pr_number
int32
1
299k
repo_name
stringclasses
533 values
repo_stars
int64
321
419k
repo_language
stringclasses
27 values
reviewer_username
stringlengths
0
39
author_username
stringlengths
2
39
ssize_t Write(const void* bufPtr, size_t bufSize); void Flush(); int64_t Seek(int64_t iFilePosition, int iWhence = SEEK_SET); int Truncate(int64_t iSize); int64_t GetPosition() const; int64_t GetLength(); void Close(); int GetChunkSize(); const std::string GetProperty(XFILE::FileProperty type, const s...
No issues found.
ssize_t Write(const void* bufPtr, size_t bufSize); void Flush(); int64_t Seek(int64_t iFilePosition, int iWhence = SEEK_SET); int Truncate(int64_t iSize); int64_t GetPosition() const; int64_t GetLength(); void Close(); int GetChunkSize(); const std::string GetProperty(XFILE::FileProperty type, const s...
@@ -72,6 +72,14 @@ class CFile * or undetectable error occur, -1 in case of any explicit error */ ssize_t Read(void* bufPtr, size_t bufSize); + + /*! + * \brief String reading by line + * \param line[OUT] The line read + * \return True if has success, otherwise false for EOF or error + */ + ...
xbmc/filesystem/File.h
0
C/C++
1
none
16
51
51
true
[Playlist][M3U] Fix long line reading
25,798
xbmc/xbmc
17,740
C++
CastagnaIT
SetUserrating(iItem); } } void CGUIDialogVideoInfo::PlayTrailer() { Close(true); CGUIMessage msg(GUI_MSG_PLAY_TRAILER, 0, 0, 0, 0, m_movieItem); CServiceBroker::GetGUI()->GetWindowManager().SendThreadMessage(msg); } void CGUIDialogVideoInfo::SetLabel(int iControl, const std::string &strLabel) { if (str...
No issues found.
SetUserrating(iItem); } } void CGUIDialogVideoInfo::PlayTrailer() { Close(true); CGUIMessage msg(GUI_MSG_PLAY_TRAILER, 0, 0, 0, 0, m_movieItem); CServiceBroker::GetGUI()->GetWindowManager().SendThreadMessage(msg); } void CGUIDialogVideoInfo::SetLabel(int iControl, const std::string &strLabel) { if (str...
@@ -863,8 +863,9 @@ void AddHardCodedAndExtendedArtTypes(std::vector<std::string>& artTypes, const C } // Add art types currently assigned to the media item -void AddCurrentArtTypes(std::vector<std::string>& artTypes, const CVideoInfoTag& tag, - CVideoDatabase& db) +void AddCurrentArtTypes(std::vector<std::string>...
xbmc/video/dialogs/GUIDialogVideoInfo.cpp
0
C++
1
none
16
51
51
true
[Art] Fix #25601 - Refresh art after update in information dialog
25,812
xbmc/xbmc
17,740
C++
78andyp
{ CLog::LogF(LOGFATAL, "CLangInfo: failed to load {} language information", language); return false; } CLog::Log(LOGINFO, "CLangInfo: loading {} language strings...", language); if (!g_localizeStrings.Load(GetLanguagePath(), language)) { CLog::LogF(LOGFATAL, "CLangInfo: failed to load {} language...
No issues found.
{ CLog::LogF(LOGFATAL, "CLangInfo: failed to load {} language information", language); return false; } CLog::Log(LOGINFO, "CLangInfo: loading {} language strings...", language); if (!g_localizeStrings.Load(GetLanguagePath(), language)) { CLog::LogF(LOGFATAL, "CLangInfo: failed to load {} language...
@@ -801,12 +801,12 @@ bool CLangInfo::SetLanguage(std::string language /* = "" */, bool reloadServices return true; } -const std::string& CLangInfo::GetAudioLanguage() const +const std::string& CLangInfo::GetAudioLanguage(bool allowFallback) const { - if (!m_audioLanguage.empty()) - return m_audioLanguage; +...
xbmc/LangInfo.cpp
0
C++
1
none
16
51
51
true
[VideoPlayer] Fix and improve subtitle stream selection
25,813
xbmc/xbmc
17,740
C++
CastagnaIT
pPacket = Decode(); return pPacket; } if (pSrcPacket->pts == DVD_NOPTS_VALUE) { return pPacket; } while (!m_ccTempBuffer.empty()) { m_ccReorderBuffer.push_back(m_ccTempBuffer.back()); m_ccTempBuffer.pop_back(); } while ((len = pSrcPacket->iSize - p) > 3) { if ((startcode & 0x...
No issues found.
pPacket = Decode(); return pPacket; } if (pSrcPacket->pts == DVD_NOPTS_VALUE) { return pPacket; } while (!m_ccTempBuffer.empty()) { m_ccReorderBuffer.push_back(m_ccTempBuffer.back()); m_ccTempBuffer.pop_back(); } while ((len = pSrcPacket->iSize - p) > 3) { if ((startcode & 0x...
@@ -485,7 +485,8 @@ DemuxPacket* CDVDDemuxCC::Decode() pPacket = CDVDDemuxUtils::AllocateDemuxPacket(data.size()); pPacket->iSize = data.size(); - memcpy(pPacket->pData, data.c_str(), pPacket->iSize); + if (pPacket->iSize) + memcpy(pPacket->pData, data.c_str(), pPacket->iSize)...
xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxCC.cpp
0
C++
1
none
16
51
51
true
Fix some UB like memcpy(NULL, NULL, 0)
25,820
xbmc/xbmc
17,740
C++
hribz
~CGUIPassword(void) override; template<typename T> bool IsItemUnlocked(T pItem, const std::string& strType, const std::string& strLabel, const std::string& strHeading); /*! \brief Tests if the user is allowed to access the share folder \param ...
No issues found.
~CGUIPassword(void) override; template<typename T> bool IsItemUnlocked(T pItem, const std::string& strType, const std::string& strLabel, const std::string& strHeading); /*! \brief Tests if the user is allowed to access the share folder \param ...
@@ -60,6 +60,8 @@ class CGUIPassword : public ISettingCallback */ bool CheckSettingLevelLock(const SettingLevel& level, bool enforce = false); bool CheckMenuLock(int iWindowID); + bool IsVideoUnlocked(); + bool IsMusicUnlocked(); bool SetMasterLockMode(bool bDetails=true); bool LockSource(const std::s...
xbmc/GUIPassword.h
0
C/C++
1
none
16
51
51
true
[Password] Improve media lock checks (including recently added videos)
25,828
xbmc/xbmc
17,740
C++
78andyp
return; default: break; } } break; default: // we are in no state, should not happen CLog::Log(LOGERROR, "CActiveAESink::{} - no valid state: {}", __FUNCTION__, m_state); return; } } // for } void CActiveAESink::Process() { Message *msg = nullptr...
No issues found.
return; default: break; } } break; default: // we are in no state, should not happen CLog::Log(LOGERROR, "CActiveAESink::{} - no valid state: {}", __FUNCTION__, m_state); return; } } // for } void CActiveAESink::Process() { Message *msg = nullptr...
@@ -1207,12 +1207,7 @@ void CActiveAESink::SetSilenceTimer() m_extSilenceTimeout = XbmcThreads::EndTime<decltype(m_extSilenceTimeout)>::Max(); else if (m_extAppFocused) // handles no playback/GUI and playback in pause and seek { - // only true with AudioTrack RAW + passthrough + TrueHD - const bool noS...
xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAESink.cpp
0
C++
1
none
16
51
51
true
AudioTrack: Revisit pause bursts and delay
25,829
xbmc/xbmc
17,740
C++
fritsch
Player = 0x001, Playlist = 0x002, GUI = 0x004, System = 0x008, VideoLibrary = 0x010, AudioLibrary = 0x020, Application = 0x040, Input = 0x080, PVR = 0x100, Other = 0x200, Info = 0x400, Sources = 0x800 }; const auto ANNOUNCE_ALL = (Player | Playlist | GUI | System | VideoLibrary | AudioLibrary |...
No issues found.
Player = 0x001, Playlist = 0x002, GUI = 0x004, System = 0x008, VideoLibrary = 0x010, AudioLibrary = 0x020, Application = 0x040, Input = 0x080, PVR = 0x100, Other = 0x200, Info = 0x400, Sources = 0x800 }; const auto ANNOUNCE_ALL = (Player | Playlist | GUI | System | VideoLibrary | AudioLibrary |...
@@ -13,33 +13,35 @@ class CVariant; namespace ANNOUNCEMENT { - enum AnnouncementFlag - { - Player = 0x001, - Playlist = 0x002, - GUI = 0x004, - System = 0x008, - VideoLibrary = 0x010, - AudioLibrary = 0x020, - Application = 0x040, - Input = 0x080, - ...
xbmc/interfaces/IAnnouncer.h
0
C/C++
1
none
16
51
51
true
[GUI] Introduce GUI Announcement Handlers
25,831
xbmc/xbmc
17,740
C++
enen92
rect.x2 * xFactor + xOffset, rect.y2 * yFactor + yOffset); } void CRenderSystemGLES::SetScissors(const CRect &rect) { if (!m_bRenderCreated) return; GLint x1 = MathUtils::round_int(static_cast<double>(rect.x1)); GLint y1 = MathUtils::round_int(static_cast<double>(rect.y1)); GL...
No issues found.
rect.x2 * xFactor + xOffset, rect.y2 * yFactor + yOffset); } void CRenderSystemGLES::SetScissors(const CRect &rect) { if (!m_bRenderCreated) return; GLint x1 = MathUtils::round_int(static_cast<double>(rect.x1)); GLint y1 = MathUtils::round_int(static_cast<double>(rect.y1)); GL...
@@ -470,6 +470,15 @@ void CRenderSystemGLES::InitialiseShaders() CLog::Log(LOGERROR, "GUI Shader gles_shader_texture.frag - compile and link failed"); } + m_pShader[ShaderMethodGLES::SM_TEXTURE_111R] = + std::make_unique<CGLESShader>("gles_shader_texture_111r.frag", defines); + if (!m_pShader[ShaderMet...
xbmc/rendering/gles/RenderSystemGLES.cpp
0
C++
1
none
16
51
51
true
GLES: Implement shader based 111R swizzle
25,855
xbmc/xbmc
17,740
C++
sarbes
// "Playlists" if (m_vecItems->IsPath("special://videoplaylists/")) strLabel = g_localizeStrings.Get(136); // "{Playlist Name}" else if (PLAYLIST::IsPlayList(*m_vecItems)) { // get playlist name from path std::string strDummy; URIUtils::Split(m_vecItems->GetPath(), strDummy, strLabel); } ...
No issues found.
// "Playlists" if (m_vecItems->IsPath("special://videoplaylists/")) strLabel = g_localizeStrings.Get(136); // "{Playlist Name}" else if (PLAYLIST::IsPlayList(*m_vecItems)) { // get playlist name from path std::string strDummy; URIUtils::Split(m_vecItems->GetPath(), strDummy, strLabel); } ...
@@ -712,9 +712,7 @@ void CGUIWindowVideoNav::OnDeleteItem(const CFileItemPtr& pItem) m_vecItems->IsPath("special://videoplaylists/")) { pItem->m_bIsFolder = false; - CGUIComponent *gui = CServiceBroker::GetGUI(); - if (gui && gui->ConfirmDelete(pItem->GetPath())) - CFileUtils::DeleteItem(...
xbmc/video/windows/GUIWindowVideoNav.cpp
0
C++
1
none
16
51
51
true
Enable/disable media file delete confirmation
25,857
xbmc/xbmc
17,740
C++
bnk1
CSettings::SETTING_MUSICPLAYER_SEEKDELAY, CSettings::SETTING_MUSICPLAYER_SEEKSTEPS}); settingsMgr->AddDynamicCondition("isplaying", IsPlaying, appPlayer.get()); settings->RegisterSubSettings(this); } void CApplicationSettingsHandling::UnregisterSettings() { const std::shared_ptr<CSettings> settings = CS...
No issues found.
CSettings::SETTING_MUSICPLAYER_SEEKDELAY, CSettings::SETTING_MUSICPLAYER_SEEKSTEPS}); settingsMgr->AddDynamicCondition("isplaying", IsPlaying, appPlayer.get()); settings->RegisterSubSettings(this); } void CApplicationSettingsHandling::UnregisterSettings() { const std::shared_ptr<CSettings> settings = CS...
@@ -66,6 +66,7 @@ void CApplicationSettingsHandling::RegisterSettings() CSettings::SETTING_VIDEOSCREEN_TESTPATTERN, CSettings::SETTING_VIDEOPLAYER_USEMEDIACODEC, CSettings::SETTING_VIDEOPLAYER_USEMEDI...
xbmc/application/ApplicationSettingsHandling.cpp
0
C++
1
none
16
51
51
true
[Android] Setting to enable/disable the Decoderfilter
25,862
xbmc/xbmc
17,740
C++
joseluismarti
const CVariant& data) { CLog::Log(LOGDEBUG, LOGANNOUNCE, "CAnnouncementManager - Announcement: {} from {}", message, sender); std::unique_lock<CCriticalSection> lock(m_announcersCritSection); // Make a copy of announcers. They may be removed or even remove themselves during...
No issues found.
const CVariant& data) { CLog::Log(LOGDEBUG, LOGANNOUNCE, "CAnnouncementManager - Announcement: {} from {}", message, sender); std::unique_lock<CCriticalSection> lock(m_announcersCritSection); // Make a copy of announcers. They may be removed or even remove themselves during...
@@ -54,12 +54,17 @@ void CAnnouncementManager::Deinitialize() } void CAnnouncementManager::AddAnnouncer(IAnnouncer *listener) +{ + return AddAnnouncer(listener, ANNOUNCE_ALL); +} + +void CAnnouncementManager::AddAnnouncer(IAnnouncer* listener, int flagMask) { if (!listener) return; std::unique_lock<C...
xbmc/interfaces/AnnouncementManager.cpp
0
C++
1
none
16
51
51
true
Announcements: Allow Announcer receivers to register only for the types they are actually interested in
25,874
xbmc/xbmc
17,740
C++
enen92
return; glScissor((GLint) viewPort.x1, (GLint) (m_height - viewPort.y1 - viewPort.Height()), (GLsizei) viewPort.Width(), (GLsizei) viewPort.Height()); glViewport((GLint) viewPort.x1, (GLint) (m_height - viewPort.y1 - viewPort.Height()), (GLsizei) viewPort.Width(), (GLsizei) viewPort.Height()); m_viewPort[0] ...
No issues found.
return; glScissor((GLint) viewPort.x1, (GLint) (m_height - viewPort.y1 - viewPort.Height()), (GLsizei) viewPort.Width(), (GLsizei) viewPort.Height()); glViewport((GLint) viewPort.x1, (GLint) (m_height - viewPort.y1 - viewPort.Height()), (GLsizei) viewPort.Width(), (GLsizei) viewPort.Height()); m_viewPort[0] ...
@@ -11,6 +11,7 @@ #include "URL.h" #include "guilib/DirtyRegion.h" #include "guilib/GUITextureGLES.h" +#include "platform/MessagePrinter.h" #include "rendering/MatrixGL.h" #include "settings/AdvancedSettings.h" #include "settings/SettingsComponent.h" @@ -23,8 +24,6 @@ #include "utils/log.h" #include "windowing/...
xbmc/rendering/gles/RenderSystemGLES.cpp
0
C++
1
none
16
51
51
true
Shut down gracefully if OpenGL context is not properly set up
25,930
xbmc/xbmc
17,740
C++
basilgello
static void StatToStatI64(struct _stati64 *result, struct stat *stat); static void StatToStat64(struct __stat64 *result, const struct stat *stat); static void Stat64ToStatI64(struct _stati64 *result, struct __stat64 *stat); static void StatI64ToStat64(struct __stat64 *result, struct _stati64 *stat); static vo...
No issues found.
static void StatToStatI64(struct _stati64 *result, struct stat *stat); static void StatToStat64(struct __stat64 *result, const struct stat *stat); static void Stat64ToStatI64(struct _stati64 *result, struct __stat64 *stat); static void StatI64ToStat64(struct __stat64 *result, struct _stati64 *stat); static vo...
@@ -17,10 +17,17 @@ #include <string.h> #include <vector> -// A list of filesystem types for LegalPath/FileName -#define LEGAL_NONE 0 -#define LEGAL_WIN32_COMPAT 1 -#define LEGAL_FATX 2 +//! \brief Enumeration of filesystem types for LegalPath/FileName +enum class LegalPath +{ + NONE, + W...
xbmc/Util.h
0
C/C++
1
none
16
51
51
true
LegalPath: change defines to an enum class
25,938
xbmc/xbmc
17,740
C++
notspiff
m_pDS2->exec( PrepareSQL("UPDATE videoversion SET idType = %i WHERE idType = %i", newId, typeId)); } m_pDS2->exec(PrepareSQL("DELETE FROM videoversiontype WHERE id = %i", typeId)); m_pDS->next(); } m_pDS->close(); } if (iVersion < 133) { // Remove episodes with i...
No issues found.
m_pDS2->exec( PrepareSQL("UPDATE videoversion SET idType = %i WHERE idType = %i", newId, typeId)); } m_pDS2->exec(PrepareSQL("DELETE FROM videoversiontype WHERE id = %i", typeId)); m_pDS->next(); } m_pDS->close(); } if (iVersion < 133) { // Remove episodes with i...
@@ -3693,21 +3693,24 @@ void CVideoDatabase::DeleteBookMarkForEpisode(const CVideoInfoTag& tag) } //******************************************************************************************************************************** -void CVideoDatabase::DeleteMovie(int idMovie, +bool CVideoDatabase::DeleteMovie(int id...
xbmc/video/VideoDatabase.cpp
0
C++
1
none
16
51
51
true
[Video] A few video extras fixes
25,945
xbmc/xbmc
17,740
C++
CrystalP
m_bitStreamStats->AddSampleBytes(nBytes); return nBytes; } else { const ssize_t nBytes = m_pBuffer->sgetn((char*)lpBuf, uiBufSize); if (m_bitStreamStats && nBytes>0) m_bitStreamStats->AddSampleBytes(nBytes); return nBytes; } } try { if(m_flags & READ_TR...
No issues found.
m_bitStreamStats->AddSampleBytes(nBytes); return nBytes; } else { const ssize_t nBytes = m_pBuffer->sgetn((char*)lpBuf, uiBufSize); if (m_bitStreamStats && nBytes>0) m_bitStreamStats->AddSampleBytes(nBytes); return nBytes; } } try { if(m_flags & READ_TR...
@@ -765,60 +765,28 @@ int64_t CFile::GetPosition() const return -1; } -bool XFILE::CFile::ReadString(std::vector<char>& line) +bool XFILE::CFile::ReadLine(std::string& line) { if (!m_pFile) return false; line.clear(); - if (m_pBuffer) - { - using traits = CFileStreamBuffer::traits_type; - ...
xbmc/filesystem/File.cpp
0
C++
1
none
16
51
51
true
[IFile][CFile] Rework `ReadString` into `ReadLine`
25,982
xbmc/xbmc
17,740
C++
neo1973
\sa SetVideoSettings */ bool GetVideoSettings(int idFile, CVideoSettings &settings); /*! \brief Get video settings for the specified file item \param item item to get the settings for \return true if video settings found, false otherwise \sa SetVideoSettings */ bool GetVideoSettings(const CFile...
No issues found.
\sa SetVideoSettings */ bool GetVideoSettings(int idFile, CVideoSettings &settings); /*! \brief Get video settings for the specified file item \param item item to get the settings for \return true if video settings found, false otherwise \sa SetVideoSettings */ bool GetVideoSettings(const CFile...
@@ -988,9 +988,16 @@ class CVideoDatabase : public CDatabase } } - void SetArtForItem(int mediaId, const MediaType &mediaType, const std::string &artType, const std::string &url); - void SetArtForItem(int mediaId, const MediaType &mediaType, const std::map<std::string, std::string> &art); - bool GetArtForI...
xbmc/video/VideoDatabase.h
0
C/C++
1
none
16
51
51
true
[video] Scan art for video extras
25,983
xbmc/xbmc
17,740
C++
CrystalP
void CGUIWindowManager::CloseInternalModalDialogs(bool forceClose) const { std::unique_lock<CCriticalSection> lock(CServiceBroker::GetWinSystem()->GetGfxContext()); if (m_activeDialogs.empty()) return; auto activeDialogs = m_activeDialogs; for (const auto& window : activeDialogs) { if (window->IsModa...
No issues found.
void CGUIWindowManager::CloseInternalModalDialogs(bool forceClose) const { std::unique_lock<CCriticalSection> lock(CServiceBroker::GetWinSystem()->GetGfxContext()); if (m_activeDialogs.empty()) return; auto activeDialogs = m_activeDialogs; for (const auto& window : activeDialogs) { if (window->IsModa...
@@ -1367,7 +1367,6 @@ bool CGUIWindowManager::Render() m_tracker.CleanMarkedRegions(10); CDirtyRegionList dirtyRegions = m_tracker.GetDirtyRegions(); - CServiceBroker::GetWinSystem()->SetDirtyRegions(dirtyRegions); bool hasRendered = false; // If we visualize the regions we will always render the ent...
xbmc/guilib/GUIWindowManager.cpp
0
C++
1
none
16
51
51
true
Fix rendering for EGL_KHR_partial_update enabled platforms
26,007
xbmc/xbmc
17,740
C++
sarbes
/* * Copyright (C) 2013-2018 Team Kodi * This file is part of Kodi - https://kodi.tv * * SPDX-License-Identifier: GPL-2.0-or-later * See LICENSES/README.md for more information. */ #pragma once #include <string> typedef struct Translator Translator; class CURL; /*! \brief Translates old internal paths i...
No issues found.
/* * Copyright (C) 2013-2018 Team Kodi * This file is part of Kodi - https://kodi.tv * * SPDX-License-Identifier: GPL-2.0-or-later * See LICENSES/README.md for more information. */ #pragma once #include <string> typedef struct Translator Translator; class CURL; /*! \brief Translates old internal paths i...
@@ -30,18 +30,15 @@ class CLegacyPathTranslation \param legacyPath Path in the old videodb:// format using numbers \return Path in the new videodb:// format using descriptive strings */ - static std::string TranslateVideoDbPath(const CURL &legacyPath); - static std::string TranslateVideoDbPath(const std::...
xbmc/utils/LegacyPathTranslation.h
0
C/C++
1
none
16
45
45
true
LegacyPathTranslation: modernize
26,009
xbmc/xbmc
17,740
C++
notspiff
m_textChangeActions.ExecuteActions(GetID(), GetParentID()); } SetInvalid(); } void CGUIEditControl::SetInputType(CGUIEditControl::INPUT_TYPE type, const CVariant& heading) { m_inputType = type; if (heading.isString()) m_inputHeading = heading.asString(); else if (heading.isInteger() && heading.asInt...
No issues found.
m_textChangeActions.ExecuteActions(GetID(), GetParentID()); } SetInvalid(); } void CGUIEditControl::SetInputType(CGUIEditControl::INPUT_TYPE type, const CVariant& heading) { m_inputType = type; if (heading.isString()) m_inputHeading = heading.asString(); else if (heading.isInteger() && heading.asInt...
@@ -353,12 +353,13 @@ void CGUIEditControl::OnClick() } case INPUT_TYPE_DATE: { - CDateTime dateTime; - dateTime.SetFromDBDate(utf8); - if (dateTime < CDateTime(2000,1, 1, 0, 0, 0)) - dateTime = CDateTime(2000, 1, 1, 0, 0, 0); KODI::TIME::SystemTime date; - dateTime.GetA...
xbmc/guilib/GUIEditControl.cpp
0
C++
1
none
16
51
51
true
[guilib] Smart Playlist Rule Dialog Improvements
26,010
xbmc/xbmc
17,740
C++
CrystalP
//if rendering this capture continuously, and readout is async, render a new capture immediately if (capture->IsAsync() && !(capture->GetFlags() & CAPTUREFLAG_IMMEDIATELY)) RenderCapture(capture); } ++it; } else { ++it; } } if (m_captures.empty()) m_...
No issues found.
//if rendering this capture continuously, and readout is async, render a new capture immediately if (capture->IsAsync() && !(capture->GetFlags() & CAPTUREFLAG_IMMEDIATELY)) RenderCapture(capture); } ++it; } else { ++it; } } if (m_captures.empty()) m_...
@@ -10,7 +10,6 @@ /* to use the same as player */ #include "../VideoPlayer/DVDClock.h" -#include "../VideoPlayer/DVDCodecs/Video/DVDVideoCodec.h" #include "RenderCapture.h" #include "RenderFactory.h" #include "RenderFlags.h" @@ -98,15 +97,8 @@ bool CRenderManager::Configure(const VideoPicture& picture, float fps...
xbmc/cores/VideoPlayer/VideoRenderers/RenderManager.cpp
0
C++
1
none
16
51
51
true
RenderManager: improve VideoPicture comparison for HDR
26,028
xbmc/xbmc
17,740
C++
thexai
/* * Copyright (C) 2005-2018 Team Kodi * This file is part of Kodi - https://kodi.tv * * SPDX-License-Identifier: GPL-2.0-or-later * See LICENSES/README.md for more information. */ #pragma once #include "guilib/GUIWindow.h" #include <string> #include <vector> class CGUIWindowSystemInfo : public CGUIWindow...
No issues found.
/* * Copyright (C) 2005-2018 Team Kodi * This file is part of Kodi - https://kodi.tv * * SPDX-License-Identifier: GPL-2.0-or-later * See LICENSES/README.md for more information. */ #pragma once #include "guilib/GUIWindow.h" #include <string> #include <vector> class CGUIWindowSystemInfo : public CGUIWindow...
@@ -24,6 +24,8 @@ class CGUIWindowSystemInfo : public CGUIWindow int m_section; void ResetLabels(); void SetControlLabel(int id, const char *format, int label, int info); + void LoadPrivacyPolicy(); std::vector<std::string> m_diskUsage; + bool m_privacyPolicyLoaded{false}; };
xbmc/windows/GUIWindowSystemInfo.h
0
C/C++
1
none
16
32
32
true
System Info: Two improvements
26,034
xbmc/xbmc
17,740
C++
garbear
class CDVDVideoCodec { public: enum VCReturn { VC_NONE = 0, VC_ERROR, //< an error occurred, no other messages will be returned VC_FATAL, //< non recoverable error VC_BUFFER, //< the decoder needs more data VC_PICTURE, //< the decoder got a picture, call De...
No issues found.
class CDVDVideoCodec { public: enum VCReturn { VC_NONE = 0, VC_ERROR, //< an error occurred, no other messages will be returned VC_FATAL, //< non recoverable error VC_BUFFER, //< the decoder needs more data VC_PICTURE, //< the decoder got a picture, call De...
@@ -36,7 +36,7 @@ class CSetting; struct VideoPicture { public: - VideoPicture(); + VideoPicture() = default; ~VideoPicture(); VideoPicture& CopyRef(const VideoPicture &pic); VideoPicture& SetParams(const VideoPicture &pic); @@ -80,8 +80,8 @@ struct VideoPicture unsigned int iDisplayHeight; //...
xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodec.h
0
C/C++
1
none
16
51
51
true
DVDVideoCodec: remove some not necessary definitions in .cpp
26,037
xbmc/xbmc
17,740
C++
thexai
{ if (!m_keymap) { CLog::Log(LOGWARNING, "Modifier event without valid keymap, ignoring"); return; } m_keyRepeatTimer.Stop(); m_keymap->UpdateMask(modsDepressed, modsLatched, modsLocked, group); } void CInputProcessorKeyboard::OnKeyboardRepeatInfo(CSeat* seat, std::int32_t rate, std::int32_t delay) ...
No issues found.
{ if (!m_keymap) { CLog::Log(LOGWARNING, "Modifier event without valid keymap, ignoring"); return; } m_keyRepeatTimer.Stop(); m_keymap->UpdateMask(modsDepressed, modsLatched, modsLocked, group); } void CInputProcessorKeyboard::OnKeyboardRepeatInfo(CSeat* seat, std::int32_t rate, std::int32_t delay) ...
@@ -150,12 +150,6 @@ void CInputProcessorKeyboard::ConvertAndSendKey(std::uint32_t scancode, bool pre // it does not fit utf32 = 0; } - if (scancode > std::numeric_limits<unsigned char>::max()) - { - // Kodi scancodes are limited to unsigned char, pretend the scancode is unknown - // on overflow - ...
xbmc/windowing/wayland/InputProcessorKeyboard.cpp
0
C++
1
none
16
51
51
true
Change width of XBMC_keysym.scancode member from 8 to 32 bit
26,041
xbmc/xbmc
17,740
C++
oliver
\brief Returns the full locale of the current language. */ const CLocale& GetLocale() const; /*! \brief Returns the system's current locale. */ const std::locale& GetSystemLocale() const { return m_systemLocale; } bool ForceUnicodeFont() const { return m_forceUnicodeFont; } const std::string& Get...
No issues found.
\brief Returns the full locale of the current language. */ const CLocale& GetLocale() const; /*! \brief Returns the system's current locale. */ const std::locale& GetSystemLocale() const { return m_systemLocale; } bool ForceUnicodeFont() const { return m_forceUnicodeFont; } const std::string& Get...
@@ -103,18 +103,37 @@ class CLangInfo : public ISettingCallback, public ISettingsHandler */ bool SetLanguage(std::string strLanguage = "", bool reloadServices = true); + /* + * \brief Get the audio language in ISO 639-2 format. + * \return The language code (user-defined also allowed), otherwise if "defaul...
xbmc/LangInfo.h
0
C/C++
1
none
16
51
51
true
[backport][LangInfo] Fix set/get language code setting
26,075
xbmc/xbmc
17,740
C++
CastagnaIT
class CFileItemList; class CGUIDialogVideoBookmarks : public CGUIDialog { public: CGUIDialogVideoBookmarks(void); ~CGUIDialogVideoBookmarks(void) override; bool OnMessage(CGUIMessage& message) override; void OnWindowLoaded() override; void OnWindowUnload() override; bool OnAction(const CAction &action) ov...
No issues found.
class CFileItemList; class CGUIDialogVideoBookmarks : public CGUIDialog { public: CGUIDialogVideoBookmarks(void); ~CGUIDialogVideoBookmarks(void) override; bool OnMessage(CGUIMessage& message) override; void OnWindowLoaded() override; void OnWindowUnload() override; bool OnAction(const CAction &action) ov...
@@ -62,6 +62,14 @@ class CGUIDialogVideoBookmarks : public CGUIDialog VECBOOKMARKS m_bookmarks; private: + /*! + * \brief Return the bookmark index for the list item. + * \param[in] item Item number in the list + * \return bookmark index in m_bookmarks, or -1 for an invalid or a non-bookmark item. + */ +...
xbmc/video/dialogs/GUIDialogVideoBookmarks.h
0
C/C++
1
none
16
51
51
true
[guilib] Fix bookmark deletion in presence of chapters
26,078
xbmc/xbmc
17,740
C++
CrystalP
// // by Bobbin007 in 2003 // // // #ifdef HAS_OPTICAL_DRIVE #include <memory> #include <string> #include <utility> #include <vector> struct IntegerSettingOption; namespace XFILE { class IDirectory; } class CSetting; enum class AutoCDAction { NONE = 0, PLAY, RIP }; namespace MEDIA_DETECT { class CAutorun...
No issues found.
// // by Bobbin007 in 2003 // // // #ifdef HAS_OPTICAL_DRIVE #include <memory> #include <string> #include <utility> #include <vector> struct IntegerSettingOption; namespace XFILE { class IDirectory; } class CSetting; enum class AutoCDAction { NONE = 0, PLAY, RIP }; namespace MEDIA_DETECT { class CAutorun...
@@ -32,11 +32,11 @@ namespace XFILE class CSetting; -enum AutoCDAction +enum class AutoCDAction { - AUTOCD_NONE = 0, - AUTOCD_PLAY, - AUTOCD_RIP + NONE = 0, + PLAY, + RIP }; namespace MEDIA_DETECT
xbmc/Autorun.h
0
C/C++
1
none
16
51
51
true
Autorun: convert AutoCDAction to enum class
26,083
xbmc/xbmc
17,740
C++
notspiff
*/ bool GetVideoSettings(int idFile, CVideoSettings &settings); /*! \brief Get video settings for the specified file item \param item item to get the settings for \return true if video settings found, false otherwise \sa SetVideoSettings */ bool GetVideoSettings(const CFileItem &item, CVideoSettin...
No issues found.
*/ bool GetVideoSettings(int idFile, CVideoSettings &settings); /*! \brief Get video settings for the specified file item \param item item to get the settings for \return true if video settings found, false otherwise \sa SetVideoSettings */ bool GetVideoSettings(const CFileItem &item, CVideoSettin...
@@ -723,12 +723,15 @@ class CVideoDatabase : public CDatabase CVideoInfoTag GetDetailsByTypeAndId(VideoDbContentType type, int id); // scraper settings + using ScraperCache = std::unordered_map<std::string, ADDON::ScraperPtr>; void SetScraperForPath(const std::string& filePath, con...
xbmc/video/VideoDatabase.h
0
C/C++
1
none
16
51
51
true
CVideoDatabase: Add possibility to cache scrapers and use that in `CVideoInfoScanner`
26,102
xbmc/xbmc
17,740
C++
neo1973
* Attempt to write bufSize bytes from buffer bufPtr into currently opened file. * @param bufPtr pointer to buffer * @param bufSize size of the buffer * @return number of successfully written bytes if any bytes were written, * zero if no bytes were written and no detectable error occur, * ...
No issues found.
* Attempt to write bufSize bytes from buffer bufPtr into currently opened file. * @param bufPtr pointer to buffer * @param bufSize size of the buffer * @return number of successfully written bytes if any bytes were written, * zero if no bytes were written and no detectable error occur, * ...
@@ -131,37 +131,42 @@ class CFile // CURL interface static bool Exists(const CURL& file, bool bUseCache = true); static bool Delete(const CURL& file); - /** - * Fills struct __stat64 with information about file specified by filename - * For st_mode function will set correctly _S_IFDIR (directory) flag and m...
xbmc/filesystem/File.h
0
C/C++
1
none
16
51
51
true
[Windows] Fix Fasthash for Movies Scan
26,104
xbmc/xbmc
17,740
C++
CrystalP
} std::string GetOpticalMediaPath(const CFileItem& item) { auto exists = [&item](const std::string& file) { const std::string path = URIUtils::AddFileToFolder(item.GetPath(), file); return CFileUtils::Exists(path); }; using namespace std::string_literals; const auto files = std::array{ "VIDEO_...
No issues found.
} std::string GetOpticalMediaPath(const CFileItem& item) { auto exists = [&item](const std::string& file) { const std::string path = URIUtils::AddFileToFolder(item.GetPath(), file); return CFileUtils::Exists(path); }; using namespace std::string_literals; const auto files = std::array{ "VIDEO_...
@@ -239,4 +239,45 @@ ResumeInformation GetStackPartResumeInformation(const CFileItem& item, unsigned return resumeInfo; } +std::shared_ptr<CFileItem> LoadVideoFilesFolderInfo(const CFileItem& folder) +{ + CVideoDatabase db; + if (!db.Open()) + { + CLog::LogF(LOGERROR, "Cannot open VideoDatabase"); + retu...
xbmc/video/VideoUtils.cpp
0
C++
1
none
16
51
51
true
[video] Fix resume of (Non-)Videodatabase items if 'play next video automatically' is active.
26,112
xbmc/xbmc
17,740
C++
ksooo
{ CLog::Log(LOGDEBUG, "{} - found exclusion match for: {}. Both Season and Episode are 0. Item will be " "ignored for scanning.", __FUNCTION__, CURL::GetRedacted(item->GetPath())); return true; } return false; } bool CVideoInfoScanner::Enumer...
No issues found.
{ CLog::Log(LOGDEBUG, "{} - found exclusion match for: {}. Both Season and Episode are 0. Item will be " "ignored for scanning.", __FUNCTION__, CURL::GetRedacted(item->GetPath())); return true; } return false; } bool CVideoInfoScanner::Enumer...
@@ -492,7 +492,7 @@ namespace KODI::VIDEO // clear our scraper cache info2->ClearCache(); - INFO_RET ret = INFO_CANCELLED; + InfoRet ret = InfoRet::CANCELLED; if (info2->Content() == CONTENT_TVSHOWS) ret = RetrieveInfoForTvShow(pItem.get(), bDirNames, info2, useLocal, pURL, fet...
xbmc/video/VideoInfoScanner.cpp
0
C++
1
none
16
51
51
true
InfoScanner: convert InfoRet to enum class
26,117
xbmc/xbmc
17,740
C++
notspiff
} void CPipewireStream::SetActive(bool active) { pw_stream_set_active(m_stream.get(), active); } pw_buffer* CPipewireStream::DequeueBuffer() { return pw_stream_dequeue_buffer(m_stream.get()); } void CPipewireStream::QueueBuffer(pw_buffer* buffer) { pw_stream_queue_buffer(m_stream.get(), buffer); } bool CPipew...
No issues found.
} void CPipewireStream::SetActive(bool active) { pw_stream_set_active(m_stream.get(), active); } pw_buffer* CPipewireStream::DequeueBuffer() { return pw_stream_dequeue_buffer(m_stream.get()); } void CPipewireStream::QueueBuffer(pw_buffer* buffer) { pw_stream_queue_buffer(m_stream.get(), buffer); } bool CPipew...
@@ -73,6 +73,11 @@ void CPipewireStream::QueueBuffer(pw_buffer* buffer) pw_stream_queue_buffer(m_stream.get(), buffer); } +bool CPipewireStream::IsDriving() const +{ + return pw_stream_is_driving(m_stream.get()); +} + bool CPipewireStream::TriggerProcess() const { int ret = pw_stream_trigger_process(m_strea...
xbmc/cores/AudioEngine/Sinks/pipewire/PipewireStream.cpp
0
C++
1
none
16
51
51
true
PipeWire: stop log spam from RequestProcess events
26,125
xbmc/xbmc
17,740
C++
stephan49
} void CDirectoryProvider::OnAddonEvent(const ADDON::AddonEvent& event) { std::unique_lock<CCriticalSection> lock(m_section); if (URIUtils::IsProtocol(m_currentUrl, "addons")) { if (typeid(event) == typeid(ADDON::AddonEvents::Enabled) || typeid(event) == typeid(ADDON::AddonEvents::Disabled) || ...
No issues found.
} void CDirectoryProvider::OnAddonEvent(const ADDON::AddonEvent& event) { std::unique_lock<CCriticalSection> lock(m_section); if (URIUtils::IsProtocol(m_currentUrl, "addons")) { if (typeid(event) == typeid(ADDON::AddonEvents::Enabled) || typeid(event) == typeid(ADDON::AddonEvents::Disabled) || ...
@@ -455,21 +455,21 @@ std::string CDirectoryProvider::GetTarget(const CFileItem& item) const namespace { -bool ExecuteAction(const std::string& execute) +bool ExecuteAction(const std::string& execute, const std::shared_ptr<CFileItem>& item) { if (!execute.empty()) { - CGUIMessage message(GUI_MSG_EXECUTE, ...
xbmc/guilib/listproviders/DirectoryProvider.cpp
0
C++
1
none
16
51
51
true
[interfaces/builtins] If available, pass item instance to 'PlayerControl.(Play|Queue)Media' builtin function
26,150
xbmc/xbmc
17,740
C++
ksooo
#include "cores/AudioEngine/Utils/AEDeviceInfo.h" #include "threads/CriticalSection.h" #include <stdint.h> #include <mmsystem.h> /* Microsoft can't write standalone headers */ #include <DSound.h> /* Microsoft can't write standalone headers */ #include <wrl/client.h> class CAESinkDirectSound : public IAESink { public...
No issues found.
#include "cores/AudioEngine/Utils/AEDeviceInfo.h" #include "threads/CriticalSection.h" #include <stdint.h> #include <mmsystem.h> /* Microsoft can't write standalone headers */ #include <DSound.h> /* Microsoft can't write standalone headers */ #include <wrl/client.h> class CAESinkDirectSound : public IAESink { public...
@@ -38,15 +38,13 @@ class CAESinkDirectSound : public IAESink virtual double GetCacheTotal(); virtual unsigned int AddPackets(uint8_t **data, unsigned int frames, unsigned int offset); - static std::string GetDefaultDevice(); static void EnumerateDevicesEx (AEDeviceInfoList &deviceInfoList, bool force = fal...
xbmc/cores/AudioEngine/Sinks/AESinkDirectSound.h
0
C/C++
1
none
16
51
51
true
[Windows] Refactor Directsound Device Default and Enumeration
26,174
xbmc/xbmc
17,740
C++
CrystalP
{ m_irRemotesMap.clear(); } unsigned int CIRTranslator::TranslateButton(const std::string& szDevice, const std::string& szButton) { // Find the device auto it = m_irRemotesMap.find(szDevice); if (it == m_irRemotesMap.end()) return 0; // Find the button auto ...
No issues found.
{ m_irRemotesMap.clear(); } unsigned int CIRTranslator::TranslateButton(const std::string& szDevice, const std::string& szButton) { // Find the device auto it = m_irRemotesMap.find(szDevice); if (it == m_irRemotesMap.end()) return 0; // Find the button auto ...
@@ -299,6 +299,10 @@ uint32_t CIRTranslator::TranslateString(std::string strButton) buttonCode = XINPUT_IR_REMOTE_DVD_MENU; else if (strButton == "print") buttonCode = XINPUT_IR_REMOTE_PRINT; + else if (strButton == "favorites") + buttonCode = XINPUT_IR_REMOTE_FAVORITE_MENU; + else if (strButton == "l...
xbmc/input/keymaps/remote/IRTranslator.cpp
0
C++
1
none
16
51
51
true
[input/remote] Add buttons "favorites" and "last"
26,181
xbmc/xbmc
17,740
C++
bonzini
/* * Copyright (C) 2005-2018 Team Kodi * This file is part of Kodi - https://kodi.tv * * SPDX-License-Identifier: GPL-2.0-or-later * See LICENSES/README.md for more information. */ #pragma once /** Specifies which settings levels are locked for the user **/ enum class SettingsLock { NONE, //settings are u...
No issues found.
/* * Copyright (C) 2005-2018 Team Kodi * This file is part of Kodi - https://kodi.tv * * SPDX-License-Identifier: GPL-2.0-or-later * See LICENSES/README.md for more information. */ #pragma once /** Specifies which settings levels are locked for the user **/ enum class SettingsLock { NONE, //settings are u...
@@ -8,18 +8,14 @@ #pragma once -namespace LOCK_LEVEL { - /** - Specifies, what Settings levels are locked for the user - **/ - enum SETTINGS_LOCK - { - NONE, //settings are unlocked => user can access all settings levels - ALL, //all settings are locked => user always has to enter password, w...
xbmc/SettingsLock.h
0
C/C++
1
none
16
22
22
true
SettingsLock: convert to enum class
26,189
xbmc/xbmc
17,740
C++
notspiff
else if (type == "socks5") m_proxytype = CCurlFile::PROXY_SOCKS5; else if (type == "socks5-remote") m_proxytype = CCurlFile::PROXY_SOCKS5_REMOTE; else CLog::Log(LOGERROR, "CCurFile::{} - <{}> Invalid proxy type \"{}\"", __FUNCTION__, CURL::GetRedacted(m_url), type); m_proxyhost = host;...
No issues found.
else if (type == "socks5") m_proxytype = CCurlFile::PROXY_SOCKS5; else if (type == "socks5-remote") m_proxytype = CCurlFile::PROXY_SOCKS5_REMOTE; else CLog::Log(LOGERROR, "CCurFile::{} - <{}> Invalid proxy type \"{}\"", __FUNCTION__, CURL::GetRedacted(m_url), type); m_proxyhost = host;...
@@ -2001,7 +2001,7 @@ bool CCurlFile::GetMimeType(const CURL &url, std::string &content, const std::st if (buffer.st_mode == _S_IFDIR) content = "x-directory/normal"; else - content = file.GetProperty(XFILE::FILE_PROPERTY_MIME_TYPE); + content = file.GetProperty(XFILE::FileProperty::MIME_TYPE...
xbmc/filesystem/CurlFile.cpp
0
C++
1
none
16
51
51
true
XFILE::FileProperty: convert to enum class
26,217
xbmc/xbmc
17,740
C++
notspiff
m_pGUI->GetInfoManager().ResetCurrentItem(); } int CApplication::Run() { CLog::Log(LOGINFO, "Running the application..."); std::chrono::time_point<std::chrono::steady_clock> lastFrameTime; std::chrono::milliseconds frameTime; const unsigned int noRenderFrameTime = 15; // Simulates ~66fps CFileItemList&...
No issues found.
m_pGUI->GetInfoManager().ResetCurrentItem(); } int CApplication::Run() { CLog::Log(LOGINFO, "Running the application..."); std::chrono::time_point<std::chrono::steady_clock> lastFrameTime; std::chrono::milliseconds frameTime; const unsigned int noRenderFrameTime = 15; // Simulates ~66fps CFileItemList&...
@@ -1479,6 +1479,14 @@ void CApplication::OnApplicationMessage(ThreadMessage* pMsg) *static_cast<bool*>(pMsg->lpVoid) = CServiceBroker::GetWinSystem()->DestroyWindow(); GetComponent<CApplicationPowerHandling>()->SetRenderGUI(false); break; + + case TMSG_RESUMEAPP: + { + CGUIComponent* gui = CService...
xbmc/application/Application.cpp
0
C++
1
none
16
51
51
true
[Android] Mark window dirty on app resume
26,218
xbmc/xbmc
17,740
C++
joseluismarti
*/ static std::string ChangeBasePath(const std::string &fromPath, const std::string &fromFile, const std::string &toPath, const bool &bAddPath = true); static CURL SubstitutePath(const CURL& url, bool reverse = false); static std::string SubstitutePath(const std::string& strPath, bool reverse = false); /*!...
No issues found.
*/ static std::string ChangeBasePath(const std::string &fromPath, const std::string &fromFile, const std::string &toPath, const bool &bAddPath = true); static CURL SubstitutePath(const CURL& url, bool reverse = false); static std::string SubstitutePath(const std::string& strPath, bool reverse = false); /*!...
@@ -87,6 +87,25 @@ class URIUtils */ static std::string GetBasePath(const std::string& strPath); + /*! \brief Given a bluray:// path, return the base .ISO or folder containing the bluray file structure. + \param path bluray:// path. + \return the base .ISO or folder containing the bluray file structure. +...
xbmc/utils/URIUtils.h
0
C/C++
1
none
16
51
51
true
[VideoDatabase][VideoVersions] Various fixes for bluray:// paths (library related) and associated code refactoring (1/4).
26,220
xbmc/xbmc
17,740
C++
78andyp
} bool Interface_Filesystem::get_mime_type(void* kodiBase, const char* url, char** content, const char* useragent) { CAddonDll* addon = static_cast<CAddonDll*>(kodiBase); if (addon == nullptr ...
No issues found.
} bool Interface_Filesystem::get_mime_type(void* kodiBase, const char* url, char** content, const char* useragent) { CAddonDll* addon = static_cast<CAddonDll*>(kodiBase); if (addon == nullptr ...
@@ -1144,20 +1144,20 @@ bool Interface_Filesystem::curl_add_option( return false; } - XFILE::CURLOPTIONTYPE internalType; + XFILE::CURLOptionType internalType; switch (type) { case ADDON_CURL_OPTION_OPTION: - internalType = XFILE::CURL_OPTION_OPTION; + internalType = XFILE::CURLOptionTy...
xbmc/addons/interfaces/Filesystem.cpp
0
C++
1
none
16
51
51
true
XFILE::CURLOptionType: convert to enum class
26,223
xbmc/xbmc
17,740
C++
notspiff
if (m_hold == HOLD_HELD) return 0; if( m_hold == HOLD_ERROR || m_hold == HOLD_EXIT) return -1; result = bd_read_ext (m_bd, buf, buf_size, &m_event); if(result < 0) { m_hold = HOLD_ERROR; return result; } /* Check for holding events...
No issues found.
if (m_hold == HOLD_HELD) return 0; if( m_hold == HOLD_ERROR || m_hold == HOLD_EXIT) return -1; result = bd_read_ext (m_bd, buf, buf_size, &m_event); if(result < 0) { m_hold = HOLD_ERROR; return result; } /* Check for holding events...
@@ -45,17 +45,10 @@ using namespace std::chrono_literals; static int read_blocks(void* handle, void* buf, int lba, int num_blocks) { - int result = -1; - CDVDInputStreamFile* lpstream = reinterpret_cast<CDVDInputStreamFile*>(handle); - int64_t offset = static_cast<int64_t>(lba) * 2048; - if (lpstream->Seek(offs...
xbmc/cores/VideoPlayer/DVDInputStreams/DVDInputStreamBluray.cpp
0
C++
1
none
16
51
51
true
[DVDInputStreamBluray] fix multithreading issue in read_blocks callback
26,253
xbmc/xbmc
17,740
C++
lverniu777
/* * Copyright (C) 2005-2018 Team Kodi * This file is part of Kodi - https://kodi.tv * * SPDX-License-Identifier: GPL-2.0-or-later * See LICENSES/README.md for more information. */ #include "BlurayFile.h" #include "URL.h" #include <assert.h> using namespace XFILE; CBlurayFile::CBlurayFile(void) : COverri...
No issues found.
/* * Copyright (C) 2005-2018 Team Kodi * This file is part of Kodi - https://kodi.tv * * SPDX-License-Identifier: GPL-2.0-or-later * See LICENSES/README.md for more information. */ #include "BlurayFile.h" #include "URL.h" #include <assert.h> using namespace XFILE; CBlurayFile::CBlurayFile(void) : COverri...
@@ -12,24 +12,30 @@ #include <assert.h> -namespace XFILE +using namespace XFILE; + +CBlurayFile::CBlurayFile(void) : COverrideFile(false) { +} - CBlurayFile::CBlurayFile(void) - : COverrideFile(false) - { } +CBlurayFile::~CBlurayFile(void) = default; - CBlurayFile::~CBlurayFile(void) = default; +std::st...
xbmc/filesystem/BlurayFile.cpp
0
C++
1
none
16
42
42
true
[Video] Various fixes for bluray:// paths (menu and information related) and associated code refactoring (2/4).
26,273
xbmc/xbmc
17,740
C++
78andyp
// to overwrite. Appropriately increment the readPosition. seek(readPosition); bytesRead = m_file.Read(aboutToOverwrite.data(), bufferLength); if (bytesRead <= 0) return; // error aboutToOverwrite.resize(bytesRead); readPosition += bufferLength; // Check to see if we just read the la...
No issues found.
// to overwrite. Appropriately increment the readPosition. seek(readPosition); bytesRead = m_file.Read(aboutToOverwrite.data(), bufferLength); if (bytesRead <= 0) return; // error aboutToOverwrite.resize(bytesRead); readPosition += bufferLength; // Check to see if we just read the la...
@@ -9,7 +9,7 @@ #include "filesystem/File.h" -#include <limits.h> +#include <limits> #include <taglib/taglib.h> #include <taglib/tiostream.h> @@ -59,7 +59,7 @@ FileName TagLibVFSStream::name() const * Reads a block of size \a length at the current get pointer. */ #if (TAGLIB_MAJOR_VERSION >= 2) -ByteVecto...
xbmc/music/tags/TagLibVFSStream.cpp
0
C++
1
none
16
51
51
true
Fix build with taglib2
26,278
xbmc/xbmc
17,740
C++
basilgello
return 133; } bool CVideoDatabase::LookupByFolders(const std::string &path, bool shows) { SScanSettings settings; bool foundDirectly = false; ScraperPtr scraper = GetScraperForPath(path, settings, foundDirectly); if (scraper && scraper->Content() == CONTENT_TVSHOWS && !shows) return false; // episodes ...
No issues found.
return 133; } bool CVideoDatabase::LookupByFolders(const std::string &path, bool shows) { SScanSettings settings; bool foundDirectly = false; ScraperPtr scraper = GetScraperForPath(path, settings, foundDirectly); if (scraper && scraper->Content() == CONTENT_TVSHOWS && !shows) return false; // episodes ...
@@ -25,6 +25,7 @@ #include "dialogs/GUIDialogProgress.h" #include "dialogs/GUIDialogYesNo.h" #include "filesystem/Directory.h" +#include "filesystem/DirectoryCache.h" #include "filesystem/File.h" #include "filesystem/MultiPathDirectory.h" #include "filesystem/PluginDirectory.h" @@ -10806,6 +10807,9 @@ void CVideo...
xbmc/video/VideoDatabase.cpp
0
C++
1
none
16
51
51
true
[Library] Fix #26236 - Address file name case sensitivity issues during local art scraping and export.
26,291
xbmc/xbmc
17,740
C++
78andyp
{ dir->m_listItems->AddSortMethod(SortByBitrate, 623, LABEL_MASKS(labelMask, "%X", labelMask, "%X")); break; } case SortMethod::SIZE: { dir->m_listItems->AddSortMethod(SortBySize, 553, LABEL_MASKS(labelMask, "%...
No issues found.
{ dir->m_listItems->AddSortMethod(SortByBitrate, 623, LABEL_MASKS(labelMask, "%X", labelMask, "%X")); break; } case SortMethod::SIZE: { dir->m_listItems->AddSortMethod(SortBySize, 553, LABEL_MASKS(labelMask, "%...
@@ -34,8 +34,6 @@ using namespace KODI::MESSAGING; namespace { -const unsigned int maxPluginResolutions = 5; - /*! \brief Get the plugin path from a CFileItem. @@ -113,9 +111,10 @@ bool CPluginDirectory::GetResolvedPluginResult(CFileItem& resultItem) if (!lastResolvedPath.empty()) { - // we try to ...
xbmc/filesystem/PluginDirectory.cpp
0
C++
1
none
16
51
51
true
[application] Fix playback of items which require multiple URL resolu…
26,373
xbmc/xbmc
17,740
C++
ksooo
std::string md5Int = CDigest::Calculate(CDigest::Type::MD5, std::string(text)); strncpy(md5, md5Int.c_str(), 40); } char* Interface_General::get_region(void* kodiBase, const char* id) { CAddonDll* addon = static_cast<CAddonDll*>(kodiBase); if (addon == nullptr || id == nullptr) { CLog::Log(LOGERROR, "In...
No issues found.
std::string md5Int = CDigest::Calculate(CDigest::Type::MD5, std::string(text)); strncpy(md5, md5Int.c_str(), 40); } char* Interface_General::get_region(void* kodiBase, const char* id) { CAddonDll* addon = static_cast<CAddonDll*>(kodiBase); if (addon == nullptr || id == nullptr) { CLog::Log(LOGERROR, "In...
@@ -49,7 +49,7 @@ void Interface_General::Init(AddonGlobalInterface* addonInterface) addonInterface->toKodi->kodi->get_region = get_region; addonInterface->toKodi->kodi->get_free_mem = get_free_mem; addonInterface->toKodi->kodi->get_global_idle_time = get_global_idle_time; - addonInterface->toKodi->kodi->is_a...
xbmc/addons/interfaces/General.cpp
0
C++
1
none
16
51
51
true
[addons] Fix typo in add-on function name
26,395
xbmc/xbmc
17,740
C++
Rainer-Keller
virtual void SetSubTitleDelay(float fValue = 0.0f) {} virtual float GetSubTitleDelay() { return 0.0f; } virtual int GetSubtitleCount() const { return 0; } virtual int GetSubtitle() { return -1; } virtual void GetSubtitleStreamInfo(int index, SubtitleStreamInfo& info) const {} virtual void SetSu...
No issues found.
virtual void SetSubTitleDelay(float fValue = 0.0f) {} virtual float GetSubTitleDelay() { return 0.0f; } virtual int GetSubtitleCount() const { return 0; } virtual int GetSubtitle() { return -1; } virtual void GetSubtitleStreamInfo(int index, SubtitleStreamInfo& info) const {} virtual void SetSu...
@@ -184,9 +184,9 @@ class IPlayer virtual void SetTime(int64_t time) { } /*! - \brief Set the total time in milliseconds + \brief Set the total time in milliseconds this can be used for injecting the duration in case - its not available in the underlaying decoder (airtunes for example) + it's not a...
xbmc/cores/IPlayer.h
0
C/C++
1
none
16
51
51
true
Fix typos found in xbmc/cores
26,400
xbmc/xbmc
17,740
C++
luzpaz
/*! * @brief Checks whether an addon is a bundled addon * * @param[in] id id of the addon * @return true if addon is bundled addon, false otherwise. */ bool IsBundledAddon(const std::string& id); /*! * @brief Checks whether an addon is a system addon * * @param[in] id id o...
No issues found.
/*! * @brief Checks whether an addon is a bundled addon * * @param[in] id id of the addon * @return true if addon is bundled addon, false otherwise. */ bool IsBundledAddon(const std::string& id); /*! * @brief Checks whether an addon is a system addon * * @param[in] id id o...
@@ -454,7 +454,7 @@ class CAddonMgr * @brief Get a list of add-on's with info's for the on system available * ones. * - * @param[out] addonInfos list where finded addon information becomes stored + * @param[out] addonInfos list where found addon information becomes stored * @param[in] on...
xbmc/addons/AddonManager.h
0
C/C++
1
none
16
51
51
true
Fix typos found in various addons directories
26,414
xbmc/xbmc
17,740
C++
luzpaz
float refresh; if (XMLUtils::GetFloat(pRefreshFallback, "refresh", refresh)) { fallback.refreshmin = refresh - 0.01f; fallback.refreshmax = refresh + 0.01f; } float refreshmin; float refreshmax; if (XMLUtils::GetFloat(pRefreshFallback, "refre...
No issues found.
float refresh; if (XMLUtils::GetFloat(pRefreshFallback, "refresh", refresh)) { fallback.refreshmin = refresh - 0.01f; fallback.refreshmax = refresh + 0.01f; } float refreshmin; float refreshmax; if (XMLUtils::GetFloat(pRefreshFallback, "refre...
@@ -318,6 +318,7 @@ void CAdvancedSettings::Initialize() m_bVideoScannerIgnoreErrors = false; m_iVideoLibraryDateAdded = 1; // prefer mtime over ctime and current time m_minimumEpisodePlaylistDuration = 5 * 60; // 5 minutes + m_disableEpisodeRanges = false; m_caseSensitiveLocalArtMatch = true; // case se...
xbmc/settings/AdvancedSettings.cpp
0
C++
1
none
16
51
51
true
[VideoInfoScanner] Allow scraper to correctly process episodes in files named with the format SxxExx-Eyy and add further tests.
26,439
xbmc/xbmc
17,740
C++
78andyp
CHK_ERR_WIN32A(ERROR_DS_MISSING_FSMO_SETTINGS) CHK_ERR_WIN32A(ERROR_DS_UNABLE_TO_SURRENDER_ROLES) CHK_ERR_WIN32A(ERROR_DS_DRA_GENERIC) CHK_ERR_WIN32A(ERROR_DS_DRA_INVALID_PARAMETER) CHK_ERR_WIN32A(ERROR_DS_DRA_BUSY) CHK_ERR_WIN32A(ERROR_DS_DRA_BAD_DN) CHK_ERR_WIN3...
No issues found.
CHK_ERR_WIN32A(ERROR_DS_MISSING_FSMO_SETTINGS) CHK_ERR_WIN32A(ERROR_DS_UNABLE_TO_SURRENDER_ROLES) CHK_ERR_WIN32A(ERROR_DS_DRA_GENERIC) CHK_ERR_WIN32A(ERROR_DS_DRA_INVALID_PARAMETER) CHK_ERR_WIN32A(ERROR_DS_DRA_BUSY) CHK_ERR_WIN32A(ERROR_DS_DRA_BAD_DN) CHK_ERR_WIN3...
@@ -3477,7 +3477,7 @@ void WINAPI DXGetErrorDescriptionW( _In_ HRESULT hr, _Out_cap_(count) WCHAR* des // CHK_ERR(DDERR_OUTOFMEMORY, "DDERR_OUTOFMEMORY") // CHK_ERR(DDERR_OUTOFVIDEOMEMORY, "DDERR_OUTOFVIDEOMEMORY") CHK_ERR(DDERR_OVERLAYCANTCLIP, "hardware does not support clipped overlays") - ...
xbmc/platform/win32/dxerr.cpp
0
C++
1
none
16
51
51
true
Fix typos in xbmc/platform directory
26,456
xbmc/xbmc
17,740
C++
luzpaz
* See LICENSES/README.md for more information. */ #pragma once #include <memory> class CExecString; class CFileItem; namespace KODI::UTILS::GUILIB { class CGUIBuiltinsUtils { public: /*! \brief Execute the action given by exec string and item. \param execute The action to execute \param item The item ass...
No issues found.
* See LICENSES/README.md for more information. */ #pragma once #include <memory> class CExecString; class CFileItem; namespace KODI::UTILS::GUILIB { class CGUIBuiltinsUtils { public: /*! \brief Execute the action given by exec string and item. \param execute The action to execute \param item The item ass...
@@ -20,38 +20,38 @@ class CGUIBuiltinsUtils public: /*! \brief Execute the action given by exec string and item. \param execute The action to execute - \param item The item asociated with the action to execute + \param item The item associated with the action to execute \return True on success, false ot...
xbmc/utils/guilib/GUIBuiltinsUtils.h
0
C/C++
1
none
16
51
51
true
Fix typos in xbmc/(utils|video|windowing) directories
26,457
xbmc/xbmc
17,740
C++
luzpaz
case TAG_DATETIME: { if (!m_DateFound) { // If we don't already have a DATETIME_ORIGINAL, use whatever // time fields we may have. int space = sizeof(m_ExifInfo->DateTime); if (space > 0) { strncpy(m_ExifInfo->DateTime, (char *)Va...
No issues found.
case TAG_DATETIME: { if (!m_DateFound) { // If we don't already have a DATETIME_ORIGINAL, use whatever // time fields we may have. int space = sizeof(m_ExifInfo->DateTime); if (space > 0) { strncpy(m_ExifInfo->DateTime, (char *)Va...
@@ -512,7 +512,7 @@ void CExifParse::ProcessDir(const unsigned char* const DirStart, case TAG_FNUMBER: // Simplest way of expressing aperture, so I trust it the most. - // (overwrite previously computd value if there is one) + // (overwrite previously computed value if there is one) ...
xbmc/pictures/ExifParse.cpp
0
C++
1
none
16
51
51
true
Fix typos in various xbmc subdirectories
26,468
xbmc/xbmc
17,740
C++
luzpaz
#include <tuple> namespace FFMPEG_HELP_TOOLS { struct FFMpegException : public std::exception { std::string s; template<typename... Args> FFMpegException(const std::string& fmt, Args&&... args) : s(StringUtils::Format(fmt, std::forward<Args>(args)...)) { } const char* what() const noexcept override {...
No issues found.
#include <tuple> namespace FFMPEG_HELP_TOOLS { struct FFMpegException : public std::exception { std::string s; template<typename... Args> FFMpegException(const std::string& fmt, Args&&... args) : s(StringUtils::Format(fmt, std::forward<Args>(args)...)) { } const char* what() const noexcept override {...
@@ -9,7 +9,6 @@ #pragma once #include "ServiceBroker.h" -#include "utils/CPUInfo.h" #include "utils/StringUtils.h" extern "C" { @@ -42,23 +41,6 @@ std::string FFMpegErrorToString(int err); } // namespace FFMPEG_HELP_TOOLS -inline int PPCPUFlags() -{ - unsigned int cpuFeatures = CServiceBroker::GetCPUInfo(...
xbmc/cores/FFmpeg.h
0
C/C++
1
none
16
51
51
true
[Video] make use of internal FFmpeg CPU capabilities detection for video post-processing
26,471
xbmc/xbmc
17,740
C++
thexai
if (StringUtils::EqualsNoCase(name, "ADV_OBJ")) { CLog::Log(LOGINFO,"HD DVD: Checking for playlist."); // find playlist file CDirectory::GetDirectory(pItem->GetPath(), items, "*.xpl", DIR_FLAG_DEFAULTS); if (items.Size()) { // HD DVD Standard...
No issues found.
if (StringUtils::EqualsNoCase(name, "ADV_OBJ")) { CLog::Log(LOGINFO,"HD DVD: Checking for playlist."); // find playlist file CDirectory::GetDirectory(pItem->GetPath(), items, "*.xpl", DIR_FLAG_DEFAULTS); if (items.Size()) { // HD DVD Standard...
@@ -116,13 +116,12 @@ bool CAutorun::PlayDisc(const std::string& path, bool bypassSettings, bool start std::string mediaPath; CCdInfo* pInfo = CServiceBroker::GetMediaManager().GetCdInfo(path); - if (pInfo == NULL) - return false; - if (pInfo->IsAudio(1)) + if (pInfo && pInfo->IsAudio(1)) mediaPath...
xbmc/Autorun.cpp
0
C++
1
none
16
51
51
true
Bluray: Fix linux support
26,473
xbmc/xbmc
17,740
C++
sgonauer
/// /// @note The returned value is platform-specific. This is due to the fact that /// the chars that need to be replaced to make a path legal depend on the /// underlying OS filesystem. This is useful, for example, if you want to create /// a file or folder based on data over which you have no con...
No issues found.
/// /// @note The returned value is platform-specific. This is due to the fact that /// the chars that need to be replaced to make a path legal depend on the /// underlying OS filesystem. This is useful, for example, if you want to create /// a file or folder based on data over which you have no con...
@@ -30,103 +30,103 @@ namespace XBMCAddon // #ifdef DOXYGEN_SHOULD_USE_THIS - /// - /// \ingroup python_xbmcvfs - /// @brief \python_func{ xbmcvfs.copy(source, destination) } - /// Copy file to destination, returns true/false. - /// - /// @param source file to copy. - /// @pa...
xbmc/interfaces/legacy/ModuleXbmcvfs.h
0
C/C++
1
none
16
51
51
true
Fix typos in xbmc/interfaces/legacy
26,479
xbmc/xbmc
17,740
C++
luzpaz
pItem->SetPath(match->GetVideoInfoTag()->m_strPath); else pItem->SetPath(match->GetVideoInfoTag()->m_strFileNameAndPath); // if we switch from a file to a folder item it means we really shouldn't be sorting files and // folders separately if (pItem->m_bIsFolder != mat...
No issues found.
pItem->SetPath(match->GetVideoInfoTag()->m_strPath); else pItem->SetPath(match->GetVideoInfoTag()->m_strFileNameAndPath); // if we switch from a file to a folder item it means we really shouldn't be sorting files and // folders separately if (pItem->m_bIsFolder != mat...
@@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2018 Team Kodi + * Copyright (C) 2005-2025 Team Kodi * This file is part of Kodi - https://kodi.tv * * SPDX-License-Identifier: GPL-2.0-or-later @@ -549,6 +549,26 @@ void CGUIWindowVideoBase::OnQueueItem(const std::shared_ptr<CFileItem>& item, in namespace { +cla...
xbmc/video/windows/GUIWindowVideoBase.cpp
0
C++
1
none
16
51
51
true
[video] Cleanup settings 'default select action' and 'default play action' logics.
26,522
xbmc/xbmc
17,740
C++
ksooo
in_addr addr4; in6_addr addr6; strIpAddress.clear(); if (inet_pton(AF_INET, strHostName.c_str(), &addr4) || inet_pton(AF_INET6, strHostName.c_str(), &addr6)) { strIpAddress = strHostName; return true; } // check if there's a custom entry or if it's already cached if (GetCached(strHostNam...
No issues found.
in_addr addr4; in6_addr addr6; strIpAddress.clear(); if (inet_pton(AF_INET, strHostName.c_str(), &addr4) || inet_pton(AF_INET6, strHostName.c_str(), &addr6)) { strIpAddress = strHostName; return true; } // check if there's a custom entry or if it's already cached if (GetCached(strHostNam...
@@ -9,10 +9,11 @@ #include "DNSNameCache.h" #include "network/Network.h" -#include "threads/CriticalSection.h" #include "utils/log.h" #include <mutex> +#include <tuple> +#include <utility> #if !defined(TARGET_WINDOWS) && defined(HAS_FILESYSTEM_SMB) #include "ServiceBroker.h" @@ -28,14 +29,6 @@ #include <sy...
xbmc/network/DNSNameCache.cpp
0
C++
1
none
16
51
51
true
DNSNameCache: Add a Time To Live for cached names
26,525
xbmc/xbmc
17,740
C++
neo1973
\param path the ISO/index.BDMV path. \return the bluray:// playlist path - BDMV/PLAYLIST */ static std::string GetBlurayPlaylistPath(const std::string& path); /*! \brief Given a path to an .ISO or index.BDMV, returns a bluray:// path. \param path the ISO/index.BDMV path. \return the bluray:// path. ...
No issues found.
\param path the ISO/index.BDMV path. \return the bluray:// playlist path - BDMV/PLAYLIST */ static std::string GetBlurayPlaylistPath(const std::string& path); /*! \brief Given a path to an .ISO or index.BDMV, returns a bluray:// path. \param path the ISO/index.BDMV path. \return the bluray:// path. ...
@@ -100,12 +100,60 @@ class URIUtils */ static std::string GetDiscBasePath(const std::string& file); + /*! \brief Given a bluray:// path, return the underlying file path (eg. smb://, udf:// etc..) + \param url CURL containing bluray:// path. + \return return the underlying file path. + */ + static std:...
xbmc/utils/URIUtils.h
0
C/C++
1
none
16
51
51
true
[Video][Blurays] Introduce/modify some functions that are necessary pre-requisites for the larger bluray episode/version changes to come.
26,542
xbmc/xbmc
17,740
C++
78andyp
#define SYSTEM_PLATFORM_UWP 746 #define SYSTEM_PLATFORM_ANDROID 747 #define SYSTEM_PLATFORM_WINDOWING 748 #define SYSTEM_PLATFORM_WIN10 749 #define SYSTEM_CAN_POWERDOWN 750 #define SYSTEM_CAN_SUSPEND 751 #define SYSTEM_CAN_HIBERNATE 752 #define SYSTEM_CAN_REBOOT 753...
No issues found.
#define SYSTEM_PLATFORM_UWP 746 #define SYSTEM_PLATFORM_ANDROID 747 #define SYSTEM_PLATFORM_WINDOWING 748 #define SYSTEM_PLATFORM_WIN10 749 #define SYSTEM_CAN_POWERDOWN 750 #define SYSTEM_CAN_SUSPEND 751 #define SYSTEM_CAN_HIBERNATE 752 #define SYSTEM_CAN_REBOOT 753...
@@ -1006,6 +1006,7 @@ static constexpr unsigned int SYSTEM_LOCALE = 1012; #define LISTITEM_EPISODEPART (LISTITEM_START + 223) #define LISTITEM_MEDIAPROVIDERS (LISTITEM_START + 224) #define LISTITEM_TITLE_EXTRAINFO (LISTITEM_START + 225) +#define LISTITEM_DECODED_FILENAME_AND_PATH (LISTITEM_START + 226)...
xbmc/guilib/guiinfo/GUIInfoLabels.h
0
C/C++
1
none
16
51
51
true
[Video][Skin] Always show full path in video information dialog.
26,544
xbmc/xbmc
17,740
C++
78andyp
SubPathInformation subPathInformation; const BLURAY_SUBPATH_TYPE type{GetByte(buffer, offset + OFFSET_MPLS_SUBPATH_TYPE)}; const unsigned int flags{GetWord(buffer, offset + OFFSET_MPLS_SUBPATH_FLAGS)}; subPathInformation.type = type; subPathInformation.repeat = GetBits(flags, 1, 1); ...
No issues found.
SubPathInformation subPathInformation; const BLURAY_SUBPATH_TYPE type{GetByte(buffer, offset + OFFSET_MPLS_SUBPATH_TYPE)}; const unsigned int flags{GetWord(buffer, offset + OFFSET_MPLS_SUBPATH_FLAGS)}; subPathInformation.type = type; subPathInformation.repeat = GetBits(flags, 1, 1); ...
@@ -1584,6 +1584,31 @@ void CBlurayDirectory::Dispose() } } +bool CBlurayDirectory::Resolve(CFileItem& item) const +{ + const std::string originalPath{item.GetDynPath()}; + if (CURL::Decode(originalPath).find("removable://") != std::string::npos) + { + std::string newPath; + if (URIUtils::GetExtension(or...
xbmc/filesystem/BlurayDirectory.cpp
0
C++
1
none
16
51
51
true
[Video][Bluray] Extend bluray:// functionality to removable bluray discs.
26,566
xbmc/xbmc
17,740
C++
78andyp
{ CVariant a, b("variant1"), c("variant2"), d("variant3"); a.push_back(b); a.push_back(c); a.push_back(d); EXPECT_TRUE(a.isArray()); EXPECT_EQ(CVariant::VariantTypeArray, a.type()); EXPECT_STREQ("variant1", a[0].asString().c_str()); EXPECT_STREQ("variant2", a[1].asString().c_str()); EXPECT_STREQ("var...
No issues found.
{ CVariant a, b("variant1"), c("variant2"), d("variant3"); a.push_back(b); a.push_back(c); a.push_back(d); EXPECT_TRUE(a.isArray()); EXPECT_EQ(CVariant::VariantTypeArray, a.type()); EXPECT_STREQ("variant1", a[0].asString().c_str()); EXPECT_STREQ("variant2", a[1].asString().c_str()); EXPECT_STREQ("var...
@@ -396,3 +396,22 @@ TEST(TestVariant, asBoolean) EXPECT_FALSE(CVariant(CVariant::VariantTypeArray).asBoolean()); EXPECT_FALSE(CVariant(CVariant::VariantTypeObject).asBoolean()); } + +TEST(TestVariant, ConstNullVariant_cant_be_changed) +{ + CVariant c1 = CVariant::ConstNullVariant; + EXPECT_EQ(CVariant::Varian...
xbmc/utils/test/TestVariant.cpp
0
C++
1
none
16
51
51
true
CVariant: Fix `swap()` so it doesn't change a `VariantTypeConstNull` variant
26,581
xbmc/xbmc
17,740
C++
neo1973
} const unsigned int numPlayItems{GetWord(buffer, offset + OFFSET_MPLS_NUM_PLAYITEMS)}; const unsigned int numSubPaths{GetWord(buffer, offset + OFFSET_MPLS_NUM_SUBPATHS)}; offset += 10; playlistInformation.playItems.reserve(numPlayItems); for (unsigned int i = 0; i < numPlayItems; ++i) { PlayItemInfo...
No issues found.
} const unsigned int numPlayItems{GetWord(buffer, offset + OFFSET_MPLS_NUM_PLAYITEMS)}; const unsigned int numSubPaths{GetWord(buffer, offset + OFFSET_MPLS_NUM_SUBPATHS)}; offset += 10; playlistInformation.playItems.reserve(numPlayItems); for (unsigned int i = 0; i < numPlayItems; ++i) { PlayItemInfo...
@@ -427,7 +427,7 @@ bool ParseCLPI(std::vector<std::byte>& buffer, ClipInformation& clipInformation, bool ReadCLPI(const CURL& url, unsigned int clip, ClipInformation& clipInformation) { - const std::string path{url.GetHostName()}; + const std::string& path{url.GetHostName()}; const std::string clipFile{ ...
xbmc/filesystem/BlurayDirectory.cpp
0
C++
1
none
16
51
51
true
[clang-tidy] fix modernize-* and performance-* warnings
26,589
xbmc/xbmc
17,740
C++
Rechi
if (codec == "truehd") // Dolby TrueHD return 6; if (codec == "dtshd_ma") // DTS-HD Master Audio (previously known as DTS++) return 5; if (codec == "dtshd_hra") // DTS-HD High Resolution Audio return 4; if (codec == "eac3") // Dolby Digital Plus return 3; if (codec == "dca") // DTS return ...
No issues found.
if (codec == "truehd") // Dolby TrueHD return 6; if (codec == "dtshd_ma") // DTS-HD Master Audio (previously known as DTS++) return 5; if (codec == "dtshd_hra") // DTS-HD High Resolution Audio return 4; if (codec == "eac3") // Dolby Digital Plus return 3; if (codec == "dca") // DTS return ...
@@ -8,6 +8,12 @@ #include "StreamUtils.h" +extern "C" +{ +#include <libavcodec/avcodec.h> +#include <libavformat/avformat.h> +} + int StreamUtils::GetCodecPriority(const std::string &codec) { /* @@ -30,3 +36,63 @@ int StreamUtils::GetCodecPriority(const std::string &codec) return 1; return 0; } + +st...
xbmc/utils/StreamUtils.cpp
0
C++
1
none
16
51
51
true
[VideoPlayer][skin] Add AAC codec by profile, fix inputstream codec name bug
26,618
xbmc/xbmc
17,740
C++
CastagnaIT
LABEL_MASKS("%L", "", "%L", "")); // Label, empty | Label, empty AddSortMethod(SortByVideoCodec, 21445, LABEL_MASKS("%L", "", "%L", "")); // Label, empty | Label, empty AddSortMethod(SortByAudioCodec, 21446, LABEL_MASKS("%L", "", "%L", ""...
No issues found.
LABEL_MASKS("%L", "", "%L", "")); // Label, empty | Label, empty AddSortMethod(SortByVideoCodec, 21445, LABEL_MASKS("%L", "", "%L", "")); // Label, empty | Label, empty AddSortMethod(SortByAudioCodec, 21446, LABEL_MASKS("%L", "", "%L", ""...
@@ -322,8 +322,55 @@ CGUIViewStateWindowVideoNav::CGUIViewStateWindowVideoNav(const CFileItemList& it SetSortOrder(SortOrderNone); } break; - default: + case NodeType::MOVIE_ASSETS: + case NodeType::MOVIE_ASSETS_VERSIONS: + { + AddSortMethod(SortByLabel, sortAttributes, 5...
xbmc/video/GUIViewStateVideo.cpp
0
C++
1
none
16
51
51
true
[GUI] Add Sorting Methods to the movie versions/extras folders
26,627
xbmc/xbmc
17,740
C++
CrystalP
if (!IsVideoReady()) { CDVDDemuxUtils::FreeDemuxPacket(m_packet.release()); DemuxPacket *pPacket = CDVDDemuxUtils::AllocateDemuxPacket(0); pPacket->demuxerId = m_demuxerId; return pPacket; } //! @todo drop this block CDVDInputStream::IDisplayTime *inputStream = m_pInput->GetIDisplayTime(); ...
No issues found.
if (!IsVideoReady()) { CDVDDemuxUtils::FreeDemuxPacket(m_packet.release()); DemuxPacket *pPacket = CDVDDemuxUtils::AllocateDemuxPacket(0); pPacket->demuxerId = m_demuxerId; return pPacket; } //! @todo drop this block CDVDInputStream::IDisplayTime *inputStream = m_pInput->GetIDisplayTime(); ...
@@ -490,6 +490,7 @@ void CDVDDemuxClient::SetStreamProps(CDemuxStream *stream, std::map<int, std::sh streamVideo->colorTransferCharacteristic = source->colorTransferCharacteristic; streamVideo->masteringMetaData = source->masteringMetaData; streamVideo->contentLightMetaData = source->contentLightMetaData...
xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxClient.cpp
0
C++
1
none
16
51
51
true
[InputStreamAddon] Implemented HDR types
26,631
xbmc/xbmc
17,740
C++
CastagnaIT
CLog::Log(LOGINFO, "PVR Manager: Start aborted"); return; } UnloadComponents(); if (!IsInitialising()) { CLog::Log(LOGINFO, "PVR Manager: Start aborted"); return; } // Wait for at least one client to come up and load/update data UpdateComponents(ManagerState::STATE_STARTING); if (!Is...
No issues found.
CLog::Log(LOGINFO, "PVR Manager: Start aborted"); return; } UnloadComponents(); if (!IsInitialising()) { CLog::Log(LOGINFO, "PVR Manager: Start aborted"); return; } // Wait for at least one client to come up and load/update data UpdateComponents(ManagerState::STATE_STARTING); if (!Is...
@@ -451,9 +451,6 @@ void CPVRManager::SetState(CPVRManager::ManagerState state) PVREvent event; switch (state) { - case ManagerState::STATE_ERROR: - event = PVREvent::ManagerError; - break; case ManagerState::STATE_STOPPED: event = PVREvent::ManagerStopped; break; @@ -463,9 +460...
xbmc/pvr/PVRManager.cpp
0
C++
1
none
16
51
51
true
[PVR] Reduce number of published events
26,635
xbmc/xbmc
17,740
C++
ksooo
{ if (nullptr == m_pDB) return bReturn; if (nullptr == m_pDS) return bReturn; std::string strPreparedQuery = PrepareSQL(strQuery); bReturn = m_pDS->query(strPreparedQuery); } catch (...) { CLog::Log(LOGERROR, "{} - failed to execute query '{}'", __FUNCTION__, strQuery); } ...
No issues found.
{ if (nullptr == m_pDB) return bReturn; if (nullptr == m_pDS) return bReturn; std::string strPreparedQuery = PrepareSQL(strQuery); bReturn = m_pDS->query(strPreparedQuery); } catch (...) { CLog::Log(LOGERROR, "{} - failed to execute query '{}'", __FUNCTION__, strQuery); } ...
@@ -535,7 +535,7 @@ bool CDatabase::Open(const DatabaseSettings& settings) std::string dbName = dbSettings.name; dbName += std::to_string(GetSchemaVersion()); - return Connect(dbName, dbSettings, false); + return Connect(dbName, dbSettings, false) == CDatabase::ConnectionState::STATE_CONNECTED; } void CDa...
xbmc/dbwrappers/Database.cpp
0
C++
1
none
16
51
51
true
[database] Fix 'endless' waiting on splash screen when connect to remote database(s) fails.
26,661
xbmc/xbmc
17,740
C++
ksooo
VIDEO_LIBRARY, AUDIO_LIBRARY, PLAYER, }; virtual ~ISubscriberCallback() = default; virtual bool OnEventPublished(Topic topic = Topic::UNSPECIFIED) = 0; }; class CDirectoryProvider : public IListProvider, public IJobCallback, public ISubscriberCall...
No issues found.
VIDEO_LIBRARY, AUDIO_LIBRARY, PLAYER, }; virtual ~ISubscriberCallback() = default; virtual bool OnEventPublished(Topic topic = Topic::UNSPECIFIED) = 0; }; class CDirectoryProvider : public IListProvider, public IJobCallback, public ISubscriberCall...
@@ -9,26 +9,20 @@ #pragma once #include "IListProvider.h" -#include "addons/AddonEvents.h" -#include "addons/RepositoryUpdater.h" -#include "favourites/FavouritesService.h" #include "guilib/GUIStaticItem.h" -#include "interfaces/IAnnouncer.h" #include "threads/CriticalSection.h" +#include "threads/Timer.h" #incl...
xbmc/guilib/listproviders/DirectoryProvider.h
0
C/C++
1
none
16
51
51
true
[guilib/listproviders] Improvements and Fixes
26,665
xbmc/xbmc
17,740
C++
ksooo
strSeasonEpisodeN = StringUtils::Format("s{:02}e{:02}", iSeason, iEpisode); if (!strSeasonEpisodeN.empty()) strSeasonEpisodeN = StringUtils::Format(" {}", strSeasonEpisodeN); std::string strYearN(iYear > 0 ? StringUtils::Format(" ({})", iYear) : ""); std::string strSubtitleN; if (!strSubtitle.empty())...
No issues found.
strSeasonEpisodeN = StringUtils::Format("s{:02}e{:02}", iSeason, iEpisode); if (!strSeasonEpisodeN.empty()) strSeasonEpisodeN = StringUtils::Format(" {}", strSeasonEpisodeN); std::string strYearN(iYear > 0 ? StringUtils::Format(" ({})", iYear) : ""); std::string strSubtitleN; if (!strSubtitle.empty())...
@@ -92,7 +92,14 @@ CPVRRecordingsPath::CPVRRecordingsPath(bool bDeleted, { std::string strDirectoryN(TrimSlashes(strDirectory)); if (!strDirectoryN.empty()) + { + std::vector<std::string> segments{StringUtils::Split(strDirectoryN, "/")}; + for (auto& segment : segments) + segment = CURL::Encode(segme...
xbmc/pvr/recordings/PVRRecordingsPath.cpp
0
C++
1
none
16
51
51
true
[pvr][video] Fix PVR recordings URL encoding bug (needs video database schema bump).
26,678
xbmc/xbmc
17,740
C++
ksooo
SetInvalid(); m_fPercent = fPercent; } float CGUIProgressControl::GetPercentage() const { return m_fPercent; } void CGUIProgressControl::FreeResources(bool immediately) { CGUIControl::FreeResources(immediately); m_guiBackground->FreeResources(immediately); m_guiMid->FreeResources(immediately); m_guiRig...
No issues found.
SetInvalid(); m_fPercent = fPercent; } float CGUIProgressControl::GetPercentage() const { return m_fPercent; } void CGUIProgressControl::FreeResources(bool immediately) { CGUIControl::FreeResources(immediately); m_guiBackground->FreeResources(immediately); m_guiMid->FreeResources(immediately); m_guiRig...
@@ -85,7 +85,12 @@ void CGUIProgressControl::Render() { if (!IsDisabled()) { - m_guiBackground->Render(); + const bool renderFrontToBack = + CServiceBroker::GetWinSystem()->GetGfxContext().GetRenderOrder() == + RENDER_ORDER_FRONT_TO_BACK; + + if (!renderFrontToBack) + m_guiBackground-...
xbmc/guilib/GUIProgressControl.cpp
0
C++
1
none
16
51
51
true
GUI: Fix front-to-back rendering for some controls
26,701
xbmc/xbmc
17,740
C++
neo1973
namespace DISCS { /*! \brief Abstracts a disc type */ enum class DiscType { UNKNOWN, ///< the default value, the application doesn't know what the device is DVD, ///< dvd disc BLURAY ///< blu-ray disc }; /*! \brief Abstracts the info the app knows about a disc (type, name, serial) */ struct DiscInfo { /*! \br...
No issues found.
namespace DISCS { /*! \brief Abstracts a disc type */ enum class DiscType { UNKNOWN, ///< the default value, the application doesn't know what the device is DVD, ///< dvd disc BLURAY ///< blu-ray disc }; /*! \brief Abstracts the info the app knows about a disc (type, name, serial) */ struct DiscInfo { /*! \br...
@@ -10,6 +10,8 @@ #include <string> +class CFileItem; + namespace UTILS { namespace DISCS @@ -69,5 +71,11 @@ DiscInfo ProbeDVDDiscInfo(const std::string& mediaPath); */ DiscInfo ProbeBlurayDiscInfo(const std::string& mediaPath); +/*! \brief Probe a FileItem to see it is a bluray disc image + \param item ...
xbmc/utils/DiscsUtils.h
0
C/C++
1
none
16
51
51
true
Fix - After #26319 DVD ISO images no longer play.
26,705
xbmc/xbmc
17,740
C++
78andyp
} std::string CGUIDialogVideoInfo::GetThumbnail() const { return m_movieItem->GetArt("thumb"); } int CGUIDialogVideoInfo::ManageVideoItem(const std::shared_ptr<CFileItem>& item) { if (item == nullptr || !VIDEO::IsVideoDb(*item) || !item->HasVideoInfoTag() || item->GetVideoInfoTag()->m_iDbId < 0) return ...
No issues found.
} std::string CGUIDialogVideoInfo::GetThumbnail() const { return m_movieItem->GetArt("thumb"); } int CGUIDialogVideoInfo::ManageVideoItem(const std::shared_ptr<CFileItem>& item) { if (item == nullptr || !VIDEO::IsVideoDb(*item) || !item->HasVideoInfoTag() || item->GetVideoInfoTag()->m_iDbId < 0) return ...
@@ -1446,29 +1446,29 @@ bool CGUIDialogVideoInfo::ManageMovieSets(const std::shared_ptr<CFileItem>& item selectedItems.Size() == 0) // need at least one item selected return false; - VECFILEITEMS original = originalItems.GetList(); + auto original = originalItems.GetList(); std::sort(original.begin()...
xbmc/video/dialogs/GUIDialogVideoInfo.cpp
0
C++
1
none
16
51
51
true
Remove VECFILEITEMS
26,717
xbmc/xbmc
17,740
C++
notspiff
FileItemTestDef{{{"/home/user/foo.png", false, ""}, {"/home/user/foo/", true, ""}, {"/home/user/bar/", true, ""}, {"/home/user/foobar/", true, ""}}, false}, }; class ByFileCountTest : public testing::WithParamInterface<FileItemTestD...
No issues found.
FileItemTestDef{{{"/home/user/foo.png", false, ""}, {"/home/user/foo/", true, ""}, {"/home/user/bar/", true, ""}, {"/home/user/foobar/", true, ""}}, false}, }; class ByFileCountTest : public testing::WithParamInterface<FileItemTestD...
@@ -0,0 +1,268 @@ +/* + * Copyright (C) 2005-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv + * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. + */ + +#include "AutoSwitch.h" +#include "FileItemList.h" +#include "music/tags/MusicInfoTag.h" +#include "p...
xbmc/test/TestAutoSwitch.cpp
0
C++
1
none
16
51
51
true
CAutoSwitch: simplify and clean up
26,724
xbmc/xbmc
17,740
C++
notspiff
#include <string> #include <vector> class CFileItem; class CFileItemList; class CueReader; class CCueDocument { class CCueTrack { public: std::string strArtist; std::string strTitle; std::string strFile; int iTrackNumber = 0; int iStartTime = 0; int iEndTime = 0; ReplayGain::Info re...
No issues found.
#include <string> #include <vector> class CFileItem; class CFileItemList; class CueReader; class CCueDocument { class CCueTrack { public: std::string strArtist; std::string strTitle; std::string strFile; int iTrackNumber = 0; int iStartTime = 0; int iEndTime = 0; ReplayGain::Info re...
@@ -13,8 +13,6 @@ #include <string> #include <vector> -#define MAX_PATH_SIZE 1024 - class CFileItem; class CFileItemList; class CueReader; @@ -32,8 +30,9 @@ class CCueDocument int iEndTime = 0; ReplayGain::Info replayGain; }; + public: - ~CCueDocument(void); + ~CCueDocument(); // USED bool ...
xbmc/CueDocument.h
0
C/C++
1
none
16
51
51
true
CueDocument; some janitoring
26,737
xbmc/xbmc
17,740
C++
notspiff
* @return true if the selection was set to the given channel, false otherwise. */ bool SetChannel(std::string_view channel); /*! * @brief Set the control's selection to the given channel and set the control's view port to show the channel. * @param channelNumber the channel's number. * @return true ...
No issues found.
* @return true if the selection was set to the given channel, false otherwise. */ bool SetChannel(std::string_view channel); /*! * @brief Set the control's selection to the given channel and set the control's view port to show the channel. * @param channelNumber the channel's number. * @return true ...
@@ -116,7 +116,7 @@ class CGUIEPGGridContainer : public IGUIContainer void GoToMostLeft(); void GoToMostRight(); - void SetTimelineItems(const std::unique_ptr<CFileItemList>& items, + void SetTimelineItems(const CFileItemList& items, const CDateTime& gridStart, ...
xbmc/pvr/guilib/GUIEPGGridContainer.h
0
C/C++
1
none
16
51
51
true
[PVR] SonarQube findings, round 3
26,752
xbmc/xbmc
17,740
C++
ksooo
const std::string& path{item.GetDynPath()}; if (URIUtils::IsDiscImageStack(path)) { // disc image stacks - every part can have its own resume point CVideoDatabase db; if (!db.Open()) { CLog::LogF(LOGERROR, "Cannot open VideoDatabase"); return {}; } CBookm...
No issues found.
const std::string& path{item.GetDynPath()}; if (URIUtils::IsDiscImageStack(path)) { // disc image stacks - every part can have its own resume point CVideoDatabase db; if (!db.Open()) { CLog::LogF(LOGERROR, "Cannot open VideoDatabase"); return {}; } CBookm...
@@ -121,52 +121,39 @@ std::string FindTrailer(const CFileItem& item) std::string GetOpticalMediaPath(const CFileItem& item) { using namespace std::string_literals; - const auto files = std::array{ - "VIDEO_TS.IFO"s, "VIDEO_TS/VIDEO_TS.IFO"s, + const auto files{std::array{ + "VIDEO_TS.IFO"s, + "...
xbmc/video/VideoUtils.cpp
0
C++
1
none
16
51
51
true
[Video][Bluray] Futher fixes for removable blurays.
26,755
xbmc/xbmc
17,740
C++
78andyp
glGenTextures(1, &m_texture); glBindTexture(GL_TEXTURE_2D, m_texture); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_F...
No issues found.
glGenTextures(1, &m_texture); glBindTexture(GL_TEXTURE_2D, m_texture); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_F...
@@ -17,6 +17,7 @@ #include "cores/VideoPlayer/DVDCodecs/Overlay/DVDOverlayImage.h" #include "cores/VideoPlayer/DVDCodecs/Overlay/DVDOverlaySSA.h" #include "cores/VideoPlayer/DVDCodecs/Overlay/DVDOverlaySpu.h" +#include "rendering/GLExtensions.h" #include "rendering/MatrixGL.h" #include "rendering/gles/RenderSystem...
xbmc/cores/VideoPlayer/VideoRenderers/OverlayRendererGLES.cpp
0
C++
1
none
16
51
51
true
Query GL extensions by enum instead of strings
26,759
xbmc/xbmc
17,740
C++
neo1973
bool CanPause() const; bool CanSeek() const; int GetAudioDelay() const; void GetAudioCapabilities(std::vector<IPlayerAudioCaps>& caps) const; int GetAudioStream(); int GetAudioStreamCount() const; void GetAudioStreamInfo(int index, AudioStreamInfo& info) const; int GetCacheLevel() const; float GetCach...
No issues found.
bool CanPause() const; bool CanSeek() const; int GetAudioDelay() const; void GetAudioCapabilities(std::vector<IPlayerAudioCaps>& caps) const; int GetAudioStream(); int GetAudioStreamCount() const; void GetAudioStreamInfo(int index, AudioStreamInfo& info) const; int GetCacheLevel() const; float GetCach...
@@ -136,6 +136,7 @@ class CApplicationPlayer : public IApplicationComponent bool IsPlayingVideo() const; bool IsPlayingGame() const; bool IsPlayingRDS() const; + bool IsLiveStream() const; void LoadPage(int p, int sp, unsigned char* buffer); bool OnAction(const CAction &action); void OnNothingToQueue...
xbmc/application/ApplicationPlayer.h
0
C/C++
1
none
16
51
51
true
[guiinfo][Estuary] Add guiinfo bool Player.IsLive, update Estuary video OSD to use it
26,764
xbmc/xbmc
17,740
C++
lpuglia
bool CHTTPPythonHandler::CanHandleRequest(const HTTPRequest &request) const { ADDON::AddonPtr addon; std::string path; // try to resolve the addon as any python script must be part of a webinterface if (!CHTTPWebinterfaceHandler::ResolveAddon(request.pathUrl, addon, path) || addon == NULL || addon->Type(...
No issues found.
bool CHTTPPythonHandler::CanHandleRequest(const HTTPRequest &request) const { ADDON::AddonPtr addon; std::string path; // try to resolve the addon as any python script must be part of a webinterface if (!CHTTPWebinterfaceHandler::ResolveAddon(request.pathUrl, addon, path) || addon == NULL || addon->Type(...
@@ -151,10 +151,10 @@ MHD_RESULT CHTTPPythonHandler::HandleRequest() pythonRequest->port = port; } - CHTTPPythonInvoker* pythonInvoker = - new CHTTPPythonWsgiInvoker(&CServiceBroker::GetXBPython(), pythonRequest); - LanguageInvokerPtr languageInvokerPtr(pythonInvoker); - int result = CScri...
xbmc/network/httprequesthandler/HTTPPythonHandler.cpp
0
C++
1
none
16
51
51
true
drop typedef LanguageInvokerPtr
26,781
xbmc/xbmc
17,740
C++
notspiff
std::shared_ptr<CPVRChannelGroupMember> GetNextChannelGroupMember( const std::shared_ptr<const CPVRChannelGroupMember>& groupMember) const; /*! * @brief Get the previous channel group member in this group. * @param groupMember The current channel group member. * @return The channel group member or n...
No issues found.
std::shared_ptr<CPVRChannelGroupMember> GetNextChannelGroupMember( const std::shared_ptr<const CPVRChannelGroupMember>& groupMember) const; /*! * @brief Get the previous channel group member in this group. * @param groupMember The current channel group member. * @return The channel group member or n...
@@ -576,26 +576,10 @@ class CPVRChannelGroup : public IChannelGroupSettingsCallback std::shared_ptr<CPVRChannelGroupSettings> GetSettings() const; - int m_iGroupId = INVALID_GROUP_ID; /*!< The ID of this group in the database */ - bool m_bLoaded = false; /*!< True if this container is loaded, false otherwise *...
xbmc/pvr/channels/PVRChannelGroup.h
0
C/C++
1
none
16
51
51
true
Misc Sonarqube findings, part 3
26,785
xbmc/xbmc
17,740
C++
ksooo
} return false; } namespace { class CPVRRecordingFoldersInProgressEpisodesCountJob : public CJob { public: CPVRRecordingFoldersInProgressEpisodesCountJob( const CFileItemList& folders, const std::vector<std::shared_ptr<CPVRRecording>>& recordings) : m_recordings(recordings) { // Take a copy of or...
No issues found.
} return false; } namespace { class CPVRRecordingFoldersInProgressEpisodesCountJob : public CJob { public: CPVRRecordingFoldersInProgressEpisodesCountJob( const CFileItemList& folders, const std::vector<std::shared_ptr<CPVRRecording>>& recordings) : m_recordings(recordings) { // Take a copy of or...
@@ -73,8 +73,51 @@ bool CPVRGUIDirectory::SupportsWriteFileOperations() const return URIUtils::IsPVRRecording(filename); } +namespace +{ +void ResolveNonPVRItem(CFileItem& item) +{ + if (URIUtils::IsPVRChannel(item.GetDynPath())) + { + const std::shared_ptr<CPVRChannelGroupMember> groupMember{ + CServ...
xbmc/pvr/filesystem/PVRGUIDirectory.cpp
0
C++
1
none
16
51
51
true
[PVR] Fix resolving of plugin-supplied items before playback start.
26,789
xbmc/xbmc
17,740
C++
ksooo
#include <vector> struct IntegerSettingOption; enum class SeekType { VIDEO = 0, MUSIC = 1 }; class CSeekHandler : public ISettingCallback, public KODI::ACTION::IActionListener { public: CSeekHandler() = default; static void SettingOptionsSeekStepsFiller(const std::shared_ptr<const CSetting>& setting, ...
No issues found.
#include <vector> struct IntegerSettingOption; enum class SeekType { VIDEO = 0, MUSIC = 1 }; class CSeekHandler : public ISettingCallback, public KODI::ACTION::IActionListener { public: CSeekHandler() = default; static void SettingOptionsSeekStepsFiller(const std::shared_ptr<const CSetting>& setting, ...
@@ -13,8 +13,8 @@ #include "threads/CriticalSection.h" #include "utils/Stopwatch.h" +#include <array> #include <map> -#include <utility> #include <vector> struct IntegerSettingOption; @@ -29,7 +29,6 @@ class CSeekHandler : public ISettingCallback, public KODI::ACTION::IActionListen { public: CSeekHandler(...
xbmc/SeekHandler.h
0
C/C++
1
none
16
51
51
true
SeekHandler: Some janitoring
26,794
xbmc/xbmc
17,740
C++
notspiff
if (m_actions.empty()) return false; CGUIInfoManager& infoMgr = CServiceBroker::GetGUI()->GetInfoManager(); // take a copy of actions that satisfy our conditions std::vector<std::string> actions; for (const auto &i : m_actions) { if (!i.HasCondition() || infoMgr.EvaluateBool(i.GetCondition(), 0, it...
No issues found.
if (m_actions.empty()) return false; CGUIInfoManager& infoMgr = CServiceBroker::GetGUI()->GetInfoManager(); // take a copy of actions that satisfy our conditions std::vector<std::string> actions; for (const auto &i : m_actions) { if (!i.HasCondition() || infoMgr.EvaluateBool(i.GetCondition(), 0, it...
@@ -29,16 +29,6 @@ CGUIAction::CExecutableAction::CExecutableAction(const std::string& condition, { } -std::string CGUIAction::CExecutableAction::GetCondition() const -{ - return m_condition; -} - -std::string CGUIAction::CExecutableAction::GetAction() const -{ - return m_action; -} - bool CGUIAction::CExecutabl...
xbmc/guilib/GUIAction.cpp
0
C++
1
none
16
51
51
true
[cppcheck] fix performance checks
26,807
xbmc/xbmc
17,740
C++
Rechi
if (codecId == AV_CODEC_ID_DTS) { if (profile == FF_PROFILE_DTS_HD_MA) codecName = "dtshd_ma"; else if (profile == FF_PROFILE_DTS_HD_MA_X) codecName = "dtshd_ma_x"; else if (profile == FF_PROFILE_DTS_HD_MA_X_IMAX) codecName = "dtshd_ma_x_imax"; else if (profile == FF_PROFILE_DTS_HD...
No issues found.
if (codecId == AV_CODEC_ID_DTS) { if (profile == FF_PROFILE_DTS_HD_MA) codecName = "dtshd_ma"; else if (profile == FF_PROFILE_DTS_HD_MA_X) codecName = "dtshd_ma_x"; else if (profile == FF_PROFILE_DTS_HD_MA_X_IMAX) codecName = "dtshd_ma_x_imax"; else if (profile == FF_PROFILE_DTS_HD...
@@ -8,6 +8,10 @@ #include "StreamUtils.h" +#include "guilib/LocalizeStrings.h" + +#include <array> + extern "C" { #include <libavcodec/avcodec.h> @@ -96,3 +100,45 @@ std::string StreamUtils::GetCodecName(int codecId, int profile) return codecName; } + +std::string StreamUtils::GetDefaultLayout(unsigned in...
xbmc/utils/StreamUtils.cpp
0
C++
1
none
16
51
51
true
[GUI] Audio Channels Improvements
26,835
xbmc/xbmc
17,740
C++
CrystalP
{ GLubyte quad = count; vertices[quad].x = 0.0; vertices[quad].y = 0.0; vertices[quad].z = 0; vertices[quad + 1].x = m_context.GetScreenWidth(); vertices[quad + 1].y = 0; vertices[quad + 1].z = 0; vertices[quad + 2].x = m_context.GetScreenWidth(); vertices[quad + 2].y = m_rotatedDe...
No issues found.
{ GLubyte quad = count; vertices[quad].x = 0.0; vertices[quad].y = 0.0; vertices[quad].z = 0; vertices[quad + 1].x = m_context.GetScreenWidth(); vertices[quad + 1].y = 0; vertices[quad + 1].z = 0; vertices[quad + 2].x = m_context.GetScreenWidth(); vertices[quad + 2].y = m_rotatedDe...
@@ -149,7 +149,8 @@ bool CRPRendererOpenGL::Supports(RENDERFEATURE feature) const bool CRPRendererOpenGL::SupportsScalingMethod(SCALINGMETHOD method) { - return method == SCALINGMETHOD::NEAREST || method == SCALINGMETHOD::LINEAR; + return method == SCALINGMETHOD::AUTO || method == SCALINGMETHOD::NEAREST || + ...
xbmc/cores/RetroPlayer/rendering/VideoRenderers/RPRendererOpenGL.cpp
0
C++
1
none
16
51
51
true
RetroPlayer: Add SCALINGMETHOD::AUTO to supported scaling methods
26,853
xbmc/xbmc
17,740
C++
KOPRajs
} void CPVRChannelGroupMember::Serialize(CVariant& value) const { value["channelnumber"] = m_channelNumber.GetChannelNumber(); value["subchannelnumber"] = m_channelNumber.GetSubChannelNumber(); } void CPVRChannelGroupMember::SetChannel(const std::shared_ptr<CPVRChannel>& channel) { // note: no need to set m_bCh...
No issues found.
} void CPVRChannelGroupMember::Serialize(CVariant& value) const { value["channelnumber"] = m_channelNumber.GetChannelNumber(); value["subchannelnumber"] = m_channelNumber.GetSubChannelNumber(); } void CPVRChannelGroupMember::SetChannel(const std::shared_ptr<CPVRChannel>& channel) { // note: no need to set m_bCh...
@@ -87,6 +87,12 @@ void CPVRChannelGroupMember::SetGroupID(int iGroupID) void CPVRChannelGroupMember::SetGroupName(const std::string& groupName) { + if (m_groupName != groupName) + { + m_groupName = groupName; + // Note: do not set m_bNeedsSave here as group name is not stored in database + } + const st...
xbmc/pvr/channels/PVRChannelGroupMember.cpp
0
C++
1
none
16
51
51
true
[PVR] Implement LISTITEM_CHANNEL_GROUP
26,862
xbmc/xbmc
17,740
C++
ksooo
std::make_shared<ADDON::CAddonInfo>("game.controller.one", ADDON::AddonType::GAME_CONTROLLER); ControllerPtr controller1 = std::make_shared<CController>(addonInfo1); ADDON::AddonInfoPtr addonInfo2 = std::make_shared<ADDON::CAddonInfo>("game.controller.two", ADDON::AddonType::GAME_CONTROLLER); Control...
No issues found.
std::make_shared<ADDON::CAddonInfo>("game.controller.one", ADDON::AddonType::GAME_CONTROLLER); ControllerPtr controller1 = std::make_shared<CController>(addonInfo1); ADDON::AddonInfoPtr addonInfo2 = std::make_shared<ADDON::CAddonInfo>("game.controller.two", ADDON::AddonType::GAME_CONTROLLER); Control...
@@ -0,0 +1,264 @@ +/* + * Copyright (C) 2024-2025 Team Kodi + * This file is part of Kodi - https://kodi.tv + * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. + */ + +#include "addons/addoninfo/AddonInfo.h" +#include "addons/addoninfo/AddonType.h" +#include "games/con...
xbmc/games/controllers/test/TestControllerDigest.cpp
0
C++
1
none
16
51
51
true
[Controllers] Add hash digest calculation
26,865
xbmc/xbmc
17,740
C++
garbear
namespace KODI { namespace SHADER { class IShaderPresetLoader; class CShaderPresetFactory { public: /*! * \brief Create the factory and register all shader preset add-ons */ CShaderPresetFactory(ADDON::CAddonMgr& addons); ~CShaderPresetFactory(); /*! * \brief Register an object that can load shader ...
No issues found.
namespace KODI { namespace SHADER { class IShaderPresetLoader; class CShaderPresetFactory { public: /*! * \brief Create the factory and register all shader preset add-ons */ CShaderPresetFactory(ADDON::CAddonMgr& addons); ~CShaderPresetFactory(); /*! * \brief Register an object that can load shader ...
@@ -52,6 +52,15 @@ class CShaderPresetFactory */ void UnregisterLoader(IShaderPresetLoader* loader); + /*! + * \brief Check if any shader preset add-ons have been loaded + * + * This includes add-ons in a failed state. + * + * \return True if any shader preset add-ons are present, false otherwise + ...
xbmc/cores/RetroPlayer/shaders/ShaderPresetFactory.h
0
C/C++
1
none
16
51
51
true
[Shaders] Add "Get more..." button to install shader add-on
26,869
xbmc/xbmc
17,740
C++
garbear
* Attempt to write bufSize bytes from buffer bufPtr into currently opened file. * @param bufPtr pointer to buffer * @param bufSize size of the buffer * @return number of successfully written bytes if any bytes were written, * zero if no bytes were written and no detectable error occur, * ...
No issues found.
* Attempt to write bufSize bytes from buffer bufPtr into currently opened file. * @param bufPtr pointer to buffer * @param bufSize size of the buffer * @return number of successfully written bytes if any bytes were written, * zero if no bytes were written and no detectable error occur, * ...
@@ -180,6 +180,7 @@ class CFile * @return zero of success, -1 otherwise. */ int Stat(struct __stat64 *buffer); + static bool FileExists(const std::string& strPath); static bool Delete(const std::string& strFileName); static bool Rename(const std::string& strFileName, const std::string& strNewFileName); ...
xbmc/filesystem/File.h
0
C/C++
1
none
16
51
51
true
[CURL] Refactored archive CURL parsing
26,871
xbmc/xbmc
17,740
C++
damienruscoe
{"bluray://smb%3a%2f%2fsomepath%2f/BDMV/PLAYLIST/00800.mpls", true, "smb://somepath/"}, {"bluray://smb%3a%2f%2fsomepath%2fDisc%201%2f/BDMV/PLAYLIST/00800.mpls", true, "smb://somepath/"}, {"zip://smb%3a%2f%2fsomepath%2fmovie.zip/BDMV/index.bdmv", true, "smb://somepath/"}}; TEST_P(TestFileItemBasePath, ...
No issues found.
{"bluray://smb%3a%2f%2fsomepath%2f/BDMV/PLAYLIST/00800.mpls", true, "smb://somepath/"}, {"bluray://smb%3a%2f%2fsomepath%2fDisc%201%2f/BDMV/PLAYLIST/00800.mpls", true, "smb://somepath/"}, {"zip://smb%3a%2f%2fsomepath%2fmovie.zip/BDMV/index.bdmv", true, "smb://somepath/"}}; TEST_P(TestFileItemBasePath, ...
@@ -186,3 +186,67 @@ TEST_P(TestFileItemLocalMetadataPath, GetLocalMetadataPath) } INSTANTIATE_TEST_SUITE_P(NameMovies, TestFileItemLocalMetadataPath, ValuesIn(BasePaths)); + +TEST(TestFileItem, TestSimplePathSet) +{ + CFileItem item; + item.SetPath("/local/path/regular/file.txt"); + item.SetDynPath("/local/path...
xbmc/test/TestFileItem.cpp
0
C++
1
none
16
51
51
true
[CURL] Reduce the number of constructions of CURL objects.
26,873
xbmc/xbmc
17,740
C++
damienruscoe
activity.OnInputFrame(); EXPECT_FLOAT_EQ(activity.GetActivation(), 1.0f); // Holding a button should keep the controller active regardless // of the motion timeout. Sleep for a generous amount of time to // avoid timing issues on slow machines. std::this_thread::sleep_for(150ms); EXPECT_FLOAT_EQ(activi...
No issues found.
activity.OnInputFrame(); EXPECT_FLOAT_EQ(activity.GetActivation(), 1.0f); // Holding a button should keep the controller active regardless // of the motion timeout. Sleep for a generous amount of time to // avoid timing issues on slow machines. std::this_thread::sleep_for(150ms); EXPECT_FLOAT_EQ(activi...
@@ -0,0 +1,143 @@ +/* + * Copyright (C) 2025 Team Kodi + * This file is part of Kodi - https://kodi.tv + * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. + */ + +#include "games/controllers/input/ControllerActivity.h" + +#include <chrono> +#include <thread> + +#includ...
xbmc/games/controllers/input/test/TestControllerActivity.cpp
0
C++
1
none
16
51
51
true
[Mouse] Highlight mouse on pointer motion
26,876
xbmc/xbmc
17,740
C++
garbear
{ // Build a hub containing a single mouse port CPortNode mousePort; mousePort.SetPortType(PORT_TYPE::MOUSE); mousePort.SetPortID(MOUSE_PORT_ID); mousePort.SetAddress(MOUSE_PORT_ADDRESS); CControllerHub hub; hub.SetPorts({mousePort}); // Query mouse ports std::vector<std::string> mousePorts; hub.G...
No issues found.
{ // Build a hub containing a single mouse port CPortNode mousePort; mousePort.SetPortType(PORT_TYPE::MOUSE); mousePort.SetPortID(MOUSE_PORT_ID); mousePort.SetAddress(MOUSE_PORT_ADDRESS); CControllerHub hub; hub.SetPorts({mousePort}); // Query mouse ports std::vector<std::string> mousePorts; hub.G...
@@ -0,0 +1,137 @@ +/* + * Copyright (C) 2025 Team Kodi + * This file is part of Kodi - https://kodi.tv + * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. + */ + +#include "addons/kodi-dev-kit/include/kodi/c-api/addon-instance/game.h" +#include "games/controllers/types...
xbmc/games/controllers/input/test/TestPortNodeInput.cpp
0
C++
1
none
16
51
51
true
[Controllers] Fix disabling keyboard and mouse in game
26,879
xbmc/xbmc
17,740
C++
garbear
protected: virtual void Process(); bool DoScan(const std::string& strDirectory) override; InfoRet RetrieveInfoForTvShow(CFileItem* pItem, bool bDirNames, ADDON::ScraperPtr& scraper, bool useLocal, ...
No issues found.
protected: virtual void Process(); bool DoScan(const std::string& strDirectory) override; InfoRet RetrieveInfoForTvShow(CFileItem* pItem, bool bDirNames, ADDON::ScraperPtr& scraper, bool useLocal, ...
@@ -294,26 +294,9 @@ namespace KODI::VIDEO bool m_scanAll; bool m_ignoreVideoVersions{false}; bool m_ignoreVideoExtras{false}; - std::string m_strStartDir; CVideoDatabase m_database; - std::set<std::string> m_pathsToCount; std::set<int> m_pathsToClean; std::shared_ptr<CAdvancedSettin...
xbmc/video/VideoInfoScanner.h
0
C/C++
1
none
16
51
51
true
[VideoInfoScanner] Removed unused class variables. Moved private stat…
26,880
xbmc/xbmc
17,740
C++
damienruscoe
DeleteMovieCascadeAction action = DeleteMovieCascadeAction::ALL_ASSETS, DeleteMovieHashAction hashAction = DeleteMovieHashAction::HASH_DELETE); void DeleteTvShow(int idTvShow, bool bKeepId = false); void DeleteTvShow(const std::string& strPath); void DeleteSeason(int idSeason...
No issues found.
DeleteMovieCascadeAction action = DeleteMovieCascadeAction::ALL_ASSETS, DeleteMovieHashAction hashAction = DeleteMovieHashAction::HASH_DELETE); void DeleteTvShow(int idTvShow, bool bKeepId = false); void DeleteTvShow(const std::string& strPath); void DeleteSeason(int idSeason...
@@ -1094,24 +1094,20 @@ class CVideoDatabase : public CDatabase */ unsigned int GetRandomMusicVideoIDs(const std::string& strWhere, std::vector<std::pair<int, int> > &songIDs); - static void VideoContentTypeToString(VideoDbContentType type, std::string& out) + static MediaType VideoContentTypeToString(VideoDb...
xbmc/video/VideoDatabase.h
0
C/C++
1
none
16
51
51
true
[VideoDatabase] Better interface for `VideoContentTypeToString`
26,883
xbmc/xbmc
17,740
C++
damienruscoe
return 0; } bool CVideoInfoTag::HasPremiered() const { return m_bHasPremiered; } const CDateTime& CVideoInfoTag::GetPremiered() const { return m_premiered; } const CDateTime& CVideoInfoTag::GetFirstAired() const { return m_firstAired; } std::string CVideoInfoTag::GetUniqueID(std::string type) const { if (...
No issues found.
return 0; } bool CVideoInfoTag::HasPremiered() const { return m_bHasPremiered; } const CDateTime& CVideoInfoTag::GetPremiered() const { return m_premiered; } const CDateTime& CVideoInfoTag::GetFirstAired() const { return m_firstAired; } std::string CVideoInfoTag::GetUniqueID(std::string type) const { if (...
@@ -898,6 +898,11 @@ void CVideoInfoTag::ToSortable(SortItem& sortable, Field field) const } } +int CVideoInfoTag::GetDatabaseId() const +{ + return m_iDbId; +} + CRating CVideoInfoTag::GetRating(std::string type) const { if (type.empty())
xbmc/video/VideoInfoTag.cpp
0
C++
1
none
16
51
51
true
[AnnouncementManager] Refactor large method into 4 smaller functions
26,903
xbmc/xbmc
17,740
C++
damienruscoe
m_dateNew = dateNew; } void CMusicInfoTag::SetCompilation(bool compilation) { m_bCompilation = compilation; } void CMusicInfoTag::SetBoxset(bool boxset) { m_bBoxset = boxset; } void CMusicInfoTag::SetLoaded(bool bOnOff) { m_bLoaded = bOnOff; } bool CMusicInfoTag::Loaded() const { return m_bLoaded; } void...
No issues found.
m_dateNew = dateNew; } void CMusicInfoTag::SetCompilation(bool compilation) { m_bCompilation = compilation; } void CMusicInfoTag::SetBoxset(bool boxset) { m_bBoxset = boxset; } void CMusicInfoTag::SetLoaded(bool bOnOff) { m_bLoaded = bOnOff; } bool CMusicInfoTag::Loaded() const { return m_bLoaded; } void...
@@ -80,7 +80,7 @@ const std::vector<std::string>& CMusicInfoTag::GetArtist() const return m_artist; } -const std::string CMusicInfoTag::GetArtistString() const +std::string CMusicInfoTag::GetArtistString() const { if (!m_strArtistDesc.empty()) return m_strArtistDesc; @@ -115,7 +115,7 @@ const std::string...
xbmc/music/tags/MusicInfoTag.cpp
0
C++
1
none
16
51
51
true
[VideoInfoTag][MusicInfoTag] Misc SonarQube findings
26,911
xbmc/xbmc
17,740
C++
ksooo
} uint64_t CSavestateFlatBuffer::TimestampFrames() const { return m_savestate->timestamp_frames(); } void CSavestateFlatBuffer::SetTimestampFrames(uint64_t timestampFrames) { m_timestampFrames = timestampFrames; } double CSavestateFlatBuffer::TimestampWallClock() const { if (m_savestate != nullptr) return ...
No issues found.
} uint64_t CSavestateFlatBuffer::TimestampFrames() const { return m_savestate->timestamp_frames(); } void CSavestateFlatBuffer::SetTimestampFrames(uint64_t timestampFrames) { m_timestampFrames = timestampFrames; } double CSavestateFlatBuffer::TimestampWallClock() const { if (m_savestate != nullptr) return ...
@@ -396,6 +396,19 @@ void CSavestateFlatBuffer::SetNominalHeight(unsigned int nominalHeight) m_nominalHeight = nominalHeight; } +float CSavestateFlatBuffer::GetNominalDisplayAspectRatio() const +{ + if (m_savestate != nullptr) + return m_savestate->nominal_display_aspect_ratio(); + + return 0.0f; +} + +void ...
xbmc/cores/RetroPlayer/savestates/SavestateFlatBuffer.cpp
0
C++
1
none
16
51
51
true
[Game API v4.1.0] Add libretro display aspect ratio support
26,923
xbmc/xbmc
17,740
C++
garbear
/// @brief Some games have a built-in clock to keep track of time. /// /// This memory is usually just a couple of bytes to keep track of time. GAME_MEMORY_RTC = 1, /// @brief System ram lets a frontend peek into a game systems main RAM GAME_MEMORY_SYSTEM_RAM = 2, /// @brief Video ram lets...
No issues found.
/// @brief Some games have a built-in clock to keep track of time. /// /// This memory is usually just a couple of bytes to keep track of time. GAME_MEMORY_RTC = 1, /// @brief System ram lets a frontend peek into a game systems main RAM GAME_MEMORY_SYSTEM_RAM = 2, /// @brief Video ram lets...
@@ -1,5 +1,5 @@ /* - * Copyright (C) 2014-2024 Team Kodi + * Copyright (C) 2014-2025 Team Kodi * This file is part of Kodi - https://kodi.tv * * SPDX-License-Identifier: GPL-2.0-or-later @@ -22,50 +22,50 @@ extern "C" /// @ingroup cpp_kodi_addon_game_Defs /// @brief **Game add-on error codes** /// -...
xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/game.h
0
C/C++
1
none
16
51
51
true
[Game API] Fix grammar and improve docs
26,924
xbmc/xbmc
17,740
C++
garbear
if (m_bitStreamStats && nBytes>0) m_bitStreamStats->AddSampleBytes(nBytes); return nBytes; } else { const ssize_t nBytes = m_pBuffer->sgetn((char*)lpBuf, uiBufSize); if (m_bitStreamStats && nBytes>0) m_bitStreamStats->AddSampleBytes(nBytes); return nBytes; }...
No issues found.
if (m_bitStreamStats && nBytes>0) m_bitStreamStats->AddSampleBytes(nBytes); return nBytes; } else { const ssize_t nBytes = m_pBuffer->sgetn((char*)lpBuf, uiBufSize); if (m_bitStreamStats && nBytes>0) m_bitStreamStats->AddSampleBytes(nBytes); return nBytes; }...
@@ -268,7 +268,7 @@ bool CFile::Open(const CURL& file, const unsigned int flags) if (url2.IsProtocol("apk") || url2.IsProtocol("zip") ) url2.SetOptions(""); - if (!g_directoryCache.FileExists(url2.Get(), bPathInCache) ) + if (!g_directoryCache.FileExists(url2, bPathInCache)) { if (bPathI...
xbmc/filesystem/File.cpp
0
C++
1
none
16
51
51
true
[DirectoryCache] Reduce construction of expensive CURL objects.
26,927
xbmc/xbmc
17,740
C++
damienruscoe
return true; CURL url(strPath); if (HasParentInHostname(url)) return IsOnLAN(url.GetHostName(), lanCheckMode); if(!IsRemote(strPath)) return false; const std::string& host = url.GetHostName(); return IsHostOnLAN(host, lanCheckMode); } static bool addr_match(uint32_t addr, const char* target, ...
No issues found.
return true; CURL url(strPath); if (HasParentInHostname(url)) return IsOnLAN(url.GetHostName(), lanCheckMode); if(!IsRemote(strPath)) return false; const std::string& host = url.GetHostName(); return IsHostOnLAN(host, lanCheckMode); } static bool addr_match(uint32_t addr, const char* target, ...
@@ -870,7 +870,8 @@ bool URIUtils::IsHostOnLAN(const std::string& host, LanCheckMode lanCheckMode) if(address == INADDR_NONE) { std::string ip; - if (CServiceBroker::GetDNSNameCache()->Lookup(host, ip)) + auto cache = CServiceBroker::GetDNSNameCache(); + if (cache && cache->Lookup(host, ip)) ...
xbmc/utils/URIUtils.cpp
0
C++
1
none
16
51
51
true
[CURL] Trying to test functions which call DNSCache::Lookup failed du…
26,930
xbmc/xbmc
17,740
C++
damienruscoe
CSettingsManager* settingsMgr = settings->GetSettings()->GetSettingsManager(); settings->GetAdvancedSettings()->Uninitialize(*settingsMgr); settings->GetAdvancedSettings()->Initialize(*settingsMgr); } class TestFileItemBasePath : public AdvancedSettingsResetBase, public WithParamInte...
No issues found.
CSettingsManager* settingsMgr = settings->GetSettings()->GetSettingsManager(); settings->GetAdvancedSettings()->Uninitialize(*settingsMgr); settings->GetAdvancedSettings()->Initialize(*settingsMgr); } class TestFileItemBasePath : public AdvancedSettingsResetBase, public WithParamInte...
@@ -27,6 +27,13 @@ struct TestFileData const char *base; }; +struct TestNameData +{ + const char* file; + bool use_folder; + const char* name; +}; + class AdvancedSettingsResetBase : public Test { public: @@ -47,6 +54,50 @@ class TestFileItemBasePath : public AdvancedSettingsResetBase, { }; +class TestF...
xbmc/test/TestFileItem.cpp
0
C++
1
none
16
51
51
true
[Video] Fix GetMovieName(), GetMovieBasePath() and GetBasePath() to better handle optical media, bluray:// paths and Disc n subdirectories. Add tests.
26,938
xbmc/xbmc
17,740
C++
78andyp