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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
*/
if (i < artistHints.size())
artistName = artistHints[i];
else
artistName = artistId;
// Use artist sort name providing we have as many as we have mbid,
// otherwise something is wrong with them so ignore and leave blank
if (artistSort.size() == mbids.size())
... | No issues found. | */
if (i < artistHints.size())
artistName = artistHints[i];
else
artistName = artistId;
// Use artist sort name providing we have as many as we have mbid,
// otherwise something is wrong with them so ignore and leave blank
if (artistSort.size() == mbids.size())
... | @@ -76,6 +76,7 @@ CSong::CSong(CFileItem& item)
iBitRate = tag.GetBitRate();
iChannels = tag.GetNoOfChannels();
songVideoURL = tag.GetSongVideoURL();
+ m_chapters = tag.GetChapterMarks();
}
CSong::CSong()
@@ -284,6 +285,7 @@ void CSong::Clear()
iSampleRate = 0;
iChannels = 0;
songVideoURL.clear(... | xbmc/music/Song.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | [Music] Add chapter frame reading for mp3 files to taglib. Store the… | 26,941 | xbmc/xbmc | 17,740 | C++ | the-black-eagle | |
* \ingroup games
* \brief Methods for stretching the game to the viewing area
*/
enum class STRETCHMODE
{
/*!
* \brief Show the game at its normal aspect ratio
*/
Normal,
/*!
* \brief Show the game at 1:1 PAR
*/
Normal1x1,
/*!
* \brief Stretch the game to maintain a 4:3 aspect ratio
*/
... | No issues found. | * \ingroup games
* \brief Methods for stretching the game to the viewing area
*/
enum class STRETCHMODE
{
/*!
* \brief Show the game at its normal aspect ratio
*/
Normal,
/*!
* \brief Show the game at 1:1 PAR
*/
Normal1x1,
/*!
* \brief Stretch the game to maintain a 4:3 aspect ratio
*/
... | @@ -33,16 +33,38 @@ enum class STRETCHMODE
*/
Normal,
+ /*!
+ * \brief Show the game at 1:1 PAR
+ */
+ Normal1x1,
+
/*!
* \brief Stretch the game to maintain a 4:3 aspect ratio
*/
Stretch4x3,
+ /*!
+ * \brief Stretch the game to maintain a 16:9 aspect ratio
+ */
+ Stretch16x9,
+
... | xbmc/cores/GameSettings.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | RetroPlayer: Add integer scaling support | 26,951 | xbmc/xbmc | 17,740 | C++ | KOPRajs | |
}
void CRPBaseRenderer::SetScalingMethod(SCALINGMETHOD method)
{
m_renderSettings.VideoSettings().SetScalingMethod(method);
}
void CRPBaseRenderer::SetStretchMode(STRETCHMODE stretchMode)
{
m_renderSettings.VideoSettings().SetRenderStretchMode(stretchMode);
}
void CRPBaseRenderer::SetRenderRotation(unsigned int ... | No issues found. | }
void CRPBaseRenderer::SetScalingMethod(SCALINGMETHOD method)
{
m_renderSettings.VideoSettings().SetScalingMethod(method);
}
void CRPBaseRenderer::SetStretchMode(STRETCHMODE stretchMode)
{
m_renderSettings.VideoSettings().SetRenderStretchMode(stretchMode);
}
void CRPBaseRenderer::SetRenderRotation(unsigned int ... | @@ -183,7 +183,7 @@ void CRPBaseRenderer::ManageRenderArea(const IRenderBuffer& renderBuffer)
float screenPixelRatio;
GetScreenDimensions(screenWidth, screenHeight, screenPixelRatio);
- // Entire target rendering area for the video (including black bars)
+ // Get target rendering area for the game view window... | xbmc/cores/RetroPlayer/rendering/VideoRenderers/RPBaseRenderer.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | RetroPlayer: Fix video shaders scaling | 26,961 | xbmc/xbmc | 17,740 | C++ | KOPRajs | |
auto const& windowed = CDisplaySettings::GetInstance().GetResolutionInfo(RES_WINDOW);
// Kodi resolution is buffer size, but SetResolutionInternal expects
// surface size, so divide by m_scale
size = CSizeInt{windowed.iWidth, windowed.iHeight} / newScale;
CLog::LogF(LOGDEBUG, "Ad... | No issues found. | auto const& windowed = CDisplaySettings::GetInstance().GetResolutionInfo(RES_WINDOW);
// Kodi resolution is buffer size, but SetResolutionInternal expects
// surface size, so divide by m_scale
size = CSizeInt{windowed.iWidth, windowed.iHeight} / newScale;
CLog::LogF(LOGDEBUG, "Ad... | @@ -139,10 +139,7 @@ CWinSystemWayland::CWinSystemWayland()
m_winEvents = std::make_unique<CWinEventsWayland>();
}
-CWinSystemWayland::~CWinSystemWayland() noexcept
-{
- DestroyWindowSystem();
-}
+CWinSystemWayland::~CWinSystemWayland() noexcept = default;
bool CWinSystemWayland::InitWindowSystem()
{ | xbmc/windowing/wayland/WinSystemWayland.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | Fixed use-after-free of Wayland Connection on webOS | 26,964 | xbmc/xbmc | 17,740 | C++ | mariotaku | |
{
const int64_t offset{VIDEO::UTILS::GetStackPartResumeOffset(*GetItem(), m_chosenStackPart)};
if (offset > 0)
return ChoosePlayOrResume(VIDEO::UTILS::GetResumeString(offset, m_chosenStackPart));
}
else if (URIUtils::IsStack(GetItem()->GetDynPath()))
{
const auto [offset, partNumber] = VIDEO::... | No issues found. | {
const int64_t offset{VIDEO::UTILS::GetStackPartResumeOffset(*GetItem(), m_chosenStackPart)};
if (offset > 0)
return ChoosePlayOrResume(VIDEO::UTILS::GetResumeString(offset, m_chosenStackPart));
}
else if (URIUtils::IsStack(GetItem()->GetDynPath()))
{
const auto [offset, partNumber] = VIDEO::... | @@ -49,7 +49,7 @@ bool CVideoPlayActionProcessor::Process(Action action)
{
if (m_chooseStackPart && m_chosenStackPart == 0)
{
- if (!URIUtils::IsStack(m_item->GetDynPath()))
+ if (!URIUtils::IsStack(GetItem()->GetDynPath()))
{
CLog::LogF(LOGERROR, "Invalid item (not a stack)!");
return t... | xbmc/video/guilib/VideoPlayActionProcessor.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | [video] SonarQube finding: Make CVideoActionProcessorBase members m_item and m_userCancelled private. | 26,975 | xbmc/xbmc | 17,740 | C++ | ksooo | |
UserInput((bd_vk_key_e)(BD_VK_0 + iButton));
}
int GetCurrentButton() override { return 0; }
int GetTotalButtons() override { return 0; }
void OnUp() override { UserInput(BD_VK_UP); }
void OnDown() override { UserInput(BD_VK_DOWN); }
void OnLeft() override { UserInput(BD_VK_LEFT); }
void OnRight... | No issues found. | UserInput((bd_vk_key_e)(BD_VK_0 + iButton));
}
int GetCurrentButton() override { return 0; }
int GetTotalButtons() override { return 0; }
void OnUp() override { UserInput(BD_VK_UP); }
void OnDown() override { UserInput(BD_VK_DOWN); }
void OnLeft() override { UserInput(BD_VK_LEFT); }
void OnRight... | @@ -132,6 +132,7 @@ class CDVDInputStreamBluray
void OverlayCallbackARGB(const struct bd_argb_overlay_s * const);
#endif
+ BLURAY_TITLE_INFO* GetTitleFromState(const std::string& xmlstate);
BLURAY_TITLE_INFO* GetTitleLongest();
BLURAY_TITLE_INFO* GetTitleFile(const std::string& name);
| xbmc/cores/VideoPlayer/DVDInputStreams/DVDInputStreamBluray.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | [VideoPlayer][Bluray] Fix #26943 - on bluray resume audio/subs (inc external subs) language is not restored. | 26,980 | xbmc/xbmc | 17,740 | C++ | 78andyp | |
}
}
if (!parameter.empty() || parameters.size())
parameters.push_back(parameter);
}
int CUtil::GetMatchingSource(const std::string& strPath1, VECSOURCES& VECSOURCES, bool& bIsSourceName)
{
if (strPath1.empty())
return -1;
// copy as we may change strPath
std::string strPath = strPath1;
// Che... | No issues found. | }
}
if (!parameter.empty() || parameters.size())
parameters.push_back(parameter);
}
int CUtil::GetMatchingSource(const std::string& strPath1, VECSOURCES& VECSOURCES, bool& bIsSourceName)
{
if (strPath1.empty())
return -1;
// copy as we may change strPath
std::string strPath = strPath1;
// Che... | @@ -1905,7 +1905,10 @@ void CUtil::GetVideoBasePathAndFileName(const std::string& videoPath, std::strin
basePath = item.GetVideoInfoTag()->m_basePath;
if (basePath.empty() && item.IsOpticalMediaFile())
+ {
+ videoFileName = item.GetMovieName();
basePath = item.GetLocalMetadataPath();
+ }
CURL u... | xbmc/Util.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | [VideoPlayer][Bluray][Backport] Fix #26943 - on bluray resume audio/subs (inc external subs) language is not restored. | 26,981 | xbmc/xbmc | 17,740 | C++ | 78andyp | |
};
} // namespace fmt
#endif
class CLog : public ISettingsHandler, public ISettingCallback
{
public:
// id of the "general" log component
static constexpr uint32_t LOG_COMPONENT_GENERAL = 0;
CLog();
~CLog() override;
// implementation of ISettingsHandler
void OnSettingsLoaded() override;
// implementa... | No issues found. | };
} // namespace fmt
#endif
class CLog : public ISettingsHandler, public ISettingCallback
{
public:
// id of the "general" log component
static constexpr uint32_t LOG_COMPONENT_GENERAL = 0;
CLog();
~CLog() override;
// implementation of ISettingsHandler
void OnSettingsLoaded() override;
// implementa... | @@ -59,6 +59,9 @@ struct formatter<std::atomic<T>, Char> : formatter<T, Char>
class CLog : public ISettingsHandler, public ISettingCallback
{
public:
+ // id of the "general" log component
+ static constexpr uint32_t LOG_COMPONENT_GENERAL = 0;
+
CLog();
~CLog() override;
@@ -95,15 +98,15 @@ class CLog : pu... | xbmc/utils/log.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | [utils/log.*] Use a dedicated logger for every pre-defined logging component | 26,983 | xbmc/xbmc | 17,740 | C++ | ksooo | |
void CShaderGLES::PrepareParameters(
const RETRO::ViewportCoordinates& dest,
IShaderTexture& sourceTexture,
const std::vector<std::unique_ptr<IShaderTexture>>& pShaderTextures,
const std::vector<std::unique_ptr<IShader>>& pShaders,
uint64_t frameCount)
{
if (m_passIdx + 1 != pShaders.size()) // N... | No issues found. |
void CShaderGLES::PrepareParameters(
const RETRO::ViewportCoordinates& dest,
IShaderTexture& sourceTexture,
const std::vector<std::unique_ptr<IShaderTexture>>& pShaderTextures,
const std::vector<std::unique_ptr<IShader>>& pShaders,
uint64_t frameCount)
{
if (m_passIdx + 1 != pShaders.size()) // N... | @@ -18,17 +18,14 @@
#include "utils/URIUtils.h"
#include "utils/log.h"
-using namespace KODI;
-using namespace SHADER;
+using namespace KODI::SHADER;
-CShaderGLES::CShaderGLES(RETRO::CRenderContext& context)
-{
-}
+CShaderGLES::CShaderGLES() = default;
CShaderGLES::~CShaderGLES()
{
glDeleteBuffers(1, &m_sh... | xbmc/cores/RetroPlayer/shaders/gles/ShaderGLES.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | [cores/Retroplayer/shaders] Misc SonarQube findings, episode 2 | 26,985 | xbmc/xbmc | 17,740 | C++ | ksooo | |
static constexpr uint32_t LOG_COMPONENT_GENERAL = 0;
CLog();
~CLog() override;
// implementation of ISettingsHandler
void OnSettingsLoaded() override;
// implementation of ISettingCallback
void OnSettingChanged(const std::shared_ptr<const CSetting>& setting) override;
void Initialize(const std::stri... | No issues found. | static constexpr uint32_t LOG_COMPONENT_GENERAL = 0;
CLog();
~CLog() override;
// implementation of ISettingsHandler
void OnSettingsLoaded() override;
// implementation of ISettingCallback
void OnSettingChanged(const std::shared_ptr<const CSetting>& setting) override;
void Initialize(const std::stri... | @@ -121,6 +121,16 @@ class CLog : public ISettingsHandler, public ISettingCallback
GetInstance().FormatAndLogInternal(level, component, format, fmt::make_format_args(args...));
}
+ template<typename... Args>
+ static void Log(const std::string& loggerName,
+ int level,
+ fm... | xbmc/utils/log.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | [addons] Use a dedicated logger for every binary addon instance | 26,987 | xbmc/xbmc | 17,740 | C++ | ksooo | |
bool CGUIDialogPVRTimerSettings::Save()
{
if (!Validate())
return false;
// Timer type
m_timerInfoTag->SetTimerType(m_timerType);
// Timer active/inactive
m_timerInfoTag->m_state = m_bTimerActive ? PVR_TIMER_STATE_SCHEDULED : PVR_TIMER_STATE_DISABLED;
// Name
m_timerInfoTag->m_strTitle = m_strTitl... | No issues found. |
bool CGUIDialogPVRTimerSettings::Save()
{
if (!Validate())
return false;
// Timer type
m_timerInfoTag->SetTimerType(m_timerType);
// Timer active/inactive
m_timerInfoTag->m_state = m_bTimerActive ? PVR_TIMER_STATE_SCHEDULED : PVR_TIMER_STATE_DISABLED;
// Name
m_timerInfoTag->m_strTitle = m_strTitl... | @@ -898,7 +898,7 @@ void CGUIDialogPVRTimerSettings::AddCondition(const std::shared_ptr<CSetting>& s
const std::string& identifier,
const SettingConditionCheck& condition,
Setting... | xbmc/pvr/dialogs/GUIDialogPVRTimerSettings.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | Random SonarQube findings which were introduced lately | 26,994 | xbmc/xbmc | 17,740 | C++ | ksooo | |
void CProgressJob::SetProgressIndicators(CGUIDialogProgressBarHandle* progressBar, CGUIDialogProgress* progressDialog, bool updateProgress /* = true */, bool updateInformation /* = true */)
{
SetProgressBar(progressBar);
SetProgressDialog(progressDialog);
SetUpdateProgress(updateProgress);
SetUpdateInformation... | No issues found. |
void CProgressJob::SetProgressIndicators(CGUIDialogProgressBarHandle* progressBar, CGUIDialogProgress* progressDialog, bool updateProgress /* = true */, bool updateInformation /* = true */)
{
SetProgressBar(progressBar);
SetProgressDialog(progressDialog);
SetUpdateProgress(updateProgress);
SetUpdateInformation... | @@ -18,21 +18,17 @@
#include <math.h>
CProgressJob::CProgressJob()
- : m_progress(NULL),
- m_progressDialog(NULL)
{ }
-CProgressJob::CProgressJob(CGUIDialogProgressBarHandle* progressBar)
- : m_progress(progressBar),
- m_progressDialog(NULL)
+CProgressJob::CProgressJob(CGUIDialogProgressBarHandle* progre... | xbmc/utils/ProgressJob.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | [Utils] Remove redundant mutable keyword. | 26,995 | xbmc/xbmc | 17,740 | C++ | damienruscoe | |
const std::string GetArtistString() const;
/*! \brief Get song artist IDs (for json rpc) from the vector of artistcredits objects
\return album artist IDs as a vector of integers
*/
const std::vector<int> GetArtistIDArray() const;
/*! \brief Get album artist names associated with song from tag data
Not... | No issues found. | const std::string GetArtistString() const;
/*! \brief Get song artist IDs (for json rpc) from the vector of artistcredits objects
\return album artist IDs as a vector of integers
*/
const std::vector<int> GetArtistIDArray() const;
/*! \brief Get album artist names associated with song from tag data
Not... | @@ -49,7 +49,7 @@ struct ChapterDetails
std::chrono::milliseconds endTimeMs{0};
};
-using ChapterMarks = std::map<int, ChapterDetails>;
+using ChapterMarks = std::vector<ChapterDetails>;
/*!
\ingroup music | xbmc/music/Song.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | Add mp3 chapters to music database and display in GUI | 26,997 | xbmc/xbmc | 17,740 | C++ | the-black-eagle | |
XBMC_REF_FILE_PATH("xbmc/video/test/testdata/moviestack_ab/Movie-(2001)");
CFileItemList items;
CDirectory::GetDirectory(movieFolder, items, VIDEO_EXTENSIONS, DIR_FLAG_DEFAULTS);
// make sure items has 2 items (the two movie parts)
EXPECT_EQ(items.Size(), 2);
// stack the items and make sure we end up w... | No issues found. | XBMC_REF_FILE_PATH("xbmc/video/test/testdata/moviestack_ab/Movie-(2001)");
CFileItemList items;
CDirectory::GetDirectory(movieFolder, items, VIDEO_EXTENSIONS, DIR_FLAG_DEFAULTS);
// make sure items has 2 items (the two movie parts)
EXPECT_EQ(items.Size(), 2);
// stack the items and make sure we end up w... | @@ -73,3 +73,46 @@ TEST_F(TestStacks, TestMovieFilesStackDvdIso)
// check the single item in the stack is a stack://
EXPECT_EQ(items.Get(0)->IsStack(), true);
}
+
+TEST_F(TestStacks, TestMovieFilesStackFolderFilesPart)
+{
+ const std::string movieFolder =
+ XBMC_REF_FILE_PATH("xbmc/video/test/testdata/movi... | xbmc/video/test/TestStacks.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | [FileItemList][RegExUtils] Avoid calling compilations of a list of regexes in a hot path. | 26,998 | xbmc/xbmc | 17,740 | C++ | damienruscoe | |
/*!
* @brief Check if the playcount is set
* @return True if play count value is set
*/
virtual bool IsPlayCountSet() const;
/*!
* @brief Get this videos's resume point.
* @return the resume point.
*/
virtual CBookmark GetResumePoint() const;
/*!
* @brief Set this videos's resume point.... | No issues found. | /*!
* @brief Check if the playcount is set
* @return True if play count value is set
*/
virtual bool IsPlayCountSet() const;
/*!
* @brief Get this videos's resume point.
* @return the resume point.
*/
virtual CBookmark GetResumePoint() const;
/*!
* @brief Set this videos's resume point.... | @@ -150,8 +150,8 @@ class CVideoInfoTag : public IArchivable, public ISerializable, public ISortable
void SetPremieredFromDBDate(const std::string& premieredString);
virtual void SetYear(int year);
void SetArtist(std::vector<std::string> artist);
- void SetSet(std::string set);
- void SetSetOverview(std::str... | xbmc/video/VideoInfoTag.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | [clang-tidy] fix performance-* warnings | 27,004 | xbmc/xbmc | 17,740 | C++ | Rechi | |
bool DeleteMovie(int idMovie,
DeleteMovieCascadeAction action = DeleteMovieCascadeAction::ALL_ASSETS,
DeleteMovieHashAction hashAction = DeleteMovieHashAction::HASH_DELETE);
void DeleteTvShow(int idTvShow, bool bKeepId = false);
void DeleteTvShow(const std::string& strPath);
... | No issues found. | bool DeleteMovie(int idMovie,
DeleteMovieCascadeAction action = DeleteMovieCascadeAction::ALL_ASSETS,
DeleteMovieHashAction hashAction = DeleteMovieHashAction::HASH_DELETE);
void DeleteTvShow(int idTvShow, bool bKeepId = false);
void DeleteTvShow(const std::string& strPath);
... | @@ -1515,4 +1515,11 @@ class CVideoDatabase : public CDatabase
static void AnnounceUpdate(const std::string& content, int id);
static CDateTime GetDateAdded(const std::string& filename, CDateTime dateAdded = CDateTime());
+
+ /*! \brief Create a new file to replace an old one (ie. for bluray playlists), preser... | xbmc/video/VideoDatabase.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | [Video][Bluray] Couple of small bluray related fixes. | 27,005 | xbmc/xbmc | 17,740 | C++ | 78andyp | |
#include <memory>
#include <stdint.h>
namespace KODI
{
namespace RETRO
{
class CRenderBufferManager;
class CRenderVideoSettings;
class CRPBaseRenderer;
class IRenderBuffer;
class IRenderBufferPool : public std::enable_shared_from_this<IRenderBufferPool>
{
public:
virtual ~IRenderBufferPool() = default;
virtual v... | No issues found. | #include <memory>
#include <stdint.h>
namespace KODI
{
namespace RETRO
{
class CRenderBufferManager;
class CRenderVideoSettings;
class CRPBaseRenderer;
class IRenderBuffer;
class IRenderBufferPool : public std::enable_shared_from_this<IRenderBufferPool>
{
public:
virtual ~IRenderBufferPool() = default;
virtual v... | @@ -70,6 +70,15 @@ class IRenderBufferPool : public std::enable_shared_from_this<IRenderBufferPool>
* \brief Call in GetBuffer() before returning buffer to caller
*/
virtual std::shared_ptr<IRenderBufferPool> GetPtr() { return shared_from_this(); }
+
+ /*!
+ * \brief Release resources tied to the renderin... | xbmc/cores/RetroPlayer/buffers/IRenderBufferPool.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | [RetroPlayer] Add a frame-ended callback for FBO plumbing (needed for GL support) | 27,007 | xbmc/xbmc | 17,740 | C++ | garbear | |
{
it = m_vecPlayerCallbackList.erase(it);
m_vecPlayerCallbackList.hadSomethingRemoved = true;
}
else
++it;
}
}
void XBPython::RegisterPythonMonitorCallBack(XBMCAddon::xbmc::Monitor* pCallback)
{
XBMC_TRACE;
std::unique_lock lock(m_vecMonitorCallbackList);
m_vecMonitorCallbackList.... | No issues found. | {
it = m_vecPlayerCallbackList.erase(it);
m_vecPlayerCallbackList.hadSomethingRemoved = true;
}
else
++it;
}
}
void XBPython::RegisterPythonMonitorCallBack(XBMCAddon::xbmc::Monitor* pCallback)
{
XBMC_TRACE;
std::unique_lock lock(m_vecMonitorCallbackList);
m_vecMonitorCallbackList.... | @@ -24,15 +24,10 @@
#include "interfaces/python/PythonInvoker.h"
#include "settings/AdvancedSettings.h"
#include "settings/SettingsComponent.h"
-#include "utils/CharsetConverter.h"
#include "utils/JSONVariantWriter.h"
#include "utils/Variant.h"
#include "utils/log.h"
-#ifdef TARGET_WINDOWS
-#include "platform/E... | xbmc/interfaces/python/XBPython.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | [Windows][Xbox] Bump Python to 3.13.5 + OpenSSL 3.0.17 | 27,010 | xbmc/xbmc | 17,740 | C++ | thexai | |
if (idVideoVersion < 0)
return false;
const int idFile{
m_database.AddFile(item->GetDynPath(), "", item->GetVideoInfoTag()->m_dateAdded)};
if (idFile > 0)
{
videoDbSuccess = true;
m_database.SetStreamDetailsForFileId(item->GetVideoInfoTag()->m_streamDetails, id... | No issues found. | if (idVideoVersion < 0)
return false;
const int idFile{
m_database.AddFile(item->GetDynPath(), "", item->GetVideoInfoTag()->m_dateAdded)};
if (idFile > 0)
{
videoDbSuccess = true;
m_database.SetStreamDetailsForFileId(item->GetVideoInfoTag()->m_streamDetails, id... | @@ -346,8 +346,11 @@ bool CGUIDialogVideoManagerVersions::ChoosePlaylist(const std::shared_ptr<CFileI
m_database.BeginTransaction();
if (replaceExistingFile == ReplaceExistingFile::YES)
{
- videoDbSuccess = m_database.SetFileForMedia(item->GetDynPath(), item->GetVideoContentType(),
- ... | xbmc/video/dialogs/GUIDialogVideoManagerVersions.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | [Video][Bluray] More robust update of playcount/lastplayed/dateadded fields when saving bluray:// file or creating bluray:// versions. | 27,015 | xbmc/xbmc | 17,740 | C++ | 78andyp | |
bool useLocal = true);
static std::string GetImage(const CScraperUrl::SUrlEntry &image, const std::string& itemPath);
bool EnumerateEpisodeItem(const CFileItem *item, EPISODELIST& episodeList);
static std::string GetMovieSetInfoFolder(const std::string& setTitle);
protec... | No issues found. | bool useLocal = true);
static std::string GetImage(const CScraperUrl::SUrlEntry &image, const std::string& itemPath);
bool EnumerateEpisodeItem(const CFileItem *item, EPISODELIST& episodeList);
static std::string GetMovieSetInfoFolder(const std::string& setTitle);
protec... | @@ -311,7 +311,5 @@ namespace KODI::VIDEO
std::set<int> m_pathsToClean;
std::shared_ptr<CAdvancedSettings> m_advancedSettings;
CVideoDatabase::ScraperCache m_scraperCache;
-
- void UpdateSet(const std::shared_ptr<CFileItem>& item);
};
} // namespace KODI::VIDEO | xbmc/video/VideoInfoScanner.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | [Video][Library] Fix performance degradation when scanning movies caused by running UpdateSet() on every movie. | 27,018 | xbmc/xbmc | 17,740 | C++ | 78andyp | |
\param name name of the profile index to retrieve
\return index of this profile, INVALID_PROFILE_ID if invalid.
*/
int GetProfileIndex(const std::string &name) const;
/*! \brief Retrieve the number of profiles
\return number of profiles
*/
size_t GetNumberOfProfiles() const { return m_profile... | No issues found. | \param name name of the profile index to retrieve
\return index of this profile, INVALID_PROFILE_ID if invalid.
*/
int GetProfileIndex(const std::string &name) const;
/*! \brief Retrieve the number of profiles
\return number of profiles
*/
size_t GetNumberOfProfiles() const { return m_profile... | @@ -85,7 +85,7 @@ class CProfileManager : protected ISettingsHandler,
/*! \brief Retrieve index of a particular profile by name
\param name name of the profile index to retrieve
- \return index of this profile, -1 if invalid.
+ \return index of this profile, INVALID_PROFILE_ID if invalid.
*/
int... | xbmc/profiles/ProfileManager.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | [PVR][profiles] Fixes for problems with PVR stop/start on profile switch | 27,032 | xbmc/xbmc | 17,740 | C++ | ksooo | |
effectiveRenderSettings.VideoSettings() = GetEffectiveSettings(renderSettings);
// Check renderers in order of buffer pools
for (IRenderBufferPool* bufferPool : m_processInfo.GetBufferManager().GetBufferPools())
{
renderer = GetRendererForPool(bufferPool, effectiveRenderSettings);
if (renderer)
b... | No issues found. | effectiveRenderSettings.VideoSettings() = GetEffectiveSettings(renderSettings);
// Check renderers in order of buffer pools
for (IRenderBufferPool* bufferPool : m_processInfo.GetBufferManager().GetBufferPools())
{
renderer = GetRendererForPool(bufferPool, effectiveRenderSettings);
if (renderer)
b... | @@ -270,6 +270,11 @@ void CRPRenderManager::AddFrame(const uint8_t* data,
}
}
+void CRPRenderManager::Flush()
+{
+ m_bFlush = true;
+}
+
bool CRPRenderManager::Create(unsigned int width, unsigned int height)
{
//! @todo
@@ -357,11 +362,6 @@ void CRPRenderManager::CheckFlush()
}
}
-void CRPRenderManage... | xbmc/cores/RetroPlayer/rendering/RPRenderManager.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | RetroPlayer: Fix sorting of public member functions and a log c/p error | 27,037 | xbmc/xbmc | 17,740 | C++ | garbear | |
{
m_vecItems->RemoveDiscCache(GetID());
if (CGUIDialogSmartPlaylistEditor::EditPlaylist(pItem->GetPath()))
Refresh();
return true;
}
}
// remove the directory cache if the folder is not normally cached
CFileItemList items(pItem->GetPath());
if (!items.Alway... | No issues found. | {
m_vecItems->RemoveDiscCache(GetID());
if (CGUIDialogSmartPlaylistEditor::EditPlaylist(pItem->GetPath()))
Refresh();
return true;
}
}
// remove the directory cache if the folder is not normally cached
CFileItemList items(pItem->GetPath());
if (!items.Alway... | @@ -228,8 +228,6 @@ bool CGUIMediaWindow::OnAction(const CAction &action)
bool CGUIMediaWindow::OnBack(int actionID)
{
- CancelUpdateItems();
-
CURL filterUrl(m_strFilterPath);
if (actionID == ACTION_NAV_BACK &&
!m_vecItems->IsVirtualDirectoryRoot() &&
@@ -247,25 +245,23 @@ bool CGUIMediaWindow::OnMes... | xbmc/windows/GUIMediaWindow.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | Fix busy dialog crash | 27,038 | xbmc/xbmc | 17,740 | C++ | garbear | |
return false;
const int idFile{m_database.AddFile(item->GetDynPath())};
if (idFile > 0)
{
videoDbSuccess = true;
m_database.SetStreamDetailsForFileId(item->GetVideoInfoTag()->m_streamDetails, idFile);
if (m_database.AddVideoVersion(item->GetVideoContentType(), idMovie,... | No issues found. | return false;
const int idFile{m_database.AddFile(item->GetDynPath())};
if (idFile > 0)
{
videoDbSuccess = true;
m_database.SetStreamDetailsForFileId(item->GetVideoInfoTag()->m_streamDetails, idFile);
if (m_database.AddVideoVersion(item->GetVideoContentType(), idMovie,... | @@ -214,9 +214,9 @@ bool CGUIDialogVideoManagerVersions::AddVideoVersion()
if (!URIUtils::IsBlurayPath(m_selectedVideoAsset->GetDynPath()))
{
const int dlgResult{CGUIDialogYesNo::ShowAndGetInput(CVariant{40030}, CVariant{40041})};
- if (dlgResult == CGUIDialogYesNo::DIALOG_RESULT_YES)
- if ... | xbmc/video/dialogs/GUIDialogVideoManagerVersions.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | Random SonarQube findings which were introduced since July 18 2025 | 27,039 | xbmc/xbmc | 17,740 | C++ | ksooo | |
bool SetLocationPath(const std::string& oldPath, const std::string& newPath);
void AddAutoSource(const CMediaSource &share, bool bAutorun=false);
void RemoveAutoSource(const CMediaSource &share);
bool IsDiscInDrive(const std::string& devicePath="");
bool IsAudio(const std::string& devicePath="");
bool HasO... | No issues found. | bool SetLocationPath(const std::string& oldPath, const std::string& newPath);
void AddAutoSource(const CMediaSource &share, bool bAutorun=false);
void RemoveAutoSource(const CMediaSource &share);
bool IsDiscInDrive(const std::string& devicePath="");
bool IsAudio(const std::string& devicePath="");
bool HasO... | @@ -46,7 +46,7 @@ class CMediaManager : public IStorageEventsCallback, public IJobCallback
void Initialize();
void Stop();
- bool LoadSources();
+ void LoadSources();
bool SaveSources();
void GetLocalDrives(std::vector<CMediaSource>& localDrives, bool includeQ = true); | xbmc/storage/MediaManager.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | Fix add-on sources missing when mediasources.xml is absent | 27,046 | xbmc/xbmc | 17,740 | C++ | garbear | |
/*!
* \brief Interface for the game loop callback
*
* The IGameLoopCallback interface provides the necessary methods for handling
* frame events within the game loop.
*
* Implementers must define how the next frame (FrameEvent) and previous frame
* (RewindEvent) are processed.
*/
class IGameLoopCallback
{
publi... | No issues found. | /*!
* \brief Interface for the game loop callback
*
* The IGameLoopCallback interface provides the necessary methods for handling
* frame events within the game loop.
*
* Implementers must define how the next frame (FrameEvent) and previous frame
* (RewindEvent) are processed.
*/
class IGameLoopCallback
{
publi... | @@ -12,11 +12,21 @@
#include "threads/Thread.h"
#include <atomic>
+#include <chrono>
namespace KODI
{
namespace RETRO
{
+/*!
+ * \brief Interface for the game loop callback
+ *
+ * The IGameLoopCallback interface provides the necessary methods for handling
+ * frame events within the game loop.
+ *
+ * Implem... | xbmc/cores/RetroPlayer/playback/GameLoop.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | RetroPlayer: Better game loop | 27,050 | xbmc/xbmc | 17,740 | C++ | garbear | |
{
class CPipewireCore;
class CPipewireStream
{
public:
explicit CPipewireStream(CPipewireCore& core);
CPipewireStream() = delete;
~CPipewireStream();
pw_stream* Get() const { return m_stream.get(); }
CPipewireCore& GetCore() const { return m_core; }
bool Connect(uint32_t id,
const pw_dir... | No issues found. | {
class CPipewireCore;
class CPipewireStream
{
public:
explicit CPipewireStream(CPipewireCore& core);
CPipewireStream() = delete;
~CPipewireStream();
pw_stream* Get() const { return m_stream.get(); }
CPipewireCore& GetCore() const { return m_core; }
bool Connect(uint32_t id,
const pw_dir... | @@ -40,12 +40,8 @@ class CPipewireStream
pw_stream_state GetState();
void SetActive(bool active);
- pw_buffer* DequeueBuffer();
- void QueueBuffer(pw_buffer* buffer);
-
- bool IsDriving() const;
-
- bool TriggerProcess() const;
+ pw_buffer* GetBuffer();
+ void QueueBuffer();
void Flush(bool drain);
... | xbmc/cores/AudioEngine/Sinks/pipewire/PipewireStream.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | [AudioEngine] PipeWire: synchronize to Process() callback | 27,053 | xbmc/xbmc | 17,740 | C++ | pv | |
/*
* Copyright (C) 2010-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 "cores/AudioEngine/Interfaces/AEEncoder.h"
/* ffmpeg re-defines this, so undef it to squash the warning ... | No issues found. | /*
* Copyright (C) 2010-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 "cores/AudioEngine/Interfaces/AEEncoder.h"
/* ffmpeg re-defines this, so undef it to squash the warning ... | @@ -10,10 +10,6 @@
#include "cores/AudioEngine/Interfaces/AEEncoder.h"
-extern "C" {
-#include <libswresample/swresample.h>
-}
-
/* ffmpeg re-defines this, so undef it to squash the warning */
#undef restrict
@@ -40,14 +36,12 @@ class CAEEncoderFFmpeg: public IAEEncoder
AVCodecID m_CodecID;
unsigned int ... | xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.h | 0 | C/C++ | 1 | none | 16 | 48 | 48 | true | [Encoder] Remove usage of resampler | 27,058 | xbmc/xbmc | 17,740 | C++ | sundermann | |
char* id;
char* desc;
float current;
float minimum;
float initial;
float maximum;
float step;
} video_shader_parameter;
typedef struct video_shader_pass
{
/*!
* \brief Path to the shader pass source
*/
char* source_path;
/*!
* \brief The vertex shader sourc... | No issues found. | char* id;
char* desc;
float current;
float minimum;
float initial;
float maximum;
float step;
} video_shader_parameter;
typedef struct video_shader_pass
{
/*!
* \brief Path to the shader pass source
*/
char* source_path;
/*!
* \brief The vertex shader sourc... | @@ -180,6 +180,11 @@ extern "C"
* \brief Mipmapping
*/
bool mipmap;
+
+ /*!
+ * \brief Aliased pass name
+ */
+ char* alias;
} video_shader_pass;
typedef struct video_shader_lut
@@ -275,7 +280,7 @@ extern "C"
bool(__cdecl* VideoShaderRead)(const struct AddonInstance_ShaderPre... | xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/shaderpreset.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | [Shader Preset API v1.1.0] Add plumbing for shader pass aliases | 27,061 | xbmc/xbmc | 17,740 | C++ | garbear | |
///
///-----------------------------------------------------------------------
/// @python_v20 Optional `type` parameter added.
///
getRating(type);
#else
double getRating(const String& type = "");
#endif
#ifdef DOXYGEN_SHOULD_USE_THIS
///
/// \ingroup python_InfoTagVide... | No issues found. | ///
///-----------------------------------------------------------------------
/// @python_v20 Optional `type` parameter added.
///
getRating(type);
#else
double getRating(const String& type = "");
#endif
#ifdef DOXYGEN_SHOULD_USE_THIS
///
/// \ingroup python_InfoTagVide... | @@ -2573,45 +2573,48 @@ namespace XBMCAddon
#ifdef DOXYGEN_SHOULD_USE_THIS
///
/// \ingroup python_InfoTagVideo
- /// @brief \python_func{ addSeason(number, [name]) }
- /// Add a season with name. It needs at least the season number.
+ /// @brief \python_func{ addSeason(number, [name], [pl... | xbmc/interfaces/legacy/InfoTagVideo.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | Add Season Plot | 27,077 | xbmc/xbmc | 17,740 | C++ | CrystalP | |
{
EXPECT_TRUE(URIUtils::IsRemote("http://path/to/file"));
EXPECT_TRUE(URIUtils::IsRemote("https://path/to/file"));
EXPECT_FALSE(URIUtils::IsRemote("addons://user/"));
EXPECT_FALSE(URIUtils::IsRemote("sources://video/"));
EXPECT_FALSE(URIUtils::IsRemote("videodb://movies/titles"));
EXPECT_FALSE(URIUtils::IsR... | No issues found. | {
EXPECT_TRUE(URIUtils::IsRemote("http://path/to/file"));
EXPECT_TRUE(URIUtils::IsRemote("https://path/to/file"));
EXPECT_FALSE(URIUtils::IsRemote("addons://user/"));
EXPECT_FALSE(URIUtils::IsRemote("sources://video/"));
EXPECT_FALSE(URIUtils::IsRemote("videodb://movies/titles"));
EXPECT_FALSE(URIUtils::IsR... | @@ -850,3 +850,65 @@ TEST_P(TestLANParamTest, TestIsHostOnLAN)
}
INSTANTIATE_TEST_SUITE_P(TestURIUtils, TestLANParamTest, testing::ValuesIn(values));
+
+TEST_F(TestURIUtils, CheckConsistencyBetweenFileNameUtilities)
+{
+ auto URIUtils_Split = [=](const std::string& in)
+ {
+ std::string _, splitCurlFileName;
+... | xbmc/utils/test/TestURIUtils.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | [CURL][URIUtils] Fixed inconsistency when getting filename from a windows drive spec. | 27,087 | xbmc/xbmc | 17,740 | C++ | damienruscoe | |
/*
* Copyright (C) 2011-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 "IDirectory.h"
#include "NFSFile.h"
struct nfsdirent;
namespace XFILE
{
class CNFSDirectory : public ... | No issues found. | /*
* Copyright (C) 2011-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 "IDirectory.h"
#include "NFSFile.h"
struct nfsdirent;
namespace XFILE
{
class CNFSDirectory : public ... | @@ -26,9 +26,11 @@ namespace XFILE
bool Exists(const CURL& url) override;
bool Remove(const CURL& url) override;
private:
- bool GetServerList(CFileItemList &items);
- bool GetDirectoryFromExportList(const std::string& strPath, CFileItemList &items);
- bool ResolveSymlink( const std::s... | xbmc/filesystem/NFSDirectory.h | 0 | C/C++ | 1 | none | 16 | 37 | 37 | true | [filesystem] Refactored CNFSDirectory::GetDirectory | 27,092 | xbmc/xbmc | 17,740 | C++ | damienruscoe | |
}
}
// remove the directory cache if the folder is not normally cached
CFileItemList items(pItem->GetPath());
if (!items.AlwaysCache())
items.RemoveDiscCache(GetID());
// if we have a filtered list, we need to add the filtered
// path to be able to come back to the filtered view
... | No issues found. | }
}
// remove the directory cache if the folder is not normally cached
CFileItemList items(pItem->GetPath());
if (!items.AlwaysCache())
items.RemoveDiscCache(GetID());
// if we have a filtered list, we need to add the filtered
// path to be able to come back to the filtered view
... | @@ -224,8 +224,6 @@ bool CGUIMediaWindow::OnAction(const CAction &action)
bool CGUIMediaWindow::OnBack(int actionID)
{
- CancelUpdateItems();
-
CURL filterUrl(m_strFilterPath);
if (actionID == ACTION_NAV_BACK &&
!m_vecItems->IsVirtualDirectoryRoot() &&
@@ -243,25 +241,23 @@ bool CGUIMediaWindow::OnMes... | xbmc/windows/GUIMediaWindow.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | [Backport][Omega] Fix busy dialog crash | 27,102 | xbmc/xbmc | 17,740 | C++ | garbear | |
// check if a swipe has been detected and if it has a valid direction
if (!m_swipeDetected || m_directions == TouchMoveDirectionNone)
return false;
// check if the swipe has been performed in the proper time span
if ((pointer.current.time - pointer.down.time) > SWIPE_MAX_TIME)
return false;
// calcu... | No issues found. | // check if a swipe has been detected and if it has a valid direction
if (!m_swipeDetected || m_directions == TouchMoveDirectionNone)
return false;
// check if the swipe has been performed in the proper time span
if ((pointer.current.time - pointer.down.time) > SWIPE_MAX_TIME)
return false;
// calcu... | @@ -26,9 +26,7 @@
#define SWIPE_MAX_VARIANCE_ANGLE 0.36397023f
CGenericTouchSwipeDetector::CGenericTouchSwipeDetector(ITouchActionHandler* handler, float dpi)
- : IGenericTouchGestureDetector(handler, dpi),
- m_directions(TouchMoveDirectionLeft | TouchMoveDirectionRight | TouchMoveDirectionUp |
- ... | xbmc/input/touch/generic/GenericTouchSwipeDetector.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | [clang-tidy] fix performance-* warnings | 27,105 | xbmc/xbmc | 17,740 | C++ | Rechi | |
{"foo.E03.mkv", {{1, 3}}, {{1, 3}}},
{"foo.2009.E03.mkv", {{1, 3}}, {{1, 3}}},
// multi-episode (not ranges)
{"The Legend of Korra - S01E01-02 - Welcome to Republic City & A Leaf in the Wind.mkv",
{{1, 1}, {1, 2}},
{{1, 1}, {1, 2}}},
{"foo s01e01-episode1.title-s01e02-episode2.title.mkv", ... | No issues found. | {"foo.E03.mkv", {{1, 3}}, {{1, 3}}},
{"foo.2009.E03.mkv", {{1, 3}}, {{1, 3}}},
// multi-episode (not ranges)
{"The Legend of Korra - S01E01-02 - Welcome to Republic City & A Leaf in the Wind.mkv",
{{1, 1}, {1, 2}},
{{1, 1}, {1, 2}}},
{"foo s01e01-episode1.title-s01e02-episode2.title.mkv", ... | @@ -83,6 +83,9 @@ static const TestEntry TestData[] = {
{"foo.S00E01-E04S05E03-E06.mkv",
{{0, 1}, {0, 2}, {0, 3}, {0, 4}, {5, 3}, {5, 4}, {5, 5}, {5, 6}},
{{0, 1}, {0, 4}, {5, 3}, {5, 6}}},
+ {"foo.S02E01S03E05E09-E12.mkv",
+ {{2, 1}, {3, 5}, {3, 9}, {3, 10}, {3, 11}, {3, 12}},
+ {{2, 1}, {3... | xbmc/video/test/TestVideoInfoScanner.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | [VideoInfoScanner][Alpha 1] Small fix to episode range code. | 27,112 | xbmc/xbmc | 17,740 | C++ | 78andyp | |
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_TRUNCATED)
{
const ssize_t nBytes = m_pFil... | No issues found. | 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_TRUNCATED)
{
const ssize_t nBytes = m_pFil... | @@ -15,7 +15,6 @@
#include "FileCache.h"
#include "FileFactory.h"
#include "IFile.h"
-#include "PasswordManager.h"
#include "ServiceBroker.h"
#include "application/ApplicationComponents.h"
#include "application/ApplicationPowerHandling.h"
@@ -263,7 +262,8 @@ bool CFile::Open(const CURL& file, const unsigned int f... | xbmc/filesystem/File.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | [PasswordManager] Factor out common credentials code. | 27,117 | xbmc/xbmc | 17,740 | C++ | damienruscoe | |
bool CDatabase::ResultQuery(const std::string& strQuery) const
{
bool bReturn = false;
try
{
if (nullptr == m_pDB)
return bReturn;
if (nullptr == m_pDS)
return bReturn;
std::string strPreparedQuery = PrepareSQL(strQuery);
bReturn = m_pDS->query(strPreparedQuery);
}
catch (...)
... | No issues found. | bool CDatabase::ResultQuery(const std::string& strQuery) const
{
bool bReturn = false;
try
{
if (nullptr == m_pDB)
return bReturn;
if (nullptr == m_pDS)
return bReturn;
std::string strPreparedQuery = PrepareSQL(strQuery);
bReturn = m_pDS->query(strPreparedQuery);
}
catch (...)
... | @@ -257,15 +257,15 @@ void CDatabase::Split(const std::string& strFileNameAndPath,
strFileName = strFileNameAndPath.substr(i);
}
-std::string CDatabase::PrepareSQL(std::string strStmt, ...) const
+std::string CDatabase::PrepareSQL(std::string_view sqlFormat, ...) const
{
std::string strResult = "";
if (n... | xbmc/dbwrappers/Database.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | [dbwrappers] Avoid copies of strings in database queries. | 27,118 | xbmc/xbmc | 17,740 | C++ | damienruscoe | |
#include <map>
#include <memory>
namespace KODI
{
namespace WINDOWING
{
namespace GBM
{
class CDRMAtomic : public CDRMUtils
{
public:
CDRMAtomic() = default;
~CDRMAtomic() override = default;
void FlipPage(struct gbm_bo* bo, bool rendered, bool videoLayer, bool async) override;
bool SetVideoMode(const RESOLUT... | No issues found. | #include <map>
#include <memory>
namespace KODI
{
namespace WINDOWING
{
namespace GBM
{
class CDRMAtomic : public CDRMUtils
{
public:
CDRMAtomic() = default;
~CDRMAtomic() override = default;
void FlipPage(struct gbm_bo* bo, bool rendered, bool videoLayer, bool async) override;
bool SetVideoMode(const RESOLUT... | @@ -32,6 +32,7 @@ class CDRMAtomic : public CDRMUtils
bool SetActive(bool active) override;
bool InitDrm() override;
void DestroyDrm() override;
+ bool SupportsFencing() override { return true; }
bool AddProperty(CDRMObject* object, const char* name, uint64_t value);
private: | xbmc/windowing/gbm/drm/DRMAtomic.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | CDRMAtomic: don't create egl fence unless atomic drm init was succesful | 27,119 | xbmc/xbmc | 17,740 | C++ | Siberiss | |
/*!
* \brief Remove a movie from the library.
* \param[in] idMovie The id of the movie
* \param[in] action Versions of the movie to be deleted
* \param[in] hashAction Preserve or invalidate the hash of the movie path
* \return operation success. true for success, false for failure
*/
bool DeleteM... | No issues found. |
/*!
* \brief Remove a movie from the library.
* \param[in] idMovie The id of the movie
* \param[in] action Versions of the movie to be deleted
* \param[in] hashAction Preserve or invalidate the hash of the movie path
* \return operation success. true for success, false for failure
*/
bool DeleteM... | @@ -1300,18 +1300,18 @@ class CVideoDatabase : public CDatabase
DeleteMovieCascadeAction cascadeAction);
/*!
- * \brief Adds a version of an existing movie to the database
+ * \brief Adds or updates a version of an existing movie to the database
* \param itemType type of the v... | xbmc/video/VideoDatabase.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | [Video] Fix fail to update videoversion when updating library. | 27,129 | xbmc/xbmc | 17,740 | C++ | 78andyp | |
else
{
fullpath = dirName + resolvedLink;
ret = nfs_stat64(gNfsConnection.GetNfsContext(), fullpath.c_str(), &tmpBuffer);
resolvedUrl.SetFileName(gNfsConnection.GetConnectedExport() + fullpath);
}
if (ret != 0)
{
CLog::LogF(LOGERROR, "Failed to stat '{}' on link resolve ({})... | No issues found. | else
{
fullpath = dirName + resolvedLink;
ret = nfs_stat64(gNfsConnection.GetNfsContext(), fullpath.c_str(), &tmpBuffer);
resolvedUrl.SetFileName(gNfsConnection.GetConnectedExport() + fullpath);
}
if (ret != 0)
{
CLog::LogF(LOGERROR, "Failed to stat '{}' on link resolve ({})... | @@ -6,24 +6,19 @@
* See LICENSES/README.md for more information.
*/
-#ifdef TARGET_WINDOWS
-#include <mutex>
-
-#include <sys\stat.h>
-#endif
+#include "NFSDirectory.h"
-#include "FileItem.h"
#include "FileItemList.h"
-#include "NFSDirectory.h"
#include "utils/URIUtils.h"
#include "utils/XTimeUtils.h"
#inc... | xbmc/filesystem/NFSDirectory.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | NFSDirectory: Remove duplicate header and improve logs | 27,133 | xbmc/xbmc | 17,740 | C++ | thexai | |
m_strOptions.clear();
m_options.Clear();
if (!strOptions.empty())
{
if(strOptions[0] == '?' ||
strOptions[0] == '#' ||
strOptions[0] == ';' ||
strOptions.find("xml") != std::string::npos)
{
m_strOptions = std::move(strOptions);
m_options.AddOptions(m_strOptions);
}
... | No issues found. | m_strOptions.clear();
m_options.Clear();
if (!strOptions.empty())
{
if(strOptions[0] == '?' ||
strOptions[0] == '#' ||
strOptions[0] == ';' ||
strOptions.find("xml") != std::string::npos)
{
m_strOptions = std::move(strOptions);
m_options.AddOptions(m_strOptions);
}
... | @@ -22,7 +22,6 @@
#include <sys\stat.h>
#endif
-#include <charconv>
#include <iterator>
#include <string>
#include <system_error>
@@ -647,62 +646,13 @@ bool CURL::IsFullPath(const std::string &url)
}
std::string CURL::Decode(std::string_view strURLData)
-//modified to be more accommodating - if a non hex val... | xbmc/URL.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | [URIUtils] Added tests around URL Encoding and Decoding. | 27,134 | xbmc/xbmc | 17,740 | C++ | damienruscoe | |
/// @brief **3 :** Reserved
INPUTSTREAM_COLORPRIMARY_RESERVED = 3,
/// @brief **4 :** Also FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
INPUTSTREAM_COLORPRIMARY_BT470M = 4,
/// @brief **5 :** Also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM
INPUTSTREAM_COLORP... | No issues found. | /// @brief **3 :** Reserved
INPUTSTREAM_COLORPRIMARY_RESERVED = 3,
/// @brief **4 :** Also FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
INPUTSTREAM_COLORPRIMARY_BT470M = 4,
/// @brief **5 :** Also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM
INPUTSTREAM_COLORP... | @@ -497,6 +497,40 @@ extern "C"
///@}
//------------------------------------------------------------------------------
+ //! @brief Dolby Vision configuration metadata (dvcc)
+ typedef struct INPUTSTREAM_DVCC_METADATA
+ {
+ //! @brief dvcc version major
+ uint8_t m_dvVersionMajor;
+
+ //! @brief dvc... | xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/inputstream.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | Add dvcc metadata to InputStream interface | 27,136 | xbmc/xbmc | 17,740 | C++ | cscd98 | |
return retVal;
}
} // Unnamed namespace
CNFSDirectory::CNFSDirectory(void)
{
gNfsConnection.AddActiveConnection();
}
CNFSDirectory::~CNFSDirectory(void)
{
gNfsConnection.AddIdleConnection();
}
std::vector<std::shared_ptr<CFileItem>> CNFSDirectory::GetDirectoryFromExportList(
const CURL& inputURL) const
{
... | No issues found. | return retVal;
}
} // Unnamed namespace
CNFSDirectory::CNFSDirectory(void)
{
gNfsConnection.AddActiveConnection();
}
CNFSDirectory::~CNFSDirectory(void)
{
gNfsConnection.AddIdleConnection();
}
std::vector<std::shared_ptr<CFileItem>> CNFSDirectory::GetDirectoryFromExportList(
const CURL& inputURL) const
{
... | @@ -186,8 +186,8 @@ std::vector<std::shared_ptr<CFileItem>> CNFSDirectory::GetDirectoryFromExportLis
std::string path(pathWithoutSlash + currentExport);
URIUtils::AddSlashAtEnd(path);
- const auto& item{fileItems.emplace_back(std::make_shared<CFileItem>(currentExport))};
- item->SetPath(path);
+ co... | xbmc/filesystem/NFSDirectory.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | [CURL] SetPath and SetDynPath should accept string by value. | 27,143 | xbmc/xbmc | 17,740 | C++ | damienruscoe | |
* @brief Set playback speed.
* @param speed Playback rate (per-mille units).
*/
void SetSpeed(int speed);
/**
* @brief Get current presentation timestamp in seconds.
* @return Current PTS (seconds).
*/
double GetCurrentPts() const;
/**
* @brief Get number of audio channels configured.
... | No issues found. | * @brief Set playback speed.
* @param speed Playback rate (per-mille units).
*/
void SetSpeed(int speed);
/**
* @brief Get current presentation timestamp in seconds.
* @return Current PTS (seconds).
*/
double GetCurrentPts() const;
/**
* @brief Get number of audio channels configured.
... | @@ -74,9 +74,10 @@ class CMediaPipelineWebOS final : public CThread
/**
* @brief Check if a codec is supported by the pipeline.
* @param codec AVCodecID to check.
+ * @param includeSecure If true, include secure codecs in the check.
* @return True if supported, false otherwise.
*/
- static bool Su... | xbmc/cores/VideoPlayer/MediaPipelineWebOS.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | webOS: passthrough encrypted data to secure decoder | 27,157 | xbmc/xbmc | 17,740 | C++ | cscd98 | |
return retVal;
}
} // Unnamed namespace
CNFSDirectory::CNFSDirectory(void)
{
gNfsConnection.AddActiveConnection();
}
CNFSDirectory::~CNFSDirectory(void)
{
gNfsConnection.AddIdleConnection();
}
std::vector<std::shared_ptr<CFileItem>> CNFSDirectory::GetDirectoryFromExportList(
const CURL& inputURL) const
{
... | No issues found. | return retVal;
}
} // Unnamed namespace
CNFSDirectory::CNFSDirectory(void)
{
gNfsConnection.AddActiveConnection();
}
CNFSDirectory::~CNFSDirectory(void)
{
gNfsConnection.AddIdleConnection();
}
std::vector<std::shared_ptr<CFileItem>> CNFSDirectory::GetDirectoryFromExportList(
const CURL& inputURL) const
{
... | @@ -39,7 +39,7 @@ namespace
{
constexpr int NFS_MAX_PATH = 4096;
-KODI::TIME::FileTime GetDirEntryTime(struct nfsdirent* dirent)
+KODI::TIME::FileTime GetDirEntryTime(const struct nfsdirent* dirent)
{
// if modification date is missing, use create date
const int64_t timeDate =
@@ -59,96 +59,34 @@ KODI::TIME:... | xbmc/filesystem/NFSDirectory.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | Random SonarQube findings which were introduced since August 2 2025 | 27,158 | xbmc/xbmc | 17,740 | C++ | ksooo | |
///-----------------------------------------------------------------------
///
///
getPlayCount();
#else
int getPlayCount();
#endif
#ifdef DOXYGEN_SHOULD_USE_THIS
///
/// \ingroup python_InfoTagVideo
/// @brief \python_func{ getLastPlayed() }
/// Get the last playe... | No issues found. | ///-----------------------------------------------------------------------
///
///
getPlayCount();
#else
int getPlayCount();
#endif
#ifdef DOXYGEN_SHOULD_USE_THIS
///
/// \ingroup python_InfoTagVideo
/// @brief \python_func{ getLastPlayed() }
/// Get the last playe... | @@ -9,6 +9,7 @@
#pragma once
#include "AddonClass.h"
+#include "Dictionary.h"
#include "Tuple.h"
#include "utils/StreamDetails.h"
#include "video/VideoInfoTag.h"
@@ -2742,6 +2743,38 @@ namespace XBMCAddon
#endif
/// @}
+#ifdef DOXYGEN_SHOULD_USE_THIS
+ ///
+ /// \ingroup python_InfoTagVideo
+... | xbmc/interfaces/legacy/InfoTagVideo.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | Add InfoTagVideo::setAvailableFanart method for Kodi Python API | 27,168 | xbmc/xbmc | 17,740 | C++ | romanvm | |
#include "video/VideoThumbLoader.h"
#include <memory>
#include <string>
class CFileItem;
namespace PVR
{
class CPVRSettings;
class CGUIWindowPVRRecordingsBase : public CGUIWindowPVRBase
{
public:
CGUIWindowPVRRecordingsBase(bool bRadio, int id, const std::string& xmlFile);
~CGUIWindowPVRRecordingsBase() overrid... | No issues found. | #include "video/VideoThumbLoader.h"
#include <memory>
#include <string>
class CFileItem;
namespace PVR
{
class CPVRSettings;
class CGUIWindowPVRRecordingsBase : public CGUIWindowPVRBase
{
public:
CGUIWindowPVRRecordingsBase(bool bRadio, int id, const std::string& xmlFile);
~CGUIWindowPVRRecordingsBase() overrid... | @@ -29,6 +29,7 @@ class CGUIWindowPVRRecordingsBase : public CGUIWindowPVRBase
~CGUIWindowPVRRecordingsBase() override;
void OnWindowLoaded() override;
+ void OnInitWindow() override;
void OnDeinitWindow(int nextWindowID) override;
bool OnMessage(CGUIMessage& message) override;
bool OnAction(const CAc... | xbmc/pvr/windows/GUIWindowPVRRecordings.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | [PVR] Recordings window: Disable 'group recordings' when displaying ' Recently added recordings' | 27,172 | xbmc/xbmc | 17,740 | C++ | ksooo | |
{
XBMCAddonUtils::GuiLock lock(languageHook, offscreen);
setTvShowTitleRaw(infoTag, tvshowTitle);
}
void InfoTagVideo::setTvShowStatus(const String& tvshowStatus)
{
XBMCAddonUtils::GuiLock lock(languageHook, offscreen);
setTvShowStatusRaw(infoTag, tvshowStatus);
}
void ... | No issues found. | {
XBMCAddonUtils::GuiLock lock(languageHook, offscreen);
setTvShowTitleRaw(infoTag, tvshowTitle);
}
void InfoTagVideo::setTvShowStatus(const String& tvshowStatus)
{
XBMCAddonUtils::GuiLock lock(languageHook, offscreen);
setTvShowStatusRaw(infoTag, tvshowStatus);
}
void ... | @@ -301,6 +301,11 @@ namespace XBMCAddon
return infoTag->m_strOriginalTitle;
}
+ String InfoTagVideo::getOriginalLanguage()
+ {
+ return infoTag->GetOriginalLanguage();
+ }
+
String InfoTagVideo::getPremiered()
{
CLog::Log(LOGWARNING, "InfoTagVideo.getPremiered() is deprecat... | xbmc/interfaces/legacy/InfoTagVideo.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | Add Movie/TV Show Original Language | 27,187 | xbmc/xbmc | 17,740 | C++ | CrystalP | |
CVideoPlayerWebOS::CVideoPlayerWebOS(IPlayerCallback& callback) : CVideoPlayer(callback)
{
}
CVideoPlayerWebOS::~CVideoPlayerWebOS() = default;
void CVideoPlayerWebOS::CreatePlayers()
{
const auto canStarfish =
std::ranges::any_of(m_SelectionStreams.Get(StreamType::VIDEO),
[](const a... | No issues found. | CVideoPlayerWebOS::CVideoPlayerWebOS(IPlayerCallback& callback) : CVideoPlayer(callback)
{
}
CVideoPlayerWebOS::~CVideoPlayerWebOS() = default;
void CVideoPlayerWebOS::CreatePlayers()
{
const auto canStarfish =
std::ranges::any_of(m_SelectionStreams.Get(StreamType::VIDEO),
[](const a... | @@ -73,3 +73,13 @@ void CVideoPlayerWebOS::CreatePlayers()
m_VideoPlayerAudioID3 = std::make_unique<CVideoPlayerAudioID3>(*m_processInfo);
m_players_created = true;
}
+
+void CVideoPlayerWebOS::GetVideoResolution(unsigned int& width, unsigned int& height)
+{
+ if (m_mediaPipelineWebOS)
+ {
+ m_mediaPipeline... | xbmc/cores/VideoPlayer/VideoPlayerWebOS.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | webOS: report current video and maximum resolution to Inputstream addons | 27,198 | xbmc/xbmc | 17,740 | C++ | cscd98 | |
int scriptId = -1;
if ((scriptId = CScriptInvocationManager::GetInstance().ExecuteAsync(argv[0], addon, argv)) >= 0)
{
while (true)
{
if (!CScriptInvocationManager::GetInstance().IsRunning(scriptId))
break;
KODI::TIME::Sleep(100ms);
}
CLog::Log(LOGINFO, "WEATHER: Successfully... | No issues found. | int scriptId = -1;
if ((scriptId = CScriptInvocationManager::GetInstance().ExecuteAsync(argv[0], addon, argv)) >= 0)
{
while (true)
{
if (!CScriptInvocationManager::GetInstance().IsRunning(scriptId))
break;
KODI::TIME::Sleep(100ms);
}
CLog::Log(LOGINFO, "WEATHER: Successfully... | @@ -13,6 +13,7 @@
#include "ServiceBroker.h"
#include "XBDateTime.h"
#include "addons/AddonManager.h"
+#include "addons/IAddon.h"
#include "addons/addoninfo/AddonType.h"
#include "guilib/GUIComponent.h"
#include "guilib/GUIWindowManager.h"
@@ -21,27 +22,11 @@
#include "network/Network.h"
#include "settings/Sett... | xbmc/weather/WeatherJob.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | [guiinfo][weather][Estuary] Introduce GUI info label 'Weather.Data' as generic interface to weather data. | 27,199 | xbmc/xbmc | 17,740 | C++ | ksooo | |
void CVideoPlayerWebOS::CreatePlayers()
{
const auto canStarfish =
std::ranges::any_of(m_SelectionStreams.Get(StreamType::VIDEO),
[](const auto& stream)
{
if (stream.codecId != AV_CODEC_ID_NONE)
return... | No issues found. |
void CVideoPlayerWebOS::CreatePlayers()
{
const auto canStarfish =
std::ranges::any_of(m_SelectionStreams.Get(StreamType::VIDEO),
[](const auto& stream)
{
if (stream.codecId != AV_CODEC_ID_NONE)
return... | @@ -28,12 +28,14 @@ void CVideoPlayerWebOS::CreatePlayers()
std::ranges::any_of(m_SelectionStreams.Get(StreamType::VIDEO),
[](const auto& stream)
{
+ if (stream.codecId != AV_CODEC_ID_NONE)
+ return CMed... | xbmc/cores/VideoPlayer/VideoPlayerWebOS.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | [webOS][VideoPlayer] Improve hardware acceleration detection | 27,218 | xbmc/xbmc | 17,740 | C++ | sundermann | |
}
HRESULT CD3DEffect::Open(D3D_INCLUDE_TYPE IncludeType, LPCSTR pFileName, LPCVOID pParentData, LPCVOID* ppData, UINT* pBytes)
{
XFILE::CFile includeFile;
bool found = false;
std::string fileName;
for (const auto& includePath : m_includePaths)
{
fileName = includePath;
std::string includeURL;
if... | No issues found. | }
HRESULT CD3DEffect::Open(D3D_INCLUDE_TYPE IncludeType, LPCSTR pFileName, LPCVOID pParentData, LPCVOID* ppData, UINT* pBytes)
{
XFILE::CFile includeFile;
bool found = false;
std::string fileName;
for (const auto& includePath : m_includePaths)
{
fileName = includePath;
std::string includeURL;
if... | @@ -167,19 +167,9 @@ void ID3DResource::Unregister()
CD3DTexture::CD3DTexture()
{
- m_width = 0;
- m_height = 0;
- m_mipLevels = 0;
- m_usage = D3D11_USAGE_DEFAULT;
- m_format = DXGI_FORMAT_B8G8R8A8_UNORM;
- m_texture = nullptr;
m_renderTargets[0] = nullptr;
m_renderTargets[1] = nullptr;
m_data = nul... | xbmc/guilib/D3DResource.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | [cppcheck] fix performance checks | 27,228 | xbmc/xbmc | 17,740 | C++ | Rechi | |
if (iVersion < 121)
{
// https://github.com/xbmc/xbmc/issues/21253 - Kodi picks up wrong "year" for PVR recording.
m_pDS->query("SELECT idFile, strFilename FROM files WHERE strFilename LIKE '% (1969)%.pvr' OR "
"strFilename LIKE '% (1601)%.pvr'");
while (!m_pDS->eof())
{
std:... | No issues found. | if (iVersion < 121)
{
// https://github.com/xbmc/xbmc/issues/21253 - Kodi picks up wrong "year" for PVR recording.
m_pDS->query("SELECT idFile, strFilename FROM files WHERE strFilename LIKE '% (1969)%.pvr' OR "
"strFilename LIKE '% (1601)%.pvr'");
while (!m_pDS->eof())
{
std:... | @@ -12163,7 +12163,7 @@ void CVideoDatabase::ExportToXML(const std::string &path, bool singleFile /* = t
// Art name is derived in GetLocalArt() which in turn calls GetTBNFile()
// Need to set season/episode in VideoInfoTag
- fileItem.SetProperty("is_multi_episode", true);
+ ... | xbmc/video/VideoDatabase.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | [Video] Fix episode thumbs not found if using local art. | 27,233 | xbmc/xbmc | 17,740 | C++ | 78andyp | |
CThread::StopThread(true);
if (m_audioThread.joinable())
m_audioThread.join();
if (!m_mediaAPIs->Unload())
CLog::LogF(LOGERROR, "Unload failed");
const auto buffer = static_cast<CStarfishVideoBuffer*>(m_picture.videoBuffer);
buffer->ResetAcbHandle();
if (sync)
{
// wait until m_loaded is fa... | No issues found. | CThread::StopThread(true);
if (m_audioThread.joinable())
m_audioThread.join();
if (!m_mediaAPIs->Unload())
CLog::LogF(LOGERROR, "Unload failed");
const auto buffer = static_cast<CStarfishVideoBuffer*>(m_picture.videoBuffer);
buffer->ResetAcbHandle();
if (sync)
{
// wait until m_loaded is fa... | @@ -36,6 +36,8 @@
#include "utils/log.h"
#include "windowing/wayland/WinSystemWaylandWebOS.h"
+#include "platform/linux/WebOSTVPlatformConfig.h"
+
#include <algorithm>
#include <cmath>
#include <cstdint>
@@ -78,8 +80,6 @@ constexpr unsigned int MAX_SRC_BUFFER_LEVEL_VIDEO = 8 * 1024 * 1024; // 8 MB
constexpr uns... | xbmc/cores/VideoPlayer/MediaPipelineWebOS.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | [webOS] Implement HDR GUI peak brightness | 27,240 | xbmc/xbmc | 17,740 | C++ | sundermann | |
void Load(const std::string &file);
/*!
\brief Resolve all include components (defaults, constants, variables, expressions and includes)
for the given \code{node}. Place the conditions specified for <include> elements in \code{includeConditions}.
\param node the node from where we start to resolve the in... | No issues found. | void Load(const std::string &file);
/*!
\brief Resolve all include components (defaults, constants, variables, expressions and includes)
for the given \code{node}. Place the conditions specified for <include> elements in \code{includeConditions}.
\param node the node from where we start to resolve the in... | @@ -10,8 +10,10 @@
#include "interfaces/info/InfoBool.h"
+#include <functional>
#include <map>
#include <string>
+#include <string_view>
#include <unordered_map>
#include <utility>
#include <vector>
@@ -120,9 +122,21 @@ class CGUIIncludes
std::string ResolveExpressions(const std::string &expression) const;... | xbmc/guilib/GUIIncludes.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | Random SonarQube findings which were introduced since August 24 2025 | 27,252 | xbmc/xbmc | 17,740 | C++ | ksooo | |
episode.iSeason = tag->m_iSeason;
episode.iEpisode = tag->m_iEpisode;
episode.isFolder = false;
// save full item for plugin source
if (item->IsPlugin())
episode.item = std::make_shared<CFileItem>(*item);
episodeList.push_back(episode);
CLog::Log(LOGDEBUG, "{} - found m... | No issues found. | episode.iSeason = tag->m_iSeason;
episode.iEpisode = tag->m_iEpisode;
episode.isFolder = false;
// save full item for plugin source
if (item->IsPlugin())
episode.item = std::make_shared<CFileItem>(*item);
episodeList.push_back(episode);
CLog::Log(LOGDEBUG, "{} - found m... | @@ -2071,23 +2071,24 @@ CVideoInfoScanner::~CVideoInfoScanner()
bool lookInFolder,
bool resetTag)
{
- auto result = InfoType::NONE;
- std::unique_ptr<IVideoInfoTagLoader> loader(
- CVideoInfoTagLoaderFactory::CreateLoader(item, scraper, lookInFolder));
- if (load... | xbmc/video/VideoInfoScanner.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | Video tag refactor | 27,258 | xbmc/xbmc | 17,740 | C++ | damienruscoe | |
m_processInfo.SetVideoDeintMethod("hardware");
m_processInfo.SetVideoDAR(m_hints.aspect);
m_videoBufferPool = std::make_shared<CMediaCodecVideoBufferPool>(m_codec);
UpdateFpsDuration();
return true;
FAIL:
m_InstanceGuard.exchange(false);
if (m_crypto)
{
delete m_crypto;
m_crypto = nullptr;
... | No issues found. | m_processInfo.SetVideoDeintMethod("hardware");
m_processInfo.SetVideoDAR(m_hints.aspect);
m_videoBufferPool = std::make_shared<CMediaCodecVideoBufferPool>(m_codec);
UpdateFpsDuration();
return true;
FAIL:
m_InstanceGuard.exchange(false);
if (m_crypto)
{
delete m_crypto;
m_crypto = nullptr;
... | @@ -965,7 +965,7 @@ void CDVDVideoCodecAndroidMediaCodec::Dispose()
if (!m_opened)
return;
- CLog::Log(LOGDEBUG, "CDVDVideoCodecAndroidMediaCodec::{}", __func__);
+ CLog::LogF(LOGDEBUG, "call");
// invalidate any inflight outputbuffers
FlushInternal();
@@ -1329,8 +1329,7 @@ void CDVDVideoCodecAndroi... | xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | [Logs] Update some Log calls that still using `__func__` | 27,260 | xbmc/xbmc | 17,740 | C++ | thexai | |
*/
#include "utils/Set.h"
#include <gtest/gtest.h>
TEST(TestSet, Lookup)
{
static constexpr CSet someNumbers{4, 2, 3, 1};
// compile time tests
static_assert(someNumbers.contains(1));
static_assert(someNumbers.contains(2));
static_assert(someNumbers.contains(3));
static_assert(someNumbers.contains(4));... | No issues found. | */
#include "utils/Set.h"
#include <gtest/gtest.h>
TEST(TestSet, Lookup)
{
static constexpr CSet someNumbers{4, 2, 3, 1};
// compile time tests
static_assert(someNumbers.contains(1));
static_assert(someNumbers.contains(2));
static_assert(someNumbers.contains(3));
static_assert(someNumbers.contains(4));... | @@ -0,0 +1,61 @@
+/*
+ * 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 "utils/Set.h"
+
+#include <gtest/gtest.h>
+
+TEST(TestSet, Lookup)
+{
+ static constexpr CSet som... | xbmc/utils/test/TestSet.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | Introduce a constexpr set class, similar to `CMap` | 27,261 | xbmc/xbmc | 17,740 | C++ | neo1973 | |
{
/*! \brief Start playback of the given item. If the item is a folder, build a playlist with
all items contained in the folder and start playback of the playlist. If item is a single video
item, start playback directly, without adding it to the video playlist first.
\param item [in] the item to play
\param pla... | No issues found. | {
/*! \brief Start playback of the given item. If the item is a folder, build a playlist with
all items contained in the folder and start playback of the playlist. If item is a single video
item, start playback directly, without adding it to the video playlist first.
\param item [in] the item to play
\param pla... | @@ -47,9 +47,12 @@ void QueueItem(const std::shared_ptr<CFileItem>& item, QueuePosition pos);
busy dialog if action takes certain amount of time to give the user visual feedback.
\param item [in] the item to add to the playlist
\param queuedItems [out] the items that can be put in a play list
+ \param mode [i... | xbmc/video/guilib/VideoGUIUtils.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | [video] CAsyncGetItemsForPlaylist::GetItemsForPlaylist: Keep sort order… | 27,265 | xbmc/xbmc | 17,740 | C++ | ksooo | |
}
else if (pMsg->IsType(CDVDMsg::PLAYER_SEEK) &&
m_messenger.GetPacketCount(CDVDMsg::PLAYER_SEEK) == 0 &&
m_messenger.GetPacketCount(CDVDMsg::PLAYER_SEEK_CHAPTER) == 0)
{
CDVDMsgPlayerSeek& msg(*std::static_pointer_cast<CDVDMsgPlayerSeek>(pMsg));
if (!m_State.canseek)
{
... | No issues found. | }
else if (pMsg->IsType(CDVDMsg::PLAYER_SEEK) &&
m_messenger.GetPacketCount(CDVDMsg::PLAYER_SEEK) == 0 &&
m_messenger.GetPacketCount(CDVDMsg::PLAYER_SEEK_CHAPTER) == 0)
{
CDVDMsgPlayerSeek& msg(*std::static_pointer_cast<CDVDMsgPlayerSeek>(pMsg));
if (!m_State.canseek)
{
... | @@ -5268,6 +5268,10 @@ bool CVideoPlayer::Supports(ESCALINGMETHOD method) const
bool CVideoPlayer::Supports(ERENDERFEATURE feature) const
{
+#ifndef HAVE_LIBPOSTPROC
+ if (feature == ERENDERFEATURE::RENDERFEATURE_POSTPROCESS)
+ return false;
+#endif
return m_renderManager.Supports(feature);
}
| xbmc/cores/VideoPlayer/VideoPlayer.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | [ffmpeg][linux] Fix compilation without libpostproc | 27,310 | xbmc/xbmc | 17,740 | C++ | sundermann | |
std::unique_lock lock(m_vecPlayerCallbackList);
PlayerCallbackList::iterator it = m_vecPlayerCallbackList.begin();
while (it != m_vecPlayerCallbackList.end())
{
if (*it == pCallback)
{
it = m_vecPlayerCallbackList.erase(it);
m_vecPlayerCallbackList.hadSomethingRemoved = true;
}
else
... | No issues found. | std::unique_lock lock(m_vecPlayerCallbackList);
PlayerCallbackList::iterator it = m_vecPlayerCallbackList.begin();
while (it != m_vecPlayerCallbackList.end())
{
if (*it == pCallback)
{
it = m_vecPlayerCallbackList.erase(it);
m_vecPlayerCallbackList.hadSomethingRemoved = true;
}
else
... | @@ -34,9 +34,6 @@
#include <algorithm>
-// Only required for Py3 < 3.7
-PyThreadState* savestate;
-
bool XBPython::m_bInitialized = false;
XBPython::XBPython()
@@ -49,19 +46,17 @@ XBPython::~XBPython()
XBMC_TRACE;
CServiceBroker::GetAnnouncementManager()->RemoveAnnouncer(this);
-#if PY_VERSION_HEX >= 0... | xbmc/interfaces/python/XBPython.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | [python] Fix random segfaults on Android / webOS on startup / script execution / finalization | 27,320 | xbmc/xbmc | 17,740 | C++ | sundermann | |
std::string location;
std::string currentIcon;
std::string currentConditions;
std::string currentTemperature;
std::string currentFeelsLike;
std::string currentUVIndex;
std::string currentWind;
std::string currentDewPoint;
std::string currentHumidity;
};
class CWeatherManager : public CInfoLoader, pub... | No issues found. | std::string location;
std::string currentIcon;
std::string currentConditions;
std::string currentTemperature;
std::string currentFeelsLike;
std::string currentUVIndex;
std::string currentWind;
std::string currentDewPoint;
std::string currentHumidity;
};
class CWeatherManager : public CInfoLoader, pub... | @@ -95,9 +95,9 @@ class CWeatherManager : public CInfoLoader, public ISettingCallback
int GetLocation() const;
/*!
- \brief Set the active location.
- Will trigger a data refresh if current location is different from the given location.
- \param location the location index (can be in the range [1..MAXLOCA... | xbmc/weather/WeatherManager.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | [weather] Fix forced refresh of weather data for current location … | 27,344 | xbmc/xbmc | 17,740 | C++ | ksooo | |
strISO6392B = it->iso639_2b;
return true;
}
if (std::ranges::binary_search(LanguageCodesByIso639_2b, lower, {}, &ISO639::iso639_2b))
{
strISO6392B = lower;
return true;
}
return false;
}
#endif
bool CLangCodeExpander::ConvertToISO6391(const std::string& lang, std::string& code)
{
if (lang.... | No issues found. | strISO6392B = it->iso639_2b;
return true;
}
if (std::ranges::binary_search(LanguageCodesByIso639_2b, lower, {}, &ISO639::iso639_2b))
{
strISO6392B = lower;
return true;
}
return false;
}
#endif
bool CLangCodeExpander::ConvertToISO6391(const std::string& lang, std::string& code)
{
if (lang.... | @@ -432,11 +432,10 @@ bool CLangCodeExpander::LookupInISO639Tables(const std::string& code, std::strin
std::string sCode(code);
StringUtils::ToLower(sCode);
StringUtils::Trim(sCode);
- uint32_t longCode = StringToLongCode(sCode);
if (sCode.length() == 2)
{
- auto ret = CIso639_1::LookupByCode(longC... | xbmc/utils/LangCodeExpander.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | Fix languages lookup assert | 27,357 | xbmc/xbmc | 17,740 | C++ | CrystalP | |
static constexpr std::chrono::milliseconds MAX_EPISODE_DIFFERENCE{30 * 1000}; // 30 seconds
static constexpr std::chrono::milliseconds MIN_SPECIAL_DURATION{5 * 60 * 1000}; // 5 minutes
static constexpr unsigned int MAIN_TITLE_LENGTH_PERCENT{70};
class CDiscDirectoryHelper
{
enum class IsSpecial : bool
{
SPECIA... | No issues found. | static constexpr std::chrono::milliseconds MAX_EPISODE_DIFFERENCE{30 * 1000}; // 30 seconds
static constexpr std::chrono::milliseconds MIN_SPECIAL_DURATION{5 * 60 * 1000}; // 5 minutes
static constexpr unsigned int MAIN_TITLE_LENGTH_PERCENT{70};
class CDiscDirectoryHelper
{
enum class IsSpecial : bool
{
SPECIA... | @@ -232,6 +232,9 @@ class CDiscDirectoryHelper
void GetPlaylistsFromGroup(unsigned int episodeIndex,
const std::vector<CandidatePlaylistInformation>& group);
void UseGroupMethod(unsigned int episodeIndex, const std::vector<CVideoInfoTag>& episodesOnDisc);
+ void UseTotalMethod(unsig... | xbmc/filesystem/DiscDirectoryHelper.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | [Video][Bluray] Improvement to episode recognition logic. | 27,394 | xbmc/xbmc | 17,740 | C++ | 78andyp | |
class Monitor;
}
} // namespace XBMCAddon
template<class T>
struct LockableType : public T, public CCriticalSection
{
bool hadSomethingRemoved;
};
typedef LockableType<std::vector<void*>> PlayerCallbackList;
typedef LockableType<std::vector<XBMCAddon::xbmc::Monitor*>> MonitorCallbackList;
typedef LockableType<std::... | No issues found. | class Monitor;
}
} // namespace XBMCAddon
template<class T>
struct LockableType : public T, public CCriticalSection
{
bool hadSomethingRemoved;
};
typedef LockableType<std::vector<void*>> PlayerCallbackList;
typedef LockableType<std::vector<XBMCAddon::xbmc::Monitor*>> MonitorCallbackList;
typedef LockableType<std::... | @@ -107,8 +107,6 @@ class XBPython : public IPlayerCallback,
bool WaitForEvent(CEvent& hEvent, unsigned int milliseconds);
private:
- static bool m_bInitialized; // whether global python runtime was already initialized
-
CCriticalSection m_critSection;
PyThreadState* m_mainThreadState{nullptr};
int m_iD... | xbmc/interfaces/python/XBPython.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | [Python] Call Py_Initialize from main thread | 27,395 | xbmc/xbmc | 17,740 | C++ | sundermann | |
m_processInfo.SetVideoPixelFormat(m_render_surface ? "Surface" : "EGL");
m_processInfo.SetVideoDimensions(m_hints.width, m_hints.height);
m_processInfo.SetVideoDeintMethod("hardware");
m_processInfo.SetVideoDAR(m_hints.aspect);
m_videoBufferPool = std::make_shared<CMediaCodecVideoBufferPool>(m_codec);
Upd... | No issues found. | m_processInfo.SetVideoPixelFormat(m_render_surface ? "Surface" : "EGL");
m_processInfo.SetVideoDimensions(m_hints.width, m_hints.height);
m_processInfo.SetVideoDeintMethod("hardware");
m_processInfo.SetVideoDAR(m_hints.aspect);
m_videoBufferPool = std::make_shared<CMediaCodecVideoBufferPool>(m_codec);
Upd... | @@ -500,10 +500,12 @@ bool CDVDVideoCodecAndroidMediaCodec::Open(CDVDStreamInfo &hints, CDVDCodecOptio
bool convertDovi{false};
bool removeDovi{false};
bool removeHdr10Plus{false};
+ bool doviZeroLevel5{false};
if (settings)
{
convertDovi = settings->GetBool(CSettings:... | xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | [Android] [webOS] Add Dolby Vision setting to set zero L5 metadata | 27,431 | xbmc/xbmc | 17,740 | C++ | quietvoid | |
float GetAVDelay() override;
bool IsInMenu() const override;
/*!
* \brief Get the supported menu type
* \return The supported menu type
*/
MenuType GetSupportedMenuType() const override;
void SetSubTitleDelay(float fValue = 0.0f) override;
float GetSubTitleDelay() override;
int GetSubtitleCount(... | No issues found. | float GetAVDelay() override;
bool IsInMenu() const override;
/*!
* \brief Get the supported menu type
* \return The supported menu type
*/
MenuType GetSupportedMenuType() const override;
void SetSubTitleDelay(float fValue = 0.0f) override;
float GetSubTitleDelay() override;
int GetSubtitleCount(... | @@ -433,6 +433,15 @@ class CVideoPlayer : public IPlayer, public CThread, public IVideoPlayer,
void SetSubtitleVisibleInternal(bool bVisible);
+ enum SubtitleChange
+ {
+ FLAG_STATUS_CHANGE = 0x0001,
+ FLAG_STREAMINFO_CHANGE = 0x0002,
+ };
+ void NotifySubtitleUpdate(int flags);
+ void NotifyAudioUpda... | xbmc/cores/VideoPlayer/VideoPlayer.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | JSON RPC : added notifications (Player.OnPropertyChanged) when video… | 27,449 | xbmc/xbmc | 17,740 | C++ | albaintor | |
std::chrono::steady_clock::time_point now)
{
m_color.assign(key.m_colors.begin(), key.m_colors.end());
m_text.assign(key.m_text.begin(), key.m_text.end());
m_key.m_pos = key.m_pos;
m_key.m_colors = m_color;
m_key.m_text = m_text;
m_key.m_alignment = key.m_ali... | No issues found. | std::chrono::steady_clock::time_point now)
{
m_color.assign(key.m_colors.begin(), key.m_colors.end());
m_text.assign(key.m_text.begin(), key.m_text.end());
m_key.m_pos = key.m_pos;
m_key.m_colors = m_color;
m_key.m_text = m_text;
m_key.m_alignment = key.m_ali... | @@ -65,8 +65,10 @@ class CGUIFontCacheImpl
{
if (ageit->second == it)
{
- ageMap.erase(ageit);
- ageMap.insert(typename AgeMap::value_type(now, it));
+ auto node = ageMap.extract(ageit);
+ node.key() = now;
+ node.mapped() = it;
+ ageMap.ins... | xbmc/guilib/GUIFontCache.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | [GUI] Switch font releated APIs to `std::span` | 27,452 | xbmc/xbmc | 17,740 | C++ | neo1973 | |
{
RESULT_SUCCESS, // all details gathered
RESULT_ERROR, // not all details gathered
RESULT_NO_PLAYLIST_SELECTED, // playlist required, but none selected
};
/*!
* \brief Gathers all details needed to play the given item.
* This includes resolving the item to get the item that actually shall be p... | No issues found. | {
RESULT_SUCCESS, // all details gathered
RESULT_ERROR, // not all details gathered
RESULT_NO_PLAYLIST_SELECTED, // playlist required, but none selected
};
/*!
* \brief Gathers all details needed to play the given item.
* This includes resolving the item to get the item that actually shall be p... | @@ -8,82 +8,97 @@
#pragma once
-#include "application/IApplicationComponent.h"
+#include "FileItem.h"
+#include "cores/IPlayer.h"
-#include <cstdint>
-#include <memory>
#include <string>
-class CServiceManager;
-class CPlayerOptions;
-class CVideoDatabase;
class CApplicationStackHelper;
-class CFileItem;
-... | xbmc/application/ApplicationPlay.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | [application] Refactor CApplicationPlay. | 27,454 | xbmc/xbmc | 17,740 | C++ | ksooo | |
else if (pMsg->IsType(CDVDMsg::PLAYER_SEEK) &&
m_messenger.GetPacketCount(CDVDMsg::PLAYER_SEEK) == 0 &&
m_messenger.GetPacketCount(CDVDMsg::PLAYER_SEEK_CHAPTER) == 0)
{
CDVDMsgPlayerSeek& msg(*std::static_pointer_cast<CDVDMsgPlayerSeek>(pMsg));
if (!m_State.canseek)
{
... | No issues found. | else if (pMsg->IsType(CDVDMsg::PLAYER_SEEK) &&
m_messenger.GetPacketCount(CDVDMsg::PLAYER_SEEK) == 0 &&
m_messenger.GetPacketCount(CDVDMsg::PLAYER_SEEK_CHAPTER) == 0)
{
CDVDMsgPlayerSeek& msg(*std::static_pointer_cast<CDVDMsgPlayerSeek>(pMsg));
if (!m_State.canseek)
{
... | @@ -1063,9 +1063,21 @@ void CVideoPlayer::OpenDefaultStreams(bool reset)
valid = true;
if(!psp.relevant(stream))
visible = false;
+
+ // Image type subtitles (e.g. VOBSUB) can support "forced" flag on overlays (images)
+ // so you need to keep the stream open to parse "forced" flag on e... | xbmc/cores/VideoPlayer/VideoPlayer.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | [VideoPlayer] Close PGS/VobSub subtitles when audio language dont match | 27,467 | xbmc/xbmc | 17,740 | C++ | CastagnaIT | |
{
const auto* event{static_cast<XBMC_Event*>(pMsg->lpVoid)};
this->OnEvent(*event);
delete event;
}
}
break;
case TMSG_UPDATE_PLAYER_ITEM:
{
std::unique_ptr<CFileItem> item{static_cast<CFileItem*>(pMsg->lpVoid)};
if (item)
{
m_app.CurrentFil... | No issues found. | {
const auto* event{static_cast<XBMC_Event*>(pMsg->lpVoid)};
this->OnEvent(*event);
delete event;
}
}
break;
case TMSG_UPDATE_PLAYER_ITEM:
{
std::unique_ptr<CFileItem> item{static_cast<CFileItem*>(pMsg->lpVoid)};
if (item)
{
m_app.CurrentFil... | @@ -203,8 +203,7 @@ void CApplicationMessageHandling::OnApplicationMessage(MESSAGING::ThreadMessage*
case TMSG_SWITCHTOFULLSCREEN:
{
- CGUIComponent* gui = CServiceBroker::GetGUI();
- if (gui)
+ if (CGUIComponent* gui = CServiceBroker::GetGUI(); gui)
gui->GetWindowManager().SwitchToF... | xbmc/application/ApplicationMessageHandling.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | Fix random SonarQube findings introduced since September 1 2025 | 27,509 | xbmc/xbmc | 17,740 | C++ | ksooo | |
bool updateListing = false;
// No resume & watched status for livetv
if (!item.IsLiveTV())
{
if (updatePlayCount)
{
// no watched for not yet finished pvr recordings
if (!item.IsInProgressPVRRecording())
{
CLog::Log(LO... | No issues found. | bool updateListing = false;
// No resume & watched status for livetv
if (!item.IsLiveTV())
{
if (updatePlayCount)
{
// no watched for not yet finished pvr recordings
if (!item.IsInProgressPVRRecording())
{
CLog::Log(LO... | @@ -54,6 +54,18 @@ void CSaveFileState::DoWork(CFileItem& item,
if (URIUtils::IsUPnP(progressTrackingFile)
&& UPNP::CUPnP::SaveFileState(item, bookmark, updatePlayCount))
{
+ CFileItem updatedItem(item);
+ if (updatedItem.HasVideoInfoTag())
+ updatedItem.GetVideoInfoTag()->SetResumeP... | xbmc/utils/SaveFileStateJob.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | UPnP AV bug fixes | 27,521 | xbmc/xbmc | 17,740 | C++ | Kate6 | |
#include <sys/resource.h>
CPlatform* CPlatform::CreateInstance()
{
return new CPlatformWebOS();
}
std::string CPlatformWebOS::GetHomePath()
{
std::filesystem::path self("/proc/self/exe");
std::error_code ec;
std::filesystem::path path = std::filesystem::read_symlink(self, ec);
if (ec)
{
const char* ... | No issues found. |
#include <sys/resource.h>
CPlatform* CPlatform::CreateInstance()
{
return new CPlatformWebOS();
}
std::string CPlatformWebOS::GetHomePath()
{
std::filesystem::path self("/proc/self/exe");
std::error_code ec;
std::filesystem::path path = std::filesystem::read_symlink(self, ec);
if (ec)
{
const char* ... | @@ -73,6 +73,7 @@ bool CPlatformWebOS::InitStageTwo()
CLog::Log(LOGERROR, "Failed to disable core dumps");
WebOSTVPlatformConfig::Load();
+ WebOSTVPlatformConfig::LoadARCStatus();
return CPlatformLinux::InitStageTwo();
}
| xbmc/platform/linux/PlatformWebOS.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | webOS: transcode to DD+ instead of DD if eARC supported and enabled | 27,541 | xbmc/xbmc | 17,740 | C++ | cscd98 | |
{
m_hold = HOLD_ERROR;
return result;
}
/* Check for holding events */
switch(m_event.event) {
case BD_EVENT_SEEK:
case BD_EVENT_TITLE:
case BD_EVENT_ANGLE:
case BD_EVENT_PLAYLIST:
case BD_EVENT_PLAYITEM:
if(m_hold != HOLD_DATA)
... | No issues found. | {
m_hold = HOLD_ERROR;
return result;
}
/* Check for holding events */
switch(m_event.event) {
case BD_EVENT_SEEK:
case BD_EVENT_TITLE:
case BD_EVENT_ANGLE:
case BD_EVENT_PLAYLIST:
case BD_EVENT_PLAYITEM:
if(m_hold != HOLD_DATA)
... | @@ -1347,17 +1347,18 @@ void CDVDInputStreamBluray::SaveCurrentState(const CStreamDetails& details)
m_startWatchTime = std::chrono::steady_clock::now();
}
-CDVDInputStream::UpdateState CDVDInputStreamBluray::UpdateCurrentState(CFileItem& item,
- ... | xbmc/cores/VideoPlayer/DVDInputStreams/DVDInputStreamBluray.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | [Video] Fix repetitive calls to UpdateFileItemStreamDetails(). | 27,543 | xbmc/xbmc | 17,740 | C++ | 78andyp | |
namespace JSONRPC
{
enum PlayerType
{
None = 0,
Video = 0x1,
Audio = 0x2,
Picture = 0x4,
External = 0x8,
Remote = 0x10
};
static const int PlayerImplicit = (Video | Audio | Picture);
class CPlayerOperations : CFileItemHandler
{
public:
static JSONRPC_STATUS GetActivePlayers(c... | No issues found. | namespace JSONRPC
{
enum PlayerType
{
None = 0,
Video = 0x1,
Audio = 0x2,
Picture = 0x4,
External = 0x8,
Remote = 0x10
};
static const int PlayerImplicit = (Video | Audio | Picture);
class CPlayerOperations : CFileItemHandler
{
public:
static JSONRPC_STATUS GetActivePlayers(c... | @@ -85,6 +85,13 @@ namespace JSONRPC
static JSONRPC_STATUS AddSubtitle(const std::string &method, ITransportLayer *transport, IClient *client, const CVariant ¶meterObject, CVariant &result);
static JSONRPC_STATUS SetSubtitle(const std::string &method, ITransportLayer *transport, IClient *client, const CVa... | xbmc/interfaces/json-rpc/PlayerOperations.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | JSON RPC : added Player.GetChapters method | 27,560 | xbmc/xbmc | 17,740 | C++ | albaintor | |
{XKB_KEY_dead_doubleacute, XBMCK_DOUBLEACUTE},
{XKB_KEY_dead_caron, XBMCK_CARON},
{XKB_KEY_dead_cedilla, XBMCK_CEDILLA},
{XKB_KEY_dead_ogonek, XBMCK_OGONEK},
{XKB_KEY_dead_iota, XBMCK_IOTA},
{XKB_KEY_dead_voiced_sound, XBMCK_VOICESOUND},
{XKB_KEY_dead_semivoiced_sound, XBMCK_SEMIVOICESOUND},... | No issues found. | {XKB_KEY_dead_doubleacute, XBMCK_DOUBLEACUTE},
{XKB_KEY_dead_caron, XBMCK_CARON},
{XKB_KEY_dead_cedilla, XBMCK_CEDILLA},
{XKB_KEY_dead_ogonek, XBMCK_OGONEK},
{XKB_KEY_dead_iota, XBMCK_IOTA},
{XKB_KEY_dead_voiced_sound, XBMCK_VOICESOUND},
{XKB_KEY_dead_semivoiced_sound, XBMCK_SEMIVOICESOUND},... | @@ -212,9 +212,9 @@ constexpr auto XkbKeycodeXBMCMappings = make_map<xkb_keycode_t, XBMCKey>({
{XKB_KEY_WEBOS_CHANNEL_UP, XBMCK_PAGEUP},
{XKB_KEY_WEBOS_INFO, XBMCK_INFO},
{XKB_KEY_WEBOS_TVGUIDE, XBMCK_GUIDE},
- {XKB_KEY_WEBOS_CURSOR_HIDE, XBMCK_UNKNOWN},
- {XKB_KEY_WEBOS_CURSOR_SHOW, XBMCK_UNKNOWN}... | xbmc/windowing/wayland/XkbcommonKeymap.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | Fix wayland keymapping is not possible when the key id is unconventional | 27,563 | xbmc/xbmc | 17,740 | C++ | hbiyik | |
// run through looking for the [playlist] marker.
// if we find another http stream, then load it.
while (true)
{
if (!file.ReadLine(strLine))
{
file.Close();
return size() > 0;
}
StringUtils::Trim(strLine);
if(StringUtils::EqualsNoCase(strLine, START_PLAYLIST_MARKER))
brea... | No issues found. | // run through looking for the [playlist] marker.
// if we find another http stream, then load it.
while (true)
{
if (!file.ReadLine(strLine))
{
file.Close();
return size() > 0;
}
StringUtils::Trim(strLine);
if(StringUtils::EqualsNoCase(strLine, START_PLAYLIST_MARKER))
brea... | @@ -28,6 +28,21 @@ using namespace XFILE;
#define START_PLAYLIST_MARKER "[playlist]" // may be case-insensitive (equivalent to .ini file on win32)
#define PLAYLIST_NAME "PlaylistName"
+namespace
+{
+bool Resize(std::vector<std::shared_ptr<CFileItem>>& items, size_t newSize)
+{
+ if (newSize == 0)
+ return f... | xbmc/playlists/PlayListPLS.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | [playlists][video] Fix browse for subtitles for items contained in playlists and strm files. | 27,593 | xbmc/xbmc | 17,740 | C++ | ksooo | |
}
}
}
else if( pMsg->IsType(CDVDMsg::SUBTITLE_CLUTCHANGE) )
{
auto pData = std::static_pointer_cast<CDVDMsgSubtitleClutChange>(pMsg);
for (int i = 0; i < 16; i++)
{
uint8_t* color = m_dvdspus.m_clut[i];
uint8_t* t = (uint8_t*)pData->m_data[i];
// pData->m_data[i] points to an u... | No issues found. | }
}
}
else if( pMsg->IsType(CDVDMsg::SUBTITLE_CLUTCHANGE) )
{
auto pData = std::static_pointer_cast<CDVDMsgSubtitleClutChange>(pMsg);
for (int i = 0; i < 16; i++)
{
uint8_t* color = m_dvdspus.m_clut[i];
uint8_t* t = (uint8_t*)pData->m_data[i];
// pData->m_data[i] points to an u... | @@ -37,6 +37,20 @@ void CVideoPlayerSubtitle::Flush()
SendMessage(std::make_shared<CDVDMsg>(CDVDMsg::GENERAL_FLUSH), 0);
}
+namespace
+{
+std::shared_ptr<CDVDOverlayGroup> InitialiseNewOverlayGroup(std::shared_ptr<CDVDOverlay>& overlay)
+{
+ auto group{std::make_shared<CDVDOverlayGroup>()};
+ group->iPTSStartTi... | xbmc/cores/VideoPlayer/VideoPlayerSubtitle.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | [Video] Fix #27121 broke Bluray menus. | 27,595 | xbmc/xbmc | 17,740 | C++ | 78andyp | |
{
std::unique_lock lock(CServiceBroker::GetWinSystem()->GetGfxContext());
if (m_activeDialogs.empty())
return;
auto activeDialogs = m_activeDialogs;
for (const auto& window : activeDialogs)
{
if (window->IsModalDialog() && !IsAddonWindow(window->GetID()) && !IsPythonWindow(window->GetID()))
win... | No issues found. | {
std::unique_lock lock(CServiceBroker::GetWinSystem()->GetGfxContext());
if (m_activeDialogs.empty())
return;
auto activeDialogs = m_activeDialogs;
for (const auto& window : activeDialogs)
{
if (window->IsModalDialog() && !IsAddonWindow(window->GetID()) && !IsPythonWindow(window->GetID()))
win... | @@ -700,8 +700,9 @@ void CGUIWindowManager::Remove(int id)
}
}
-// removes and deletes the window. Should only be called
-// from the class that created the window using new.
+// Removes and deletes the window. Should only be called
+// from the class that created the window and transferred
+// ownership to CGUI... | xbmc/guilib/GUIWindowManager.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | [Addons] Avoid delete since window ownership belongs to CGUIWindowMan… | 27,656 | xbmc/xbmc | 17,740 | C++ | enen92 | |
#include <stdint.h>
#include <vector>
#include <Audioclient.h>
#include <mmdeviceapi.h>
#include <wrl/client.h>
class CAESinkWASAPI : public IAESink
{
public:
CAESinkWASAPI();
virtual ~CAESinkWASAPI();
static void Register();
static std::unique_ptr<IAESink> Create(std::string& device, AEAudioFormat& ... | No issues found. | #include <stdint.h>
#include <vector>
#include <Audioclient.h>
#include <mmdeviceapi.h>
#include <wrl/client.h>
class CAESinkWASAPI : public IAESink
{
public:
CAESinkWASAPI();
virtual ~CAESinkWASAPI();
static void Register();
static std::unique_ptr<IAESink> Create(std::string& device, AEAudioFormat& ... | @@ -40,8 +40,8 @@ class CAESinkWASAPI : public IAESink
private:
bool InitializeExclusive(AEAudioFormat &format);
- static void BuildWaveFormatExtensibleIEC61397(AEAudioFormat &format, WAVEFORMATEXTENSIBLE_IEC61937 &wfxex);
- bool IsUSBDevice();
+ static void BuildWaveFormatExtensibleIEC61397(AEAudioFor... | xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | [Windows] WASAPI rework | 27,675 | xbmc/xbmc | 17,740 | C++ | thexai | |
}
void CSkinSettings::SetBool(int setting, bool set) const
{
auto skin = CServiceBroker::GetGUI()->GetSkinInfo();
if (!skin)
return;
skin->SetBool(setting, set);
}
void CSkinSettings::Reset(const std::string& setting) const
{
auto skin = CServiceBroker::GetGUI()->GetSkinInfo();
if (!skin)
return;
... | No issues found. | }
void CSkinSettings::SetBool(int setting, bool set) const
{
auto skin = CServiceBroker::GetGUI()->GetSkinInfo();
if (!skin)
return;
skin->SetBool(setting, set);
}
void CSkinSettings::Reset(const std::string& setting) const
{
auto skin = CServiceBroker::GetGUI()->GetSkinInfo();
if (!skin)
return;
... | @@ -42,63 +42,101 @@ CSkinSettings& CSkinSettings::GetInstance()
int CSkinSettings::TranslateString(const std::string& setting) const
{
- return g_SkinInfo->TranslateString(setting);
+ auto skin = CServiceBroker::GetGUI()->GetSkinInfo();
+ if (!skin)
+ return -1;
+ return skin->TranslateString(setting);
}
... | xbmc/settings/SkinSettings.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | [GUI] Kill g_SkinInfo global, move to CGUIComponent | 27,707 | xbmc/xbmc | 17,740 | C++ | enen92 | |
#include <stdint.h>
#include <vector>
#include <Audioclient.h>
#include <mmdeviceapi.h>
#include <wrl/client.h>
class CAESinkWASAPI : public IAESink
{
public:
CAESinkWASAPI();
virtual ~CAESinkWASAPI();
static void Register();
static std::unique_ptr<IAESink> Create(std::string& device, AEAudioFormat&... | No issues found. |
#include <stdint.h>
#include <vector>
#include <Audioclient.h>
#include <mmdeviceapi.h>
#include <wrl/client.h>
class CAESinkWASAPI : public IAESink
{
public:
CAESinkWASAPI();
virtual ~CAESinkWASAPI();
static void Register();
static std::unique_ptr<IAESink> Create(std::string& device, AEAudioFormat&... | @@ -42,6 +42,7 @@ class CAESinkWASAPI : public IAESink
bool InitializeExclusive(AEAudioFormat &format);
static void BuildWaveFormatExtensibleIEC61397(AEAudioFormat& format,
WAVEFORMATEXTENSIBLE_IEC61937& wfxex);
+ void WriteLastBuffer();
HANDLE m_ne... | xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | [WASAPI] Improve Drain() - Allow write pending frames in m_buffer | 27,722 | xbmc/xbmc | 17,740 | C++ | thexai | |
bool OnClick(int actionID);
virtual void ProcessItem(float posX,
float posY,
std::shared_ptr<CGUIListItem>& item,
bool focused,
unsigned int currentTime,
CDirtyRegionList& dirtyreg... | No issues found. | bool OnClick(int actionID);
virtual void ProcessItem(float posX,
float posY,
std::shared_ptr<CGUIListItem>& item,
bool focused,
unsigned int currentTime,
CDirtyRegionList& dirtyreg... | @@ -19,6 +19,7 @@
#include <list>
#include <memory>
+#include <optional>
#include <utility>
#include <vector>
@@ -151,6 +152,8 @@ class CGUIBaseContainer : public IGUIContainer
std::shared_ptr<CGUIListItem> m_lastItem;
int m_pageControl;
+ std::optional<int>
+ m_lastPageControlOffset; // cached of... | xbmc/guilib/GUIBaseContainer.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | [guilib] Optimize GUIBaseContainer page control message caching | 27,735 | xbmc/xbmc | 17,740 | C++ | pannal | |
void Process(unsigned int currentTime, CDirtyRegionList &dirtyregions) override;
void Render() override;
bool OnAction(const CAction& action) override;
bool OnMessage(CGUIMessage& message) override;
EVENT_RESULT SendMouseEvent(const CPoint& point, const KODI::MOUSE::CMouseEvent& event) override;
void Unfoc... | No issues found. | void Process(unsigned int currentTime, CDirtyRegionList &dirtyregions) override;
void Render() override;
bool OnAction(const CAction& action) override;
bool OnMessage(CGUIMessage& message) override;
EVENT_RESULT SendMouseEvent(const CPoint& point, const KODI::MOUSE::CMouseEvent& event) override;
void Unfoc... | @@ -15,6 +15,8 @@
#include "GUIControlGroup.h"
+#include <optional>
+
struct SGUIControlAndOffset
{
CGUIControl* control{nullptr};
@@ -29,6 +31,7 @@ class CGUIControlGroupList : public CGUIControlGroup
{
public:
CGUIControlGroupList(int parentID, int controlID, float posX, float posY, float width, float ... | xbmc/guilib/GUIControlGroupList.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | [guilib] Optimize GUIControlGroupList page control message caching | 27,736 | xbmc/xbmc | 17,740 | C++ | pannal | |
const CTextureInfo& textureFocus, const CTextureInfo& textureNoFocus,
const CLabelInfo &label, bool wrapMultiline = false);
CGUIButtonControl(const CGUIButtonControl& control);
~CGUIButtonControl() override = default;
CGUIButtonControl* Clone() const override { return new... | No issues found. | const CTextureInfo& textureFocus, const CTextureInfo& textureNoFocus,
const CLabelInfo &label, bool wrapMultiline = false);
CGUIButtonControl(const CGUIButtonControl& control);
~CGUIButtonControl() override = default;
CGUIButtonControl* Clone() const override { return new... | @@ -20,6 +20,8 @@
#include "guilib/guiinfo/GUIInfoLabel.h"
#include "utils/ColorUtils.h"
+#include <optional>
+
/*!
\ingroup controls
\brief
@@ -93,6 +95,7 @@ class CGUIButtonControl : public CGUIControl
std::unique_ptr<CGUITexture> m_imgNoFocus;
unsigned int m_focusCounter;
unsigned char m_alpha;
+ ... | xbmc/guilib/GUIButtonControl.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | [guilib] Optimize GUIButtonControl focus pulse alpha updates | 27,737 | xbmc/xbmc | 17,740 | C++ | pannal | |
class IThreadImpl;
class CThread
{
protected:
explicit CThread(const char* ThreadName);
public:
CThread(IRunnable* pRunnable, const char* ThreadName);
virtual ~CThread();
void Create(bool bAutoDelete = false);
template<typename Rep, typename Period>
void Sleep(std::chrono::duration<Rep, Period> duration)
... | No issues found. | class IThreadImpl;
class CThread
{
protected:
explicit CThread(const char* ThreadName);
public:
CThread(IRunnable* pRunnable, const char* ThreadName);
virtual ~CThread();
void Create(bool bAutoDelete = false);
template<typename Rep, typename Period>
void Sleep(std::chrono::duration<Rep, Period> duration)
... | @@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005-2018 Team Kodi
+ * Copyright (C) 2005-2026 Team Kodi
* This file is part of Kodi - https://kodi.tv
*
* SPDX-License-Identifier: GPL-2.0-or-later
@@ -39,6 +39,11 @@ enum class ThreadPriority
PRIORITY_COUNT,
};
+enum class ThreadTask
+{
+ AUDIO,
+};
+
class IRu... | xbmc/threads/Thread.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | [Threading][Windows] Log app/thread priorities and use MMCSS for AE Sink | 27,748 | xbmc/xbmc | 17,740 | C++ | CrystalP | |
{
CreateEffect();
}
HRESULT CD3DEffect::Open(D3D_INCLUDE_TYPE IncludeType, LPCSTR pFileName, LPCVOID pParentData, LPCVOID* ppData, UINT* pBytes)
{
XFILE::CFile includeFile;
bool found = false;
std::string fileName;
for (const auto& includePath : m_includePaths)
{
fileName = includePath;
std::strin... | No issues found. | {
CreateEffect();
}
HRESULT CD3DEffect::Open(D3D_INCLUDE_TYPE IncludeType, LPCSTR pFileName, LPCVOID pParentData, LPCVOID* ppData, UINT* pBytes)
{
XFILE::CFile includeFile;
bool found = false;
std::string fileName;
for (const auto& includePath : m_includePaths)
{
fileName = includePath;
std::strin... | @@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005-2018 Team Kodi
+ * Copyright (C) 2005-2026 Team Kodi
* This file is part of Kodi - https://kodi.tv
*
* SPDX-License-Identifier: GPL-2.0-or-later
@@ -488,7 +488,8 @@ void CD3DTexture::DrawQuad(const CPoint points[4],
KODI::UTILS::COLOR::Col... | xbmc/guilib/D3DResource.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | [Windows] D3D11 Implementation of Front to Back Rendering | 27,751 | xbmc/xbmc | 17,740 | C++ | CrystalP | |
/*
* Copyright (C) 2026 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 <cstdint>
#include <string>
/*!
\ingroup guilib
\brief GUI utility functions
*/
class CGUIUtils
{
public:
... | No issues found. | /*
* Copyright (C) 2026 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 <cstdint>
#include <string>
/*!
\ingroup guilib
\brief GUI utility functions
*/
class CGUIUtils
{
public:
... | @@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2026 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 <cstdint>
+#include <string>
+
+/*!
+ \ingroup guilib
+ \brief GUI utility functio... | xbmc/guilib/GUIUtils.h | 0 | C/C++ | 1 | none | 16 | 32 | 32 | true | [GUI] Fix some regressions regarding skin strings | 27,755 | xbmc/xbmc | 17,740 | C++ | enen92 | |
}
std::string GetCompoundExtensions(std::string_view extensions)
{
std::string out;
for (const auto& ext : StringUtils::Split(extensions, "|"))
{
if (ext.empty())
continue;
if (std::ranges::count(ext, '.') > 1)
out.append(ext + "|");
}
if (!out.empty())
out.pop_back();
return out;
... | No issues found. | }
std::string GetCompoundExtensions(std::string_view extensions)
{
std::string out;
for (const auto& ext : StringUtils::Split(extensions, "|"))
{
if (ext.empty())
continue;
if (std::ranges::count(ext, '.') > 1)
out.append(ext + "|");
}
if (!out.empty())
out.pop_back();
return out;
... | @@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012-2018 Team Kodi
+ * Copyright (C) 2012-2026 Team Kodi
* This file is part of Kodi - https://kodi.tv
*
* SPDX-License-Identifier: GPL-2.0-or-later
@@ -21,6 +21,8 @@
#include "utils/StringUtils.h"
#include "utils/URIUtils.h"
+#include <array>
+#include <functional>
... | xbmc/utils/FileExtensionProvider.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | [Settings] Add Advanced Settings Reload Notification + Use in FileExtensionsProvider and Renderers | 27,772 | xbmc/xbmc | 17,740 | C++ | CrystalP | |
TEST(TestWin32CharsetConverter, FromW)
{
std::wstring ws;
std::string expected;
std::string result = FromW(ws);
EXPECT_EQ(expected, result);
ws = L"foo";
result = FromW(ws);
expected = "foo";
EXPECT_EQ(expected, result);
std::wstring_view wsv(L"foo");
result = FromW(wsv);
EXPECT_EQ(expected, ... | No issues found. | TEST(TestWin32CharsetConverter, FromW)
{
std::wstring ws;
std::string expected;
std::string result = FromW(ws);
EXPECT_EQ(expected, result);
ws = L"foo";
result = FromW(ws);
expected = "foo";
EXPECT_EQ(expected, result);
std::wstring_view wsv(L"foo");
result = FromW(wsv);
EXPECT_EQ(expected, ... | @@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2026 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 "platform/win32/CharsetConverter.h"
+
+#include <string>
+#include <string_view>
+
+#include <gtes... | xbmc/platform/win32/test/TestCharsetConverter.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | [Windows] FromW/ToW Improvements | 27,789 | xbmc/xbmc | 17,740 | C++ | CrystalP | |
}
void CRenderSystemGL::Project(float &x, float &y, float &z)
{
GLfloat coordX, coordY, coordZ;
if (CMatrixGL::Project(x, y, z, glMatrixModview.Get(), glMatrixProject.Get(), m_viewPort, &coordX, &coordY, &coordZ))
{
x = coordX;
y = (float)(m_viewPort[1] + m_viewPort[3] - coordY);
z = 0;
}
}
void C... | No issues found. | }
void CRenderSystemGL::Project(float &x, float &y, float &z)
{
GLfloat coordX, coordY, coordZ;
if (CMatrixGL::Project(x, y, z, glMatrixModview.Get(), glMatrixProject.Get(), m_viewPort, &coordX, &coordY, &coordZ))
{
x = coordX;
y = (float)(m_viewPort[1] + m_viewPort[3] - coordY);
z = 0;
}
}
void C... | @@ -288,7 +288,7 @@ void CRenderSystemGL::InvalidateColorBuffer()
return;
/* clear is not affected by stipple pattern, so we can only clear on first frame */
- if (m_stereoMode == RENDER_STEREO_MODE_INTERLACED && m_stereoView == RENDER_STEREO_VIEW_RIGHT)
+ if (m_stereoMode == RENDER_STEREO_MODE_INTERLACED &... | xbmc/rendering/gl/RenderSystemGL.cpp | 0 | C++ | 1 | none | 16 | 51 | 51 | true | Convert RENDER_STEREO_VIEW to enum class | 27,792 | xbmc/xbmc | 17,740 | C++ | notspiff | |
static void GetSeasonThumbs(
const CVideoInfoTag& show,
KODI::ART::SeasonsArtwork& art,
const std::vector<std::string>& artTypes,
bool useLocal = true,
UseRemoteArtWithLocalScraper useRemoteArt = UseRemoteArtWithLocalScraper::YES);
static std::string GetImage(const CScrap... | No issues found. | static void GetSeasonThumbs(
const CVideoInfoTag& show,
KODI::ART::SeasonsArtwork& art,
const std::vector<std::string>& artTypes,
bool useLocal = true,
UseRemoteArtWithLocalScraper useRemoteArt = UseRemoteArtWithLocalScraper::YES);
static std::string GetImage(const CScrap... | @@ -178,6 +178,7 @@ namespace KODI::VIDEO
CGUIDialogProgress* pDlgProgress);
InfoRet RetrieveInfoForEpisodes(CFileItem* item,
long showID,
+ EPISODELIST& files,
const ... | xbmc/video/VideoInfoScanner.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | [Video][Library] Check for parsing nfos to ensure episode grouping respected when adding additional episodes. | 27,877 | xbmc/xbmc | 17,740 | C++ | 78andyp | |
#include <fmt/format.h> //! \todo remove after upgrade to libfmt >= 10.0
namespace KODI::UTILS::I18N
{
struct RegistryFileField
{
std::string m_name;
std::string m_body;
RegistryFileField(std::string&& name, std::string&& body)
: m_name(std::move(name)),
m_body(std::move(body))
{
}
};
struct Reg... | No issues found. |
#include <fmt/format.h> //! \todo remove after upgrade to libfmt >= 10.0
namespace KODI::UTILS::I18N
{
struct RegistryFileField
{
std::string m_name;
std::string m_body;
RegistryFileField(std::string&& name, std::string&& body)
: m_name(std::move(name)),
m_body(std::move(body))
{
}
};
struct Reg... | @@ -13,6 +13,8 @@
#include <string>
#include <vector>
+#include <fmt/format.h> //! \todo remove after upgrade to libfmt >= 10.0
+
namespace KODI::UTILS::I18N
{
struct RegistryFileField
@@ -49,7 +51,7 @@ struct RegistryFileRecord
};
/*!
- * \brief fmt/std::format formatter for RegistryFileRecord
+ * \brief Re... | xbmc/utils/i18n/Bcp47Registry/RegistryRecordProvider.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | Fix build for libfmt < 10.0 | 27,927 | xbmc/xbmc | 17,740 | C++ | CrystalP | |
class CDecoderFilterManager;
class IDispResource;
class CNativeWindow;
class CWinSystemAndroid : public CWinSystemBase, public ITimerCallback
{
public:
CWinSystemAndroid();
~CWinSystemAndroid() override;
bool InitWindowSystem() override;
bool DestroyWindowSystem() override;
bool CreateNewWindow(const std:... | No issues found. |
class CDecoderFilterManager;
class IDispResource;
class CNativeWindow;
class CWinSystemAndroid : public CWinSystemBase, public ITimerCallback
{
public:
CWinSystemAndroid();
~CWinSystemAndroid() override;
bool InitWindowSystem() override;
bool DestroyWindowSystem() override;
bool CreateNewWindow(const std:... | @@ -83,5 +83,6 @@ class CWinSystemAndroid : public CWinSystemBase, public ITimerCallback
private:
bool m_HdmiModeTriggered = false;
+ bool m_dispModesUpdatePending = false;
void UpdateResolutions(bool bUpdateDesktopRes);
}; | xbmc/windowing/android/WinSystemAndroid.h | 0 | C/C++ | 1 | none | 16 | 51 | 51 | true | [Android] Fix AFR not working after standby/wake cycle | 27,928 | xbmc/xbmc | 17,740 | C++ | fritsch | |
@abstractmethod
def translate(self, text):
pass
class GPT3(Base):
def __init__(self, key):
self.api_key = key
self.api_url = "https://api.openai.com/v1/completions"
self.headers = {
"Content-Type": "application/json",
}
# TODO support more models... | I think the better way is using a key list.
when we get limit error, we change another key.
so we can avoid get the same key here | return key
@abstractmethod
def translate(self, text):
pass
class GPT3(Base):
def __init__(self, key, language):
super().__init__(key, language)
self.api_key = key
self.api_url = "https://api.openai.com/v1/completions"
self.headers = {
"Content-T... | @@ -43,6 +54,8 @@ def __init__(self, key):
def translate(self, text):
print(text)
+ api_key = self.get_key(self.api_key)
+ self.headers["Authorization"] = f"Bearer {self.get_key(api_key)}" | make_book.py | 26 | Python | 0.571 | suggestion | 131 | 51 | 51 | false | feat:multi apikey to break through the limitation,and fix some common… | 14 | yihong0618/bilingual_book_maker | 3,321 | Python | yihong0618 | guaguaguaxia |
dest="retranslate",
nargs=4,
type=str,
help="""--retranslate "$translated_filepath" "file_name_in_epub" "start_str" "end_str"(optional)
Retranslate from start_str to end_str's tag:
python3 "make_book.py" --book_name "test_books/animal_farm.epub" --retranslate 'test_books/... | `chatgptaccount`->`chatgpt_account` `chatgptpassword`->`chatgpt_password` Separating variables with underscores can improve readability. | )
parser.add_argument(
"--retranslate",
dest="retranslate",
nargs=4,
type=str,
help="""--retranslate "$translated_filepath" "file_name_in_epub" "start_str" "end_str"(optional)
Retranslate from start_str to end_str's tag:
python3 "make_book.py" --book_name ... | @@ -207,6 +207,21 @@ def main():
""",
)
+ parser.add_argument(
+ "--chatgptaccount",
+ dest="chatgptaccount",
+ type=str,
+ help="your chatgpt account",
+ )
+
+ parser.add_argument(
+ "--chatgptpassword",
+ dest="chatgptpassword",
+ type=str,
+ he... | book_maker/cli.py | 26 | Python | 0.5 | suggestion | 136 | 51 | 51 | false | feat:add ChatGPT Account translate method and input options to __init… | 43 | yihong0618/bilingual_book_maker | 3,321 | Python | zstone12 | guaguaguaxia |
import requests
from revChatGPT.V1 import Chatbot
from rich import print
from .base_translator import Base
class ChatGPTAccount(Base):
def __init__(self, key, language, **kwargs):
super().__init__(key, language)
self.session = requests.session()
self.language = language
self.chatg... | It seems that there is no place to use this variable `self.session` . | import requests
from revChatGPT.V1 import Chatbot
from rich import print
from .base_translator import Base
class ChatGPTAccount(Base):
def __init__(self, key, language, **kwargs):
super().__init__(key, language)
self.language = language
self.chatgpt_account = kwargs.get("chatgptaccount")
... | @@ -0,0 +1,34 @@
+import requests
+from revChatGPT.V1 import Chatbot
+from rich import print
+
+from .base_translator import Base
+
+
+class ChatGPTAccount(Base):
+ def __init__(self, key, language, **kwargs):
+ super().__init__(key, language)
+ self.session = requests.session() | book_maker/translator/chatgpt_account_translator.py | 11 | Python | 0.429 | suggestion | 69 | 35 | 34 | false | feat:add ChatGPT Account translate method and input options to __init… | 43 | yihong0618/bilingual_book_maker | 3,321 | Python | zstone12 | guaguaguaxia |
self.load_state()
@staticmethod
def _is_special_text(text):
return text.isdigit() or text.isspace()
def _make_new_book(self, book):
new_book = epub.EpubBook()
new_book.metadata = book.metadata
new_book.spine = book.spine
new_book.toc = book.toc
r... | resultTxtList -> result_txt_list | if model == "gpt-3.5-turbo-0301": # note: future models may deviate from this
num_tokens = 0
for message in messages:
num_tokens += (
4 # every message follows <im_start>{role/name}\n{content}<im_end>\n
)
for key, value in message.items():
... | @@ -70,6 +72,28 @@ def _make_new_book(self, book):
return new_book
def make_bilingual_book(self):
+ def deal_new(p, waitPList):
+ ret = deal_old(waitPList)
+ new_p = copy(p)
+ new_p.string = self.translate_model.translate(p.text)
+ p.insert_after(new_p)... | book_maker/loader/epub_loader.py | 26 | Python | 0.071 | suggestion | 32 | 51 | 51 | false | Cumulative translation | 148 | yihong0618/bilingual_book_maker | 3,321 | Python | yihong0618 | sunyuechi |
new_book.spine = book.spine
new_book.toc = book.toc
return new_book
def make_bilingual_book(self):
def deal_new(p, wait_p_list):
ret = deal_old(wait_p_list)
new_p = copy(p)
new_p.string = self.translate_model.translate(p.text)
p.insert... | I still don't understand why we need to return [], as it always seems to be an empty list. Could you explain it again? | url_pattern = re.compile(
r".*http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+$"
)
return bool(url_pattern.match(text)) and len(text) < num
def is_source(text):
return text.strip().startswith("Source: ")
def is_list(text, num=80):
text = text.strip()
ret... | @@ -73,6 +91,28 @@ def _make_new_book(self, book):
return new_book
def make_bilingual_book(self):
+ def deal_new(p, wait_p_list):
+ ret = deal_old(wait_p_list)
+ new_p = copy(p)
+ new_p.string = self.translate_model.translate(p.text)
+ p.insert_after(ne... | book_maker/loader/epub_loader.py | 26 | Python | 0.429 | question | 118 | 51 | 51 | false | Cumulative translation | 148 | yihong0618/bilingual_book_maker | 3,321 | Python | zstone12 | sunyuechi |
@staticmethod
def _is_special_text(text):
return text.isdigit() or text.isspace() or isLink(text)
def _make_new_book(self, book):
new_book = epub.EpubBook()
new_book.metadata = book.metadata
new_book.spine = book.spine
new_book.toc = book.toc
return new_book
... | ```suggestion
for i in range(len(wait_p_list)):
``` | r"http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+"
)
return bool(url_pattern.match(text.strip()))
def is_tail_Link(text, num=100):
text = text.strip()
url_pattern = re.compile(
r".*http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F... | @@ -73,6 +91,28 @@ def _make_new_book(self, book):
return new_book
def make_bilingual_book(self):
+ def deal_new(p, wait_p_list):
+ ret = deal_old(wait_p_list)
+ new_p = copy(p)
+ new_p.string = self.translate_model.translate(p.text)
+ p.insert_after(ne... | book_maker/loader/epub_loader.py | 26 | Python | 0.571 | suggestion | 65 | 51 | 51 | false | Cumulative translation | 148 | yihong0618/bilingual_book_maker | 3,321 | Python | danparizher | sunyuechi |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.