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 (item.IsPVRChannelGroup()) thumb = CreateChannelGroupThumb(item); else CLog::LogF(LOGERROR, "Unsupported PVR item '{}'", item.GetPath()); if (!thumb.empty()) { SetCachedImage(item, "thumb", thumb); m_bInvalidated = true; } } if (thumb.empty()) return false; it...
Maybe we can get rid off the variable here and simply return the stringutils::format result.
if (item.IsPVRChannelGroup()) thumb = CreateChannelGroupThumb(item); else CLog::LogF(LOGERROR, "Unsupported PVR item '{}'", item.GetPath()); if (!thumb.empty()) { SetCachedImage(item, "thumb", thumb); m_bInvalidated = true; } } if (thumb.empty()) return false; it...
@@ -102,35 +99,9 @@ bool CPVRThumbLoader::FillThumb(CFileItem& item) std::string CPVRThumbLoader::CreateChannelGroupThumb(const CFileItem& channelGroupItem) { - const CPVRGUIDirectory channelGroupDir(channelGroupItem.GetPath()); - CFileItemList channels; - if (channelGroupDir.GetChannelsDirectory(channels)) - {...
xbmc/pvr/PVRThumbLoader.cpp
26
C++
0.143
style
92
28
26
false
[guilib][vfs][imagecache][pvr] Load PVR group images into texture cache when viewed, like standard images
24,087
xbmc/xbmc
17,740
C++
ksooo
rmrector
extern "C" { #endif /* __cplusplus */ /*! * @brief API array sizes which are used for data exchange between * Kodi and addon. */ ///@{ #define PVR_ADDON_NAME_STRING_LENGTH 1024 #define PVR_ADDON_URL_STRING_LENGTH 1024 #define PVR_ADDON_DESC_STRING_LENGTH 1024 #define PVR_ADDON_INPUT_FORMAT_STRING_LENGTH 3...
Why these "obscure" numbers? => 64 , 512
extern "C" { #endif /* __cplusplus */ /*! * @brief "C" Representation of a general attribute integer value. */ typedef struct PVR_ATTRIBUTE_INT_VALUE { int iValue; const char* strDescription; } PVR_ATTRIBUTE_INT_VALUE; /*! * @brief "C" Representation of a named value. */ typedef struct...
@@ -39,6 +39,8 @@ extern "C" #define PVR_ADDON_DATE_STRING_LENGTH 32 #define PVR_ADDON_COUNTRIES_STRING_LENGTH 128 #define PVR_ADDON_LANGUAGES_STRING_LENGTH 128 +#define PVR_ADDON_RATING_CODE_LENGTH 65 +#define PVR_ADDON_RATING_ICON_LENGTH 513
xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_defines.h
26
C/C++
0.071
question
40
51
39
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
char strPlot[PVR_ADDON_DESC_STRING_LENGTH]; char strGenreDescription[PVR_ADDON_DESC_STRING_LENGTH]; char strChannelName[PVR_ADDON_NAME_STRING_LENGTH]; char strIconPath[PVR_ADDON_URL_STRING_LENGTH]; char strThumbnailPath[PVR_ADDON_URL_STRING_LENGTH]; char strFanartPath[PVR_ADDON_URL_STRING_LENGTH...
Remark: Maybe we need to revise this later, because for P we want to get rid of fixed size arrays in the (at least for fields carrying URLs), but we have no details for this, as of now.
const char* strPlotOutline; const char* strPlot; const char* strGenreDescription; const char* strChannelName; const char* strIconPath; const char* strThumbnailPath; const char* strFanartPath; time_t recordingTime; int iDuration; int iPriority; int iLifetime; int iGenreTyp...
@@ -139,6 +139,9 @@ extern "C" int64_t sizeInBytes; int iClientProviderUid; char strProviderName[PVR_ADDON_NAME_STRING_LENGTH]; + int iParentalRating; + char strParentalRatingCode[PVR_ADDON_RATING_CODE_LENGTH]; + char strParentalRatingIcon[PVR_ADDON_RATING_ICON_LENGTH];
xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_recordings.h
26
C/C++
0.5
suggestion
185
34
36
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
time_t endTime; bool bStartAnyTime; bool bEndAnyTime; enum PVR_TIMER_STATE state; unsigned int iTimerType; char strTitle[PVR_ADDON_NAME_STRING_LENGTH]; char strEpgSearchString[PVR_ADDON_NAME_STRING_LENGTH]; bool bFullTextEpgSearch; char strDirectory[PVR_ADDON_URL_STRING_LENGTH]; ...
Remark: Maybe we need to revise this later, because for P we want to get rid of fixed size arrays in the (at least for fields carrying URLs), but we have no details for this, as of now.
time_t endTime; bool bStartAnyTime; bool bEndAnyTime; enum PVR_TIMER_STATE state; unsigned int iTimerType; const char* strTitle; const char* strEpgSearchString; bool bFullTextEpgSearch; const char* strDirectory; const char* strSummary; int iPriority; int iLifetime; in...
@@ -365,6 +365,9 @@ extern "C" int iGenreType; int iGenreSubType; char strSeriesLink[PVR_ADDON_URL_STRING_LENGTH]; + int iParentalRating; + char strParentalRatingCode[PVR_ADDON_RATING_CODE_LENGTH]; + char strParentalRatingIcon[PVR_ADDON_RATING_ICON_LENGTH];
xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_timers.h
26
C/C++
0.5
suggestion
185
51
51
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
"sTitle varchar(128), " "sPlotOutline text, " "sPlot text, " "sOriginalTitle varchar(128), " "sCast varchar(255), " "sDirector varchar(255), " "sWriter varchar(255), " "iYear integer, " "sIMD...
In the Addon-API, the array size is 512!
"sPlotOutline text, " "sPlot text, " "sOriginalTitle varchar(128), " "sCast varchar(255), " "sDirector varchar(255), " "sWriter varchar(255), " "iYear integer, " ...
@@ -95,7 +95,8 @@ void CPVREpgDatabase::CreateTables() "sEpisodeName varchar(128), " "iFlags integer, " "sSeriesLink varchar(255), " - "sParentalRatingCode varchar(64)" + "sParentalRatingCode varchar(64)," + "sParentalRatingIcon varchar(255)"
xbmc/pvr/epg/EpgDatabase.cpp
26
C++
0.071
suggestion
40
51
51
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
"sEndDateTime varchar(20), " "bIsCaseSensitive bool, " "iMinimumDuration integer, " "iMaximumDuration integer, " "bIsRadio bool, " "iClientId integer, ...
In the Addon-API, the array size is 512!
"sEndDateTime varchar(20), " "bIsCaseSensitive bool, " "iMinimumDuration integer, " "iMaximumDuration integer, " "bIsRadio bool, " "iClientId integer, ...
@@ -324,6 +325,11 @@ void CPVREpgDatabase::UpdateTables(int iVersion) m_pDS->exec("ALTER TABLE savedsearches ADD iChannelGroup integer;"); m_pDS->exec("UPDATE savedsearches SET iChannelGroup = -1"); } + + if (iVersion < 17) + { + m_pDS->exec("ALTER TABLE epgtags ADD sParentalRatingIcon varchar(255);")...
xbmc/pvr/epg/EpgDatabase.cpp
26
C++
0.071
suggestion
40
51
51
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
strValue = timer->GetStatus(CServiceBroker::GetGUI()->GetWindowManager().GetActiveWindow() == WINDOW_RADIO_TIMER_RULES); return true; case LISTITEM_TIMERTYPE: strValue = timer->GetTypeAsString(); return true; case LISTITEM_CHANNEL_NAME...
Blank after `//`, please. And what kind of compatibility are we talking about here???
case LISTITEM_EPG_EVENT_TITLE: case LISTITEM_EPG_EVENT_ICON: case LISTITEM_GENRE: case LISTITEM_PLOT: case LISTITEM_PLOT_OUTLINE: case LISTITEM_ORIGINALTITLE: case LISTITEM_YEAR: case LISTITEM_SEASON: case LISTITEM_EPISODE: case LISTITEM_EPISODENAME: cas...
@@ -438,6 +438,10 @@ bool CPVRGUIInfo::GetListItemAndPlayerLabel(const CFileItem* item, case LISTITEM_DIRECTOR: case LISTITEM_CHANNEL_NUMBER: case LISTITEM_PREMIERED: + case LISTITEM_PARENTAL_RATING: + case LISTITEM_PARENTAL_RATING_CODE: + case LISTITEM_MPAA: //For compatibility with...
xbmc/pvr/guilib/guiinfo/PVRGUIInfo.cpp
26
C++
0.357
question
88
51
51
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
int m_iPriority; /*!< priority of this recording */ int m_iLifetime; /*!< lifetime of this recording */ std::string m_strDirectory; /*!< directory of this recording on the client */ unsigned int m_iRecordingId; /*!< id that won't change while xbmc is running */ CPVRCachedImage m_iconPath; /*!< icon path */ ...
`int m_ageRating{0};` => coding guidelines Should this be `unsigned int`? Or can there be negative values?
int m_iClientId; /*!< ID of the backend */ std::string m_strRecordingId; /*!< unique ID of the recording on the client */ std::string m_strChannelName; /*!< name of the channel this was recorded from */ int m_iPriority; /*!< priority of this recording */ int m_iLifetime; /*!< lifetime of this recording */ ...
@@ -535,6 +553,9 @@ class CPVRRecording final : public CVideoInfoTag std::string m_strProviderName; /*!< name of the provider this recording is from */ int m_iClientProviderUniqueId = PVR_PROVIDER_INVALID_UID; /*!< provider uid associated with this recording on the client */ + int m_ageRating = 0; /*!< pa...
xbmc/pvr/recordings/PVRRecording.h
26
C/C++
0.714
question
109
33
38
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
char strDirectory[PVR_ADDON_URL_STRING_LENGTH]; char strPlotOutline[PVR_ADDON_DESC_STRING_LENGTH]; char strPlot[PVR_ADDON_DESC_STRING_LENGTH]; char strGenreDescription[PVR_ADDON_DESC_STRING_LENGTH]; char strChannelName[PVR_ADDON_NAME_STRING_LENGTH]; char strIconPath[PVR_ADDON_URL_STRING_LENGTH];...
Should this be `unsigned int`? Or can there be negative values?
int iYear; const char* strDirectory; const char* strPlotOutline; const char* strPlot; const char* strGenreDescription; const char* strChannelName; const char* strIconPath; const char* strThumbnailPath; const char* strFanartPath; time_t recordingTime; int iDuration; int iP...
@@ -139,6 +139,9 @@ extern "C" int64_t sizeInBytes; int iClientProviderUid; char strProviderName[PVR_ADDON_NAME_STRING_LENGTH]; + int iParentalRating;
xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_recordings.h
26
C/C++
0.571
question
63
36
38
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
int iClientChannelUid; time_t startTime; time_t endTime; bool bStartAnyTime; bool bEndAnyTime; enum PVR_TIMER_STATE state; unsigned int iTimerType; char strTitle[PVR_ADDON_NAME_STRING_LENGTH]; char strEpgSearchString[PVR_ADDON_NAME_STRING_LENGTH]; bool bFullTextEpgSearch; cha...
Should this be `unsigned int`? Or can there be negative values?
int iClientChannelUid; time_t startTime; time_t endTime; bool bStartAnyTime; bool bEndAnyTime; enum PVR_TIMER_STATE state; unsigned int iTimerType; const char* strTitle; const char* strEpgSearchString; bool bFullTextEpgSearch; const char* strDirectory; const char* strSumm...
@@ -365,6 +365,9 @@ extern "C" int iGenreType; int iGenreSubType; char strSeriesLink[PVR_ADDON_URL_STRING_LENGTH]; + int iParentalRating;
xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_timers.h
26
C/C++
0.571
question
63
51
51
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
unsigned int m_iMarginEnd; /*!< @brief (optional) if set, the backend ends the recording iMarginEnd minutes after endTime. */ mutable unsigned int m_iEpgUid; /*!< id of epg event associated with this timer, EPG_TAG_INVALID_UID if none. */ std::string m_strSeriesLink; /*!< series link */ CDateTime m...
`unsigned int m_iAgeRating{0};` => coding guidelines BTW: Here you have the type as `unsigned int` already (see my other comments).
int m_iMaxRecordings = 0; /*!< @brief (optional) backend setting for maximum number of recordings to keep*/ unsigned int m_iWeekdays; /*!< @brief bit based store of weekdays for timer rules */ unsigned int m_iPreventDupEpisodes; /*!< @brief only record new episodes for epg-based timer rules */ unsig...
@@ -640,5 +658,10 @@ class CPVRTimerInfoTag final : public ISerializable mutable std::shared_ptr<CPVRChannel> m_channel; mutable bool m_bProbedEpgTag = false; + + unsigned int m_iAgeRating = 0; /*!< @brief age rating of the EPG entry used to create this timer */
xbmc/pvr/timers/PVRTimerInfoTag.h
26
C/C++
0.786
suggestion
134
32
39
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
m_title(epg.m_title), m_plotOutline(epg.m_plotOutline), m_plot(epg.m_plot), m_originalTitle(epg.m_originalTitle), m_cast(epg.m_cast), m_director(epg.m_director), m_writer(epg.m_writer), m_IMDBNumber(epg.m_IMDBNumber), m_episodeName(epg.m_episodeName), m_iconPa...
Change from int to std::string here is a documentation fix? The existing implementation is taking/returning a string, right? It would be better to make this kind of fixes in a separate commit, so it can easily be identified by reviewers.
/// @defgroup cpp_kodi_addon_pvr_Defs_epg_PVREPGTag_Help Value Help /// @ingroup cpp_kodi_addon_pvr_Defs_epg_PVREPGTag /// /// <b>The following table contains values that can be set with @ref cpp_kodi_addon_pvr_Defs_epg_PVREPGTag :</b> /// | Name | Type | Set call | Get call | Usage /// |------|------|-----...
@@ -94,7 +95,8 @@ class PVREPGTag : public CStructHdl<PVREPGTag, EPG_TAG> /// | **Genre description** | `std::string` | @ref PVREPGTag::SetGenreDescription "SetGenreDescription" | @ref PVREPGTag::GetGenreDescription "GetGenreDescription" | *optional* /// | **First aired** | `time_t` | @ref PVREPGTag::SetFirstAire...
xbmc/addons/kodi-dev-kit/include/kodi/addon-instance/pvr/EPG.h
26
C/C++
0.571
suggestion
238
51
51
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
/// This event's parental rating icon. void SetParentalRatingIcon(const std::string& parentalRatingIcon) { m_parentalRatingIcon = parentalRatingIcon; } /// @brief To get with @ref SetParentalRatingIcon changed values. std::string GetParentalRatingIcon() const { return m_parentalRatingIcon; } /// @br...
Same here. A documentation fix that belongs into a separate commit.
} /// @brief **optional**\n /// First aired in UTC. void SetFirstAired(const std::string& firstAired) { ReallocAndCopyString(&m_cStructure->strFirstAired, firstAired.c_str()); } /// @brief To get with @ref SetFirstAired changed values. std::string GetFirstAired() const { return m_cStructure-...
@@ -330,10 +332,10 @@ class PVREPGTag : public CStructHdl<PVREPGTag, EPG_TAG> /// Parental rating. void SetParentalRating(int parentalRating) { m_cStructure->iParentalRating = parentalRating; } - /// @brief To get with @ref SetParentalRatinge changed values. + /// @brief To get with @ref SetParentalRating cha...
xbmc/addons/kodi-dev-kit/include/kodi/addon-instance/pvr/EPG.h
26
C/C++
0.143
suggestion
67
51
51
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
std::string GetParentalRatingCode() const { return m_parentalRatingCode; } /// @brief **optional**\n /// This event's parental rating icon. void SetParentalRatingIcon(const std::string& parentalRatingIcon) { m_parentalRatingIcon = parentalRatingIcon; } /// @brief To get with @ref SetParentalRatingIc...
Same here. A documentation fix that belongs into a separate commit.
std::string GetGenreDescription() const { return m_cStructure->strGenreDescription ? m_cStructure->strGenreDescription : ""; } /// @brief **optional**\n /// First aired in UTC. void SetFirstAired(const std::string& firstAired) { ReallocAndCopyString(&m_cStructure->strFirstAired, firstAired.c_str(...
@@ -330,10 +332,10 @@ class PVREPGTag : public CStructHdl<PVREPGTag, EPG_TAG> /// Parental rating. void SetParentalRating(int parentalRating) { m_cStructure->iParentalRating = parentalRating; } - /// @brief To get with @ref SetParentalRatinge changed values. + /// @brief To get with @ref SetParentalRating cha...
xbmc/addons/kodi-dev-kit/include/kodi/addon-instance/pvr/EPG.h
26
C/C++
0.143
suggestion
67
51
51
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
/// @brief To get with @ref SetClientProviderUid changed values int GetClientProviderUid() const { return m_cStructure->iClientProviderUid; } /// @brief **optional**\n /// Name for the provider of this channel. void SetProviderName(const std::string& providerName) { strncpy(m_cStructure->strProviderNa...
Commit message only talks about introduction of parental rating icon. Actually this commit contains much more changes, like introduction of more functionality for recordings. The latter should be a separate commit of this PR.
/// Bit field of independent flags associated with the recording. /// /// See @ref cpp_kodi_addon_pvr_Defs_Recording_PVR_RECORDING_FLAG for /// available bit flags. /// /// -------------------------------------------------------------------------- /// /// @copydetails cpp_kodi_addon_pvr_Defs_Recording_P...
@@ -492,6 +496,35 @@ class PVRRecording : public CStructHdl<PVRRecording, PVR_RECORDING> /// @brief To get with @ref SetProviderName changed values. std::string GetProviderName() const { return m_cStructure->strProviderName; } + /// @brief **optional**\n + /// Age rating for the recording. + void SetParental...
xbmc/addons/kodi-dev-kit/include/kodi/addon-instance/pvr/Recordings.h
26
C/C++
0.571
suggestion
226
51
51
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
void SetSeriesLink(const std::string& seriesLink) { strncpy(m_cStructure->strSeriesLink, seriesLink.c_str(), sizeof(m_cStructure->strSeriesLink) - 1); } /// @brief To get with @ref SetSeriesLink changed values. std::string GetSeriesLink() const { return m_cStructure->strSeriesLink; } /// @...
Commit message only talks about introduction of parental rating icon. Actually this commit contains much more changes, like introduction of more functionality for timers. The latter should be a separate commit of this PR.
} ///@} static void AllocResources(const PVR_TIMER* source, PVR_TIMER* target) { target->strTitle = AllocAndCopyString(source->strTitle); target->strEpgSearchString = AllocAndCopyString(source->strEpgSearchString); target->strDirectory = AllocAndCopyString(source->strDirectory); target->strSumm...
@@ -464,6 +468,35 @@ class PVRTimer : public CStructHdl<PVRTimer, PVR_TIMER> /// @brief To get with @ref SetSeriesLink changed values. std::string GetSeriesLink() const { return m_cStructure->strSeriesLink; } + + /// @brief **optional**\n + /// Parental age rating + void SetParentalRating(int parentalRating)...
xbmc/addons/kodi-dev-kit/include/kodi/addon-instance/pvr/Timers.h
26
C/C++
0.571
suggestion
221
51
51
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
return true; } return false; case LISTITEM_TITLE: strValue = timer->Title(); return true; case LISTITEM_COMMENT: strValue = timer->GetStatus(CServiceBroker::GetGUI()->GetWindowManager().GetActiveWindow() == WINDOW_RAD...
As you introduced separate new fields in PVR_TIMER in the PVR add-on API for these values, it makes no sense to obtain them from the timer's channel/epg tag. Either you keep this implementation and remove the new fields in PVR_TIMER or you change the implementation here to actually use the new fields. I'd prefer keepin...
return true; case LISTITEM_PVR_CLIENT_NAME: strValue = CServiceBroker::GetPVRManager().GetClient(timer->ClientID())->GetClientName(); return true; case LISTITEM_PVR_INSTANCE_NAME: strValue = CServiceBroker::GetPVRManager().GetClient(timer->ClientID())->GetInstanceName(); ...
@@ -447,6 +447,10 @@ bool CPVRGUIInfo::GetListItemAndPlayerLabel(const CFileItem* item, case LISTITEM_DIRECTOR: case LISTITEM_CHANNEL_NUMBER: case LISTITEM_PREMIERED: + case LISTITEM_PARENTAL_RATING: + case LISTITEM_PARENTAL_RATING_CODE: + case LISTITEM_MPAA: // For compatibility wit...
xbmc/pvr/guilib/guiinfo/PVRGUIInfo.cpp
26
C++
0.643
suggestion
372
51
51
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
/// /// <b>The following table contains values that can be set with @ref cpp_kodi_addon_pvr_Defs_epg_PVREPGTag :</b> /// | Name | Type | Set call | Get call | Usage /// |------|------|----------|----------|--------- /// | **Unique broadcast id** | `unsigned int` | @ref PVREPGTag::SetUniqueBroadcastId "SetUniq...
PVREPGTag::SetParentalSource -> PVREPGTag::SetParentalRatingSource
/// | **Genre description** | `std::string` | @ref PVREPGTag::SetGenreDescription "SetGenreDescription" | @ref PVREPGTag::GetGenreDescription "GetGenreDescription" | *optional* /// | **First aired** | `time_t` | @ref PVREPGTag::SetFirstAired "SetFirstAired" | @ref PVREPGTag::GetFirstAired "GetFirstAired" | *optiona...
@@ -93,8 +95,10 @@ class PVREPGTag : public CStructHdl<PVREPGTag, EPG_TAG> /// | **Genre sub type** | `int` | @ref PVREPGTag::SetGenreSubType "SetGenreSubType" | @ref PVREPGTag::GetGenreSubType "GetGenreSubType" | *optional* /// | **Genre description** | `std::string` | @ref PVREPGTag::SetGenreDescription "SetGen...
xbmc/addons/kodi-dev-kit/include/kodi/addon-instance/pvr/EPG.h
26
C/C++
0.143
suggestion
66
51
51
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
/// \table_row3{ <b>`ListItem.ParentalRating`</b>, /// \anchor ListItem_ParentalRating /// _string_, /// @return The parental rating of the list item (PVR). /// <p> /// } /// \table_row3{ <b>`ListItem.ParentalRatingCode`</b>, /// \anchor ListItem_Pare...
=> "The source used to determine the parental rating of the list item (PVR)."
/// \table_row3{ <b>`ListItem.ParentalRating`</b>, /// \anchor ListItem_ParentalRating /// _string_, /// @return The parental rating of the list item (PVR). /// <p> /// } /// \table_row3{ <b>`ListItem.ParentalRatingCode`</b>, /// \anchor ListItem_Pare...
@@ -6794,6 +6794,25 @@ const infomap container_str[] = {{ "property", CONTAINER_PROPERTY }, /// @skinning_v21 **[New Infolabel]** \link ListItem_ParentalRatingCode `ListItem.ParentalRatingCode`\endlink /// <p> /// } +/// \table_row3{ <b>`ListItem.ParentalRatingIcon`</b>, +/// ...
xbmc/GUIInfoManager.cpp
26
C++
0.357
suggestion
77
51
51
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
{ m_cStructure->iParentalRating = parentalRating; } /// @brief To get with @ref SetParentalRating changed values. unsigned int GetParentalRating() const { return m_cStructure->iParentalRating; } /// @brief **optional**\n /// This event's parental rating code. void SetParentalRatingCode(const std::st...
=> "The source used to determine the event's parental rating."
/// tag.SetGenreType(EPG_GENRE_USE_STRING); /// tag.SetGenreDescription("Action" + EPG_STRING_TOKEN_SEPARATOR + "Thriller"); /// ~~~~~~~~~~~~~ /// void SetGenreDescription(const std::string& genreDescription) { ReallocAndCopyString(&m_cStructure->strGenreDescription, genreDescription.c_str()); } //...
@@ -343,6 +350,26 @@ class PVREPGTag : public CStructHdl<PVREPGTag, EPG_TAG> /// @brief To get with @ref SetParentalRatingCode changed values. std::string GetParentalRatingCode() const { return m_parentalRatingCode; } + /// @brief **optional**\n + /// This event's parental rating icon. + void SetParentalRati...
xbmc/addons/kodi-dev-kit/include/kodi/addon-instance/pvr/EPG.h
26
C/C++
0.357
suggestion
62
51
51
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
unsigned int GetParentalRating() const { return m_cStructure->iParentalRating; } /// @brief **optional**\n /// Parental rating code for this recording. void SetParentalRatingCode(const std::string& ratingCode) { strncpy(m_cStructure->strParentalRatingCode, ratingCode.c_str(), sizeof(m_cStruct...
=> The source used to determine the recording's parental rating. Please also note change from event's to recording's.
/// /// @ref PVR_PROVIDER_INVALID_UID denotes that provider uid is not available. void SetClientProviderUid(int iClientProviderUid) { m_cStructure->iClientProviderUid = iClientProviderUid; } /// @brief To get with @ref SetClientProviderUid changed values int GetClientProviderUid() const { return m_cS...
@@ -492,6 +497,49 @@ class PVRRecording : public CStructHdl<PVRRecording, PVR_RECORDING> /// @brief To get with @ref SetProviderName changed values. std::string GetProviderName() const { return m_cStructure->strProviderName; } + /// @brief **optional**\n + /// Age rating for the recording. + void SetParental...
xbmc/addons/kodi-dev-kit/include/kodi/addon-instance/pvr/Recordings.h
26
C/C++
0.5
suggestion
120
51
51
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
* @brief Get the first air date of this event. * @return The first air date. */ CDateTime FirstAired() const; /*! * @brief Get the parental rating of this event. * @return The parental rating. */ unsigned int ParentalRating() const; /*! * @brief Get the parental rating code of this event....
=> "Source used to determine the parental rating."
*/ const std::vector<std::string> Genre() const; /*! * @brief Get the first air date of this event. * @return The first air date. */ CDateTime FirstAired() const; /*! * @brief Get the parental rating of this event. * @return The parental rating. */ unsigned int ParentalRating() const; ...
@@ -297,14 +297,25 @@ class CPVREpgInfoTag final : public ISerializable, * @brief Get the parental rating of this event. * @return The parental rating. */ - int ParentalRating() const; + unsigned int ParentalRating() const; /*! * @brief Get the parental rating code of this event. * @return Th...
xbmc/pvr/epg/EpgInfoTag.h
26
C/C++
0.357
suggestion
50
51
51
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
/// @return The video rotation of the list item representing a /// gamewindow control (RETROPLAYER). /// See \link RetroPlayer_VideoRotation RetroPlayer.VideoRotation \endlink /// for the possible values. /// <p><hr> /// @skinning_v18 **[New Infolabel]** \link ListItem_Property_Game_VideoRotatio...
=> "The parental rating icon path of the list item (PVR)."
/// @return The video rotation of the list item representing a /// gamewindow control (RETROPLAYER). /// See \link RetroPlayer_VideoRotation RetroPlayer.VideoRotation \endlink /// for the possible values. /// <p><hr> /// @skinning_v18 **[New Infolabel]** \link ListItem_Property_Game_VideoRotatio...
@@ -6794,6 +6794,25 @@ const infomap container_str[] = {{ "property", CONTAINER_PROPERTY }, /// @skinning_v21 **[New Infolabel]** \link ListItem_ParentalRatingCode `ListItem.ParentalRatingCode`\endlink /// <p> /// } +/// \table_row3{ <b>`ListItem.ParentalRatingIcon`</b>, +/// ...
xbmc/GUIInfoManager.cpp
26
C++
0.143
suggestion
58
51
51
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
/// @brief To get with @ref SetProviderName changed values. std::string GetProviderName() const { return m_cStructure->strProviderName; } /// @brief **optional**\n /// Age rating for the recording. void SetParentalRating(unsigned int iParentalRating) { m_cStructure->iParentalRating = iParentalRating; ...
=> "Parental rating icon path for this recording."
/// @brief **optional**\n /// Size of the recording in bytes. void SetSizeInBytes(int64_t sizeInBytes) { m_cStructure->sizeInBytes = sizeInBytes; } /// @brief To get with @ref SetSizeInBytes changed values. int64_t GetSizeInBytes() const { return m_cStructure->sizeInBytes; } ///@} /// @brief **optional...
@@ -492,6 +497,49 @@ class PVRRecording : public CStructHdl<PVRRecording, PVR_RECORDING> /// @brief To get with @ref SetProviderName changed values. std::string GetProviderName() const { return m_cStructure->strProviderName; } + /// @brief **optional**\n + /// Age rating for the recording. + void SetParental...
xbmc/addons/kodi-dev-kit/include/kodi/addon-instance/pvr/Recordings.h
26
C/C++
0.143
suggestion
50
51
51
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
/*! * @brief Get the genre as human readable string. * @return The genre. */ const std::vector<std::string> Genre() const; /*! * @brief Get the first air date of this event. * @return The first air date. */ CDateTime FirstAired() const; /*! * @brief Get the parental rating of this event...
=> "Get the parental rating icon path of this event."
* @return The genre. */ const std::string& GenreDescription() const { return m_strGenreDescription; } /*! * @brief Get the genre as human readable string. * @return The genre. */ const std::vector<std::string> Genre() const; /*! * @brief Get the first air date of this event. * @return The...
@@ -297,14 +297,25 @@ class CPVREpgInfoTag final : public ISerializable, * @brief Get the parental rating of this event. * @return The parental rating. */ - int ParentalRating() const; + unsigned int ParentalRating() const; /*! * @brief Get the parental rating code of this event. * @return Th...
xbmc/pvr/epg/EpgInfoTag.h
26
C/C++
0.143
suggestion
53
51
51
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
* separator. * @param tokens The tokens. * @return the combined string. */ static const std::string DeTokenize(const std::vector<std::string>& tokens); private: CPVREpgInfoTag(int iEpgID, const std::string& iconPath); CPVREpgInfoTag() = delete; CPVREpgInfoTag(const CPVREpgInfoTag& tag) = delete; ...
=> "parental rating icon path"
static const std::vector<std::string> Tokenize(const std::string& str); /*! * @brief Combine the given strings to a single string. Inserts EPG_STRING_TOKEN_SEPARATOR as * separator. * @param tokens The tokens. * @return the combined string. */ static const std::string DeTokenize(const std::vector<...
@@ -480,8 +491,10 @@ class CPVREpgInfoTag final : public ISerializable, int m_iGenreType = 0; /*!< genre type */ int m_iGenreSubType = 0; /*!< genre subtype */ std::string m_strGenreDescription; /*!< genre description */ - int m_iParentalRating = 0; /*!< parental rating */ - std::string m_strParentalRatingCo...
xbmc/pvr/epg/EpgInfoTag.h
26
C/C++
0.071
suggestion
30
51
51
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
* @return True if a provider was set by the client, false otherwise. */ bool HasClientProvider() const; /*! * @brief Get the provider of this recording. This may be the default provider or a * custom provider set by the client. If @ref "HasClientProvider()" returns true * the provider ...
=> "Get the parental rating icon path of this recording."
bool HasClientProvider() const; /*! * @brief Get the provider of this recording. This may be the default provider or a * custom provider set by the client. If @ref "HasClientProvider()" returns true * the provider will be custom from the client, otherwise the default provider. * @return T...
@@ -501,6 +501,30 @@ class CPVRRecording final : public CVideoInfoTag */ std::shared_ptr<CPVRProvider> GetProvider() const; + /*! + * @brief Get the parental rating of this recording. + * @return The parental rating. + */ + unsigned int GetParentalRating() const; + + /*! + * @brief Get the parental ...
xbmc/pvr/recordings/PVRRecording.h
26
C/C++
0.143
suggestion
57
51
51
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
*/ bool HasClientProvider() const; /*! * @brief Get the provider of this recording. This may be the default provider or a * custom provider set by the client. If @ref "HasClientProvider()" returns true * the provider will be custom from the client, otherwise the default provider. * @re...
=> "The parental rating icon path."
/*! * @brief Get the provider of this recording. This may be the default provider or a * custom provider set by the client. If @ref "HasClientProvider()" returns true * the provider will be custom from the client, otherwise the default provider. * @return The provider of this recording *...
@@ -501,6 +501,30 @@ class CPVRRecording final : public CVideoInfoTag */ std::shared_ptr<CPVRProvider> GetProvider() const; + /*! + * @brief Get the parental rating of this recording. + * @return The parental rating. + */ + unsigned int GetParentalRating() const; + + /*! + * @brief Get the parental ...
xbmc/pvr/recordings/PVRRecording.h
26
C/C++
0.071
suggestion
35
51
51
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
std::string m_strDirectory; /*!< directory of this recording on the client */ unsigned int m_iRecordingId; /*!< id that won't change while xbmc is running */ CPVRCachedImage m_iconPath; /*!< icon path */ CPVRCachedImage m_thumbnailPath; /*!< thumbnail path */ CPVRCachedImage m_fanartPath; /*!< fanart path */...
=> "parental rating icon path"
CPVRCachedImage m_iconPath; /*!< icon path */ CPVRCachedImage m_thumbnailPath; /*!< thumbnail path */ CPVRCachedImage m_fanartPath; /*!< fanart path */ CDateTime m_recordingTime; /*!< start time of the recording */ bool m_bGotMetaData; bool m_bIsDeleted; /*!< set if entry is a deleted recording which can b...
@@ -535,6 +559,10 @@ class CPVRRecording final : public CVideoInfoTag std::string m_strProviderName; /*!< name of the provider this recording is from */ int m_iClientProviderUniqueId = PVR_PROVIDER_INVALID_UID; /*!< provider uid associated with this recording on the client */ + unsigned int m_parentalRati...
xbmc/pvr/recordings/PVRRecording.h
26
C/C++
0.071
suggestion
30
32
30
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
* the provider will be custom from the client, otherwise the default provider. * @return The provider of this recording */ std::shared_ptr<CPVRProvider> GetProvider() const; /*! * @brief Get the parental rating of this recording. * @return The parental rating. */ unsigned int GetParental...
=> "The parental rating source."
*/ std::shared_ptr<CPVRProvider> GetProvider() const; /*! * @brief Get the parental rating of this recording. * @return The parental rating. */ unsigned int GetParentalRating() const; /*! * @brief Get the parental rating code of this recording. * @return The parental rating code. */ con...
@@ -501,6 +501,30 @@ class CPVRRecording final : public CVideoInfoTag */ std::shared_ptr<CPVRProvider> GetProvider() const; + /*! + * @brief Get the parental rating of this recording. + * @return The parental rating. + */ + unsigned int GetParentalRating() const; + + /*! + * @brief Get the parental ...
xbmc/pvr/recordings/PVRRecording.h
26
C/C++
0.071
suggestion
32
51
51
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
/// } /// \table_row3{ <b>`ListItem.ParentalRatingCode`</b>, /// \anchor ListItem_ParentalRatingCode /// _string_, /// @return The parental rating code (eg: 'PG'\, etc) of the list item (PVR). /// <p><hr> /// @skinning_v21 **[New Infolabel]** \link ListItem_ParentalRa...
ListItem_ParentalRatingIcon => ListItem_ParentalRatingSource
/// } /// \table_row3{ <b>`ListItem.ParentalRatingCode`</b>, /// \anchor ListItem_ParentalRatingCode /// _string_, /// @return The parental rating code (eg: 'PG'\, etc) of the list item (PVR). /// <p><hr> /// @skinning_v21 **[New Infolabel]** \link ListItem_ParentalRa...
@@ -6794,6 +6794,25 @@ const infomap container_str[] = {{ "property", CONTAINER_PROPERTY }, /// @skinning_v21 **[New Infolabel]** \link ListItem_ParentalRatingCode `ListItem.ParentalRatingCode`\endlink /// <p> /// } +/// \table_row3{ <b>`ListItem.ParentalRatingIcon`</b>, +/// ...
xbmc/GUIInfoManager.cpp
26
C++
0.143
suggestion
60
51
51
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
{ m_cStructure->iParentalRating = parentalRating; } /// @brief To get with @ref SetParentalRating changed values. unsigned int GetParentalRating() const { return m_cStructure->iParentalRating; } /// @brief **optional**\n /// This event's parental rating code. void SetParentalRatingCode(const std::st...
=> "The event's parental rating source."
/// tag.SetGenreType(EPG_GENRE_USE_STRING); /// tag.SetGenreDescription("Action" + EPG_STRING_TOKEN_SEPARATOR + "Thriller"); /// ~~~~~~~~~~~~~ /// void SetGenreDescription(const std::string& genreDescription) { ReallocAndCopyString(&m_cStructure->strGenreDescription, genreDescription.c_str()); } //...
@@ -343,6 +350,26 @@ class PVREPGTag : public CStructHdl<PVREPGTag, EPG_TAG> /// @brief To get with @ref SetParentalRatingCode changed values. std::string GetParentalRatingCode() const { return m_parentalRatingCode; } + /// @brief **optional**\n + /// This event's parental rating icon. + void SetParentalRati...
xbmc/addons/kodi-dev-kit/include/kodi/addon-instance/pvr/EPG.h
26
C/C++
0.071
suggestion
40
51
51
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
unsigned int GetParentalRating() const { return m_cStructure->iParentalRating; } /// @brief **optional**\n /// Parental rating code for this recording. void SetParentalRatingCode(const std::string& ratingCode) { strncpy(m_cStructure->strParentalRatingCode, ratingCode.c_str(), sizeof(m_cStruct...
=> "Parental rating source for this recording."
/// /// @ref PVR_PROVIDER_INVALID_UID denotes that provider uid is not available. void SetClientProviderUid(int iClientProviderUid) { m_cStructure->iClientProviderUid = iClientProviderUid; } /// @brief To get with @ref SetClientProviderUid changed values int GetClientProviderUid() const { return m_cS...
@@ -492,6 +497,49 @@ class PVRRecording : public CStructHdl<PVRRecording, PVR_RECORDING> /// @brief To get with @ref SetProviderName changed values. std::string GetProviderName() const { return m_cStructure->strProviderName; } + /// @brief **optional**\n + /// Age rating for the recording. + void SetParental...
xbmc/addons/kodi-dev-kit/include/kodi/addon-instance/pvr/Recordings.h
26
C/C++
0.071
suggestion
47
51
51
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
/*! * @brief Get the genre as human readable string. * @return The genre. */ const std::vector<std::string> Genre() const; /*! * @brief Get the first air date of this event. * @return The first air date. */ CDateTime FirstAired() const; /*! * @brief Get the parental rating of this event...
=> "Get the parental rating icon path of this event."
* @return The genre. */ const std::string& GenreDescription() const { return m_strGenreDescription; } /*! * @brief Get the genre as human readable string. * @return The genre. */ const std::vector<std::string> Genre() const; /*! * @brief Get the first air date of this event. * @return The...
@@ -297,14 +297,25 @@ class CPVREpgInfoTag final : public ISerializable, * @brief Get the parental rating of this event. * @return The parental rating. */ - int ParentalRating() const; + unsigned int ParentalRating() const; /*! * @brief Get the parental rating code of this event. * @return Th...
xbmc/pvr/epg/EpgInfoTag.h
26
C/C++
0.143
suggestion
55
51
51
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
/// @brief To get with @ref SetProviderName changed values. std::string GetProviderName() const { return m_cStructure->strProviderName; } /// @brief **optional**\n /// Age rating for the recording. void SetParentalRating(unsigned int iParentalRating) { m_cStructure->iParentalRating = iParentalRating; ...
=> "Parental rating icon path for this recording."
/// @brief **optional**\n /// Size of the recording in bytes. void SetSizeInBytes(int64_t sizeInBytes) { m_cStructure->sizeInBytes = sizeInBytes; } /// @brief To get with @ref SetSizeInBytes changed values. int64_t GetSizeInBytes() const { return m_cStructure->sizeInBytes; } ///@} /// @brief **optional...
@@ -492,6 +497,49 @@ class PVRRecording : public CStructHdl<PVRRecording, PVR_RECORDING> /// @brief To get with @ref SetProviderName changed values. std::string GetProviderName() const { return m_cStructure->strProviderName; } + /// @brief **optional**\n + /// Age rating for the recording. + void SetParental...
xbmc/addons/kodi-dev-kit/include/kodi/addon-instance/pvr/Recordings.h
26
C/C++
0.143
suggestion
50
51
51
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
* @brief Get the first air date of this event. * @return The first air date. */ CDateTime FirstAired() const; /*! * @brief Get the parental rating of this event. * @return The parental rating. */ unsigned int ParentalRating() const; /*! * @brief Get the parental rating code of this event....
=> "The parental rating source."
*/ const std::vector<std::string> Genre() const; /*! * @brief Get the first air date of this event. * @return The first air date. */ CDateTime FirstAired() const; /*! * @brief Get the parental rating of this event. * @return The parental rating. */ unsigned int ParentalRating() const; ...
@@ -297,14 +297,25 @@ class CPVREpgInfoTag final : public ISerializable, * @brief Get the parental rating of this event. * @return The parental rating. */ - int ParentalRating() const; + unsigned int ParentalRating() const; /*! * @brief Get the parental rating code of this event. * @return Th...
xbmc/pvr/epg/EpgInfoTag.h
26
C/C++
0.071
suggestion
32
51
51
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
/// /// @copydetails cpp_kodi_addon_pvr_Defs_Recording_PVRRecording_Help /// ///@{ class PVRRecording : public DynamicCStructHdl<PVRRecording, PVR_RECORDING> { friend class CInstancePVRClient; public: /*! \cond PRIVATE */ PVRRecording() { m_cStructure->iSeriesNumber = PVR_RECORDING_INVALID_SERIES_EPISODE; ...
This can be omitted, as the struct is always initialized with zeros.
/// /// @copydetails cpp_kodi_addon_pvr_Defs_Recording_PVRRecording_Help /// ///@{ class PVRRecording : public DynamicCStructHdl<PVRRecording, PVR_RECORDING> { friend class CInstancePVRClient; public: /*! \cond PRIVATE */ PVRRecording() { m_cStructure->iSeriesNumber = PVR_RECORDING_INVALID_SERIES_EPISODE; ...
@@ -56,6 +56,7 @@ class PVRRecording : public DynamicCStructHdl<PVRRecording, PVR_RECORDING> m_cStructure->iChannelUid = PVR_RECORDING_VALUE_NOT_AVAILABLE; m_cStructure->channelType = PVR_RECORDING_CHANNEL_TYPE_UNKNOWN; m_cStructure->sizeInBytes = PVR_RECORDING_VALUE_NOT_AVAILABLE; + m_cStructure->iPa...
xbmc/addons/kodi-dev-kit/include/kodi/addon-instance/pvr/Recordings.h
26
C/C++
0.143
suggestion
68
51
51
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
"bIncludeUnknownGenres bool, " "bRemoveDuplicates bool, " "bIgnoreFinishedBroadcasts bool, " "bIgnoreFutureBroadcasts bool, " "bFreeToAirOnly bool, " "bIgnorePresentTimers bool, " ...
This is wrong. You need to bump epg database version to 18. The code that inserts the two new columns MUST be executed in a block `if (iVersion < 18)`.
"bIncludeUnknownGenres bool, " "bRemoveDuplicates bool, " "bIgnoreFinishedBroadcasts bool, " "bIgnoreFutureBroadcasts bool, " "bFreeToAirOnly bool, " "bIgnorePresentTimers bool, " ...
@@ -330,6 +330,8 @@ void CPVREpgDatabase::UpdateTables(int iVersion) { m_pDS->exec("ALTER TABLE savedsearches ADD sIconPath varchar(255);"); m_pDS->exec("UPDATE savedsearches SET sIconPath = ''"); + m_pDS->exec("ALTER TABLE epgtags ADD sParentalRatingIcon varchar(512);"); + m_pDS->exec("ALTER TABLE e...
xbmc/pvr/epg/EpgDatabase.cpp
26
C++
0.5
bug
151
51
51
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
*/ CDateTime FirstAired() const; /*! * @brief Get the parental rating of this event. * @return The parental rating. */ unsigned int ParentalRating() const; /*! * @brief Get the parental rating code of this event. * @return The parental rating code. */ const std::string& ParentalRatingCo...
Change these two methods to be inline, like `ParentalRationCode()`.
*/ CDateTime FirstAired() const; /*! * @brief Get the parental rating of this event. * @return The parental rating. */ unsigned int ParentalRating() const; /*! * @brief Get the parental rating code of this event. * @return The parental rating code. */ const std::string& ParentalRatingCo...
@@ -301,14 +301,25 @@ class CPVREpgInfoTag final : public ISerializable, * @brief Get the parental rating of this event. * @return The parental rating. */ - int ParentalRating() const; + unsigned int ParentalRating() const; /*! * @brief Get the parental rating code of this event. * @return Th...
xbmc/pvr/epg/EpgInfoTag.h
26
C/C++
0.571
suggestion
67
51
51
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
case LISTITEM_CHANNEL_LOGO: strValue = timer->ChannelIcon(); return true; case LISTITEM_PVR_CLIENT_NAME: strValue = CServiceBroker::GetPVRManager().GetClient(timer->ClientID())->GetClientName(); return true; case LISTITEM_PVR_INSTANCE_NAME: strValue = CServiceBr...
Not sure about MPAA, tbh. Why is it here?
case LISTITEM_CHANNEL_LOGO: strValue = timer->ChannelIcon(); return true; case LISTITEM_PVR_CLIENT_NAME: strValue = CServiceBroker::GetPVRManager().GetClient(timer->ClientID())->GetClientName(); return true; case LISTITEM_PVR_INSTANCE_NAME: strValue = CServiceBr...
@@ -428,6 +428,12 @@ bool CPVRGUIInfo::GetListItemAndPlayerLabel(const CFileItem* item, case LISTITEM_DIRECTOR: case LISTITEM_CHANNEL_NUMBER: case LISTITEM_PREMIERED: + case VIDEOPLAYER_PARENTAL_RATING: + case LISTITEM_PARENTAL_RATING: + case LISTITEM_PARENTAL_RATING_CODE: + cas...
xbmc/pvr/guilib/guiinfo/PVRGUIInfo.cpp
26
C++
0.071
question
41
51
51
false
[PVR][addons][guilib] Add support for PVR client add-ons supplying Parental Rating Icons, extend Rating support for Recordings
24,096
xbmc/xbmc
17,740
C++
ksooo
DeltaMikeCharlie
{ return m_fileSize; } void CFileCache::StopThread(bool bWait /*= true*/) { m_bStop = true; //Process could be waiting for seekEvent m_seekEvent.Set(); CThread::StopThread(bWait); } const std::string CFileCache::GetProperty(XFILE::FileProperty type, const std::string &name) const { if (!m_source.GetImplem...
Perhaps make this: status->maxforward = m_forwardCacheSize ? m_forwardCacheSize : m_fileSize; ? This allows cache level calculation when disk-cache is used.
{ return m_fileSize; } void CFileCache::StopThread(bool bWait /*= true*/) { m_bStop = true; //Process could be waiting for seekEvent m_seekEvent.Set(); CThread::StopThread(bWait); } const std::string CFileCache::GetProperty(XFILE::FileProperty type, const std::string &name) const { if (!m_source.GetImplem...
@@ -605,6 +605,7 @@ int CFileCache::IoControl(EIoControl request, void* param) if (request == IOCTRL_CACHE_STATUS) { SCacheStatus* status = (SCacheStatus*)param; + status->maxforward = m_forwardCacheSize;
xbmc/filesystem/FileCache.cpp
26
C++
0.5
performance
156
46
47
false
[VideoPlayer] Fix cache level calculation and add to Debug Info OSD
24,117
xbmc/xbmc
17,740
C++
arnova
thexai
if (length <= 0 || remain < 0) return info; double queueTime = GetQueueTime(); double play_sbp = DVD_MSEC_TO_TIME(m_pDemuxer->GetStreamLength()) / length; double queued = 1000.0 * queueTime / play_sbp; info.delay = 0.0; info.level = 0.0; info.offset = (cached + queued) / length; info.time = 0.0; ...
cacheLevel pls according to code guidelines
if (length <= 0 || remain < 0) return info; double queueTime = GetQueueTime(); double play_sbp = DVD_MSEC_TO_TIME(m_pDemuxer->GetStreamLength()) / length; double queued = 1000.0 * queueTime / play_sbp; info.delay = 0.0; info.level = 0.0; info.offset = (cached + queued) / length; info.time = 0.0; ...
@@ -1836,6 +1837,9 @@ CacheInfo CVideoPlayer::GetCachingTimes() // estimated playback time of current cached bytes double cache_time = (static_cast<double>(cached) / currate) + (queueTime / 1000.0); + // cache level as current forward bytes / max forward bytes [0.0 - 1.0] + double cache_level = (maxforward > ...
xbmc/cores/VideoPlayer/VideoPlayer.cpp
26
C++
0.071
performance
43
51
51
false
[VideoPlayer] Fix cache level calculation and add to Debug Info OSD
24,117
xbmc/xbmc
17,740
C++
enen92
thexai
return m_fileSize; } void CFileCache::StopThread(bool bWait /*= true*/) { m_bStop = true; //Process could be waiting for seekEvent m_seekEvent.Set(); CThread::StopThread(bWait); } const std::string CFileCache::GetProperty(XFILE::FileProperty type, const std::string &name) const { if (!m_source.GetImplemen...
```suggestion (m_forwardCacheSize != 0) ? m_forwardCacheSize : static_cast<uint64_t>(m_fileSize); ```
return m_fileSize; } void CFileCache::StopThread(bool bWait /*= true*/) { m_bStop = true; //Process could be waiting for seekEvent m_seekEvent.Set(); CThread::StopThread(bWait); } const std::string CFileCache::GetProperty(XFILE::FileProperty type, const std::string &name) const { if (!m_source.GetImplemen...
@@ -605,6 +605,8 @@ int CFileCache::IoControl(EIoControl request, void* param) if (request == IOCTRL_CACHE_STATUS) { SCacheStatus* status = (SCacheStatus*)param; + status->maxforward = + (m_forwardCacheSize) ? m_forwardCacheSize : static_cast<uint64_t>(m_fileSize);
xbmc/filesystem/FileCache.cpp
26
C++
1
performance
111
46
46
false
[VideoPlayer] Fix cache level calculation and add to Debug Info OSD
24,117
xbmc/xbmc
17,740
C++
lrusak
thexai
/* * Copyright (C) 2005-2024 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 enum class TEXTURE_SCALING { UNKNOWN, LINEAR, NEAREST, };
I think this should be only 2024 as the file is new
/* * Copyright (C) 2005-2024 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 /*! * \brief Specifies the types of texture scaling algorithms */ enum class TEXTURE_SCALING { UNKNOWN, ///< U...
@@ -0,0 +1,16 @@ +/* + * Copyright (C) 2005-2024 Team Kodi
xbmc/guilib/TextureScaling.h
2
C/C++
0.357
suggestion
51
17
20
false
guilib: Add nearest neighbor image scaling
24,395
xbmc/xbmc
17,740
C++
enen92
garbear
{ auto property = std::find_if(m_propsInfo.begin(), m_propsInfo.end(), [&name](const auto& prop) { return prop->name == name; }); if (property != m_propsInfo.end()) { int ret = drmModeObjectSetProperty(m_fd, m_id, m_type, property->get()->prop_id, value); if (ret == 0) ...
```suggestion std::optional<bool> CDRMObject::IsPropertyImmutable(std::string_view name) ```
{ auto property = std::find_if(m_propsInfo.begin(), m_propsInfo.end(), [&name](const auto& prop) { return prop->name == name; }); if (property != m_propsInfo.end()) { int ret = drmModeObjectSetProperty(m_fd, m_id, m_type, property->get()->prop_id, value); if (ret == 0) ...
@@ -130,3 +149,14 @@ bool CDRMObject::SupportsProperty(const std::string& name) return false; } + +std::optional<bool> CDRMObject::IsPropertyImmutable(const std::string& name)
xbmc/windowing/gbm/drm/DRMObject.cpp
26
C++
0.857
suggestion
94
36
36
false
Dynamic Selection of DRM planes with GBM
24,431
xbmc/xbmc
17,740
C++
neo1973
hbiyik
continue; return std::make_optional<uint64_t>(prop->enums[j].value); } return {}; } std::optional<uint64_t*> CDRMObject::GetRangePropertyLimits(std::string_view name) { auto property = std::find_if(m_propsInfo.begin(), m_propsInfo.end(), [&name](const auto& prop) { retu...
I suggest to add a little more type safety: ```suggestion std::optional<std::span<uint64_t, 2>> CDRMObject::GetRangePropertyLimits(std::string_view name) { auto property = std::find_if(m_propsInfo.begin(), m_propsInfo.end(), [&name](const auto& prop) { return prop->name == name; })...
continue; return std::make_optional<uint64_t>(prop->enums[j].value); } return {}; } std::optional<std::span<uint64_t, 2>> CDRMObject::GetRangePropertyLimits(std::string_view name) { auto property = std::find_if(m_propsInfo.begin(), m_propsInfo.end(), [&name](const auto&...
@@ -105,6 +105,25 @@ std::optional<uint64_t> CDRMObject::GetPropertyValue(std::string_view name, return {}; } +std::optional<uint64_t*> CDRMObject::GetRangePropertyLimits(std::string_view name) +{ + auto property = std::find_if(m_propsInfo.begin(), m_propsInfo.end(), + [&name](const...
xbmc/windowing/gbm/drm/DRMObject.cpp
26
C++
1
suggestion
636
51
51
false
Dynamic Selection of DRM planes with GBM
24,431
xbmc/xbmc
17,740
C++
neo1973
hbiyik
int ret = avcodec_send_packet(m_pCodecContext, avpkt); if (ret && ret != AVERROR_EOF) { char err[AV_ERROR_MAX_STRING_SIZE] = {}; av_strerror(ret, err, AV_ERROR_MAX_STRING_SIZE); CLog::Log(LOGERROR, "CDVDVideoCodecDRMPRIME::{} - send packet failed: {} ({})", __FUNCTION__, err, ret); } ...
The comment mention "plane number is single" however this code checks for layers, something that typically always will be 1. I am guessing this offset handling is added to assist with following MPP specific AFBC header offset? ``` /* MPP specific AFBC src_y offset, not memory address offset */ frame->crop_top =...
int ret = avcodec_send_packet(m_pCodecContext, avpkt); if (ret && ret != AVERROR_EOF) { char err[AV_ERROR_MAX_STRING_SIZE] = {}; av_strerror(ret, err, AV_ERROR_MAX_STRING_SIZE); CLog::Log(LOGERROR, "CDVDVideoCodecDRMPRIME::{} - send packet failed: {} ({})", __FUNCTION__, err, ret); } ...
@@ -506,6 +506,19 @@ void CDVDVideoCodecDRMPRIME::SetPictureParams(VideoPicture* pVideoPicture) pVideoPicture->iWidth = m_pFrame->width; pVideoPicture->iHeight = m_pFrame->height; + /* according to ffmpeg devs crop fields in AVFrame are not always maintained actively + * and may cause under-shot buffers or m...
xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecDRMPRIME.cpp
26
C++
1
question
779
51
51
false
Dynamic Selection of DRM planes with GBM
24,431
xbmc/xbmc
17,740
C++
Kwiboo
hbiyik
unsigned int color_range : 1; //< 1 indicate if we have a full range of color AVChromaLocation chroma_position; AVColorPrimaries color_primaries; // heuristics applied when original is AVCOL_PRI_UNSPECIFIED AVColorPrimaries m_originalColorPrimaries; AVColorTransferCharacteristic color_transfer; unsi...
There is probably no need to use `size_t` here, suggest use of `unsigned int` same as width and height for consistency. Also `uint32_t GetXOffset()` is used in `CVideoBufferDRMPRIME`, so probably no need to keep the offset as 64-bit and truncate it.
unsigned int color_range : 1; //< 1 indicate if we have a full range of color AVChromaLocation chroma_position; AVColorPrimaries color_primaries; // heuristics applied when original is AVCOL_PRI_UNSPECIFIED AVColorPrimaries m_originalColorPrimaries; AVColorTransferCharacteristic color_transfer; unsi...
@@ -75,6 +75,8 @@ struct VideoPicture unsigned int iWidth; unsigned int iHeight; + size_t iXOffset; + size_t iYOffset;
xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodec.h
26
C/C++
0.786
suggestion
252
51
51
false
Dynamic Selection of DRM planes with GBM
24,431
xbmc/xbmc
17,740
C++
Kwiboo
hbiyik
dts = DVD_NOPTS_VALUE; iFlags = 0; iRepeatPicture = 0; iDuration = 0; iFrameType = 0; color_space = AVCOL_SPC_UNSPECIFIED; color_range = 0; chroma_position = AVCHROMA_LOC_UNSPECIFIED; color_primaries = AVColorPrimaries::AVCOL_PRI_UNSPECIFIED; color_transfer = AVCOL_TRC_UNSPECIFIED; colorBits = 8; ...
Please try to avoid Hungarian notation as per our code guidelines (xOffset and yOffset would suffice)
dts = DVD_NOPTS_VALUE; iFlags = 0; iRepeatPicture = 0; iDuration = 0; iFrameType = 0; color_space = AVCOL_SPC_UNSPECIFIED; color_range = 0; chroma_position = AVCHROMA_LOC_UNSPECIFIED; color_primaries = AVColorPrimaries::AVCOL_PRI_UNSPECIFIED; color_transfer = AVCOL_TRC_UNSPECIFIED; colorBits = 8; ...
@@ -58,6 +58,8 @@ void VideoPicture::Reset() iWidth = 0; iHeight = 0; + iXOffset = 0;
xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodec.cpp
26
C++
0.5
suggestion
102
51
51
false
Dynamic Selection of DRM planes with GBM
24,431
xbmc/xbmc
17,740
C++
enen92
hbiyik
AVColorSpace color_space; unsigned int color_range : 1; //< 1 indicate if we have a full range of color AVChromaLocation chroma_position; AVColorPrimaries color_primaries; // heuristics applied when original is AVCOL_PRI_UNSPECIFIED AVColorPrimaries m_originalColorPrimaries; AVColorTransferCharacter...
I know this is annoying as hell but current code guidelines specify `m_` prefix for members and different default initialisation scheme. Should be: ``` unsigned int m_xOffset{0}; unsigned int m_yOffset{0}; ``` Unfortunately not all the time it is easy/possible to infer the style from the current codebase as we...
AVColorSpace color_space; unsigned int color_range : 1; //< 1 indicate if we have a full range of color AVChromaLocation chroma_position; AVColorPrimaries color_primaries; // heuristics applied when original is AVCOL_PRI_UNSPECIFIED AVColorPrimaries m_originalColorPrimaries; AVColorTransferCharacter...
@@ -75,6 +75,8 @@ struct VideoPicture unsigned int iWidth; unsigned int iHeight; + unsigned int xOffset = {0};
xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodec.h
26
C/C++
1
suggestion
493
51
51
false
Dynamic Selection of DRM planes with GBM
24,431
xbmc/xbmc
17,740
C++
enen92
hbiyik
} m_videoDatabase->Close(); return true; } bool CVideoThumbLoader::LoadItemLookup(CFileItem* pItem) { if (pItem->m_bIsShareOrDrive || pItem->IsParentFolder() || pItem->GetPath() == "add") return false; if (pItem->HasVideoInfoTag() && !pItem->GetVideoInfoTag()->m_type.empty() && pItem->GetVideoIn...
You can make both const most likely.
} m_videoDatabase->Close(); return true; } bool CVideoThumbLoader::LoadItemLookup(CFileItem* pItem) { if (pItem->m_bIsShareOrDrive || pItem->IsParentFolder() || pItem->GetPath() == "add") return false; if (pItem->HasVideoInfoTag() && !pItem->GetVideoInfoTag()->m_type.empty() && pItem->GetVideoIn...
@@ -240,40 +240,48 @@ bool CVideoThumbLoader::LoadItemLookup(CFileItem* pItem) m_videoDatabase->Open(); - std::map<std::string, std::string> artwork = pItem->GetArt(); - std::vector<std::string> artTypes = GetArtTypes(pItem->HasVideoInfoTag() ? pItem->GetVideoInfoTag()->m_type : ""); - if (find(artTypes.begin...
xbmc/video/VideoThumbLoader.cpp
26
C++
0.071
suggestion
36
51
51
false
[guilib] VideoThumbLoader don't look for basic local artwork when library items are displayed
24,483
xbmc/xbmc
17,740
C++
fritsch
rmrector
/*! \brief Fetch the list of available-but-unassigned art URLs held in the database for a specific media item and art type. \param mediaId the id in the media table. \param mediaType corresponds to the table the item resides in. \param artType e.g. "thumb", "fanart", etc. \return list of URLs */ std::ve...
It does not make much sense to pass simple data types by reference. Please change the type to a simple `bool`, passed by value.
/*! \brief Fetch the list of available-but-unassigned art URLs held in the database for a specific media item and art type. \param mediaId the id in the media table. \param mediaType corresponds to the table the item resides in. \param artType e.g. "thumb", "fanart", etc. \return list of URLs */ std::ve...
@@ -1000,7 +1000,9 @@ class CVideoDatabase : public CDatabase \return The dbId of the season. */ int AddSeason(int showID, int season, const std::string& name = ""); - int AddSet(const std::string& strSet, const std::string& strOverview = ""); + int AddSet(const std::string& strSet, + const std::...
xbmc/video/VideoDatabase.h
26
C/C++
1
suggestion
127
51
51
false
[VideoDatabase] Do not overwrite Set Overview if no field in NFO
24,533
xbmc/xbmc
17,740
C++
ksooo
78andyp
/* * Copyright (C) 2024 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 "HevcSei.h" void hevc_add_start_code_emulation_prevention_3_byte(std::vector<uint8_t>& buf) { auto count = buf.size(); ...
`count` variable seems redundant as is increased at same time as `buf.insert` Use directly `while (i < buf.size())` should be equivalent.
/* * Copyright (C) 2024 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 "HevcSei.h" void HevcAddStartCodeEmulationPrevention3Byte(std::vector<uint8_t>& buf) { size_t i = 0; while (i < buf.si...
@@ -0,0 +1,186 @@ +/* + * Copyright (C) 2024 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 "HevcSei.h" + +void hevc_add_start_code_emulation_prevention_3_byte(std::vector<uint8_t>& buf) +{...
xbmc/utils/HevcSei.cpp
21
C++
0.714
suggestion
140
46
46
false
[Android] Add HDR allowed dynamic metadata formats setting
24,584
xbmc/xbmc
17,740
C++
thexai
quietvoid
} return messages; } const std::vector<CHevcSei> CHevcSei::ParseSeiRbsp(const uint8_t* buf, const size_t len) { return ParseSeiRbspInternal(buf, len); } const std::vector<CHevcSei> CHevcSei::ParseSeiRbspUnclearedEmulation(const uint8_t* in_data, ...
```suggestion const auto itu_t_t35_country_code = br.ReadBits(8); ``` This and others
return messages; } std::vector<CHevcSei> CHevcSei::ParseSeiRbsp(const uint8_t* buf, const size_t len) { return ParseSeiRbspInternal(buf, len); } std::vector<CHevcSei> CHevcSei::ParseSeiRbspUnclearedEmulation(const uint8_t* inData, const size_t inData...
@@ -0,0 +1,186 @@ +/* + * Copyright (C) 2024 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 "HevcSei.h" + +void hevc_add_start_code_emulation_prevention_3_byte(std::vector<uint8_t>& buf) +{...
xbmc/utils/HevcSei.cpp
26
C++
0.857
suggestion
96
51
51
false
[Android] Add HDR allowed dynamic metadata formats setting
24,584
xbmc/xbmc
17,740
C++
thexai
quietvoid
/* * Copyright (C) 2024 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 "BitstreamReader.h" #include <optional> #include <vector> class CHevcSei { public: CHevcSei() = default; ...
```suggestion uint8_t payload_type{0}; ``` This and others. Initializing inside the class seems safer in order to avoid "missing initialization" mistakes when class is used.
/* * Copyright (C) 2024 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 "BitstreamReader.h" #include <optional> #include <vector> /*! * \brief Parses HEVC SEI messages for supplem...
@@ -0,0 +1,58 @@ +/* + * Copyright (C) 2024 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 "BitstreamReader.h" + +#include <optional> +#include <vector> + +class CHevcSei +{...
xbmc/utils/HevcSei.h
22
C/C++
1
suggestion
182
47
47
false
[Android] Add HDR allowed dynamic metadata formats setting
24,584
xbmc/xbmc
17,740
C++
thexai
quietvoid
* SPDX-License-Identifier: GPL-2.0-or-later * See LICENSES/README.md for more information. */ #pragma once #include "BitstreamReader.h" #include <optional> #include <vector> class CHevcSei { public: CHevcSei() = default; ~CHevcSei() = default; uint8_t payload_type{0}; size_t payload_size{0}; // In ...
Please remove the `const` here and the following functions when returning by value, see http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rf-return-const
* SPDX-License-Identifier: GPL-2.0-or-later * See LICENSES/README.md for more information. */ #pragma once #include "BitstreamReader.h" #include <optional> #include <vector> /*! * \brief Parses HEVC SEI messages for supplemental video information. * * The CHevcSei class is used to interpret and handle Suppl...
@@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 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 "BitstreamReader.h" + +#include <optional> +#include <vector> + +class CHevcSei +{...
xbmc/utils/HevcSei.h
26
C/C++
0.714
suggestion
163
51
51
false
[Android] Add HDR allowed dynamic metadata formats setting
24,584
xbmc/xbmc
17,740
C++
neo1973
quietvoid
case AVC_NAL_PPS: break; default: break; } } return rtn; } //////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////// CBitstreamConverter::CBitstreamConverter() {...
Use camel case for newly introduced variables. There's a couple more variables that have wrong naming.
case AVC_NAL_PPS: break; default: break; } } return rtn; } //////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////// CBitstreamConverter::CBitstreamConverter() {...
@@ -356,6 +357,8 @@ CBitstreamConverter::CBitstreamConverter() m_sps_pps_context.sps_pps_data = NULL; m_start_decode = true; m_convert_dovi = false; + m_remove_dovi = false;
xbmc/utils/BitstreamConverter.cpp
26
C++
0.5
bug
102
51
51
false
[Android] Add HDR allowed dynamic metadata formats setting
24,584
xbmc/xbmc
17,740
C++
sundermann
quietvoid
/* * Copyright (C) 2024 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 "HevcSei.h" void hevc_add_start_code_emulation_prevention_3_byte(std::vector<uint8_t>& buf) { size_t i = 0; while (i <...
Pascal case here and in other places
/* * Copyright (C) 2024 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 "HevcSei.h" void HevcAddStartCodeEmulationPrevention3Byte(std::vector<uint8_t>& buf) { size_t i = 0; while (i < buf.si...
@@ -0,0 +1,187 @@ +/* + * Copyright (C) 2024 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 "HevcSei.h" + +void hevc_add_start_code_emulation_prevention_3_byte(std::vector<uint8_t>& buf)
xbmc/utils/HevcSei.cpp
11
C++
0.071
suggestion
36
36
36
false
[Android] Add HDR allowed dynamic metadata formats setting
24,584
xbmc/xbmc
17,740
C++
sundermann
quietvoid
last_payload_type_byte = br.ReadBits(8); while (last_payload_type_byte == 0xFF) { last_payload_type_byte = br.ReadBits(8); sei.payload_type += 255; } sei.payload_type += last_payload_type_byte; last_payload_size_byte = br.ReadBits(8); while (last_payload_size_byte == 0xFF) { last_payload_...
```suggestion messages.emplace_back(sei); ```
lastPayloadTypeByte = br.ReadBits(8); while (lastPayloadTypeByte == 0xFF) { lastPayloadTypeByte = br.ReadBits(8); sei.m_payloadType += 255; } sei.m_payloadType += lastPayloadTypeByte; lastPayloadSizeByte = br.ReadBits(8); while (lastPayloadSizeByte == 0xFF) { lastPayloadSizeByte = br.Read...
@@ -0,0 +1,187 @@ +/* + * Copyright (C) 2024 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 "HevcSei.h" + +void hevc_add_start_code_emulation_prevention_3_byte(std::vector<uint8_t>& buf) +{...
xbmc/utils/HevcSei.cpp
26
C++
0.786
suggestion
49
51
51
false
[Android] Add HDR allowed dynamic metadata formats setting
24,584
xbmc/xbmc
17,740
C++
sundermann
quietvoid
#include "HevcSei.h" void hevc_add_start_code_emulation_prevention_3_byte(std::vector<uint8_t>& buf) { size_t i = 0; while (i < buf.size()) { if (i > 2 && buf[i - 2] == 0 && buf[i - 1] == 0 && buf[i] <= 3) buf.insert(buf.begin() + i, 3); i += 1; } } void hevc_clear_start_code_emulation_prevent...
```suggestion out.emplace_back(buf[0]); ```
#include "HevcSei.h" void HevcAddStartCodeEmulationPrevention3Byte(std::vector<uint8_t>& buf) { size_t i = 0; while (i < buf.size()) { if (i > 2 && buf[i - 2] == 0 && buf[i - 1] == 0 && buf[i] <= 3) buf.insert(buf.begin() + i, 3); i += 1; } } void HevcClearStartCodeEmulationPrevention3Byte(con...
@@ -0,0 +1,187 @@ +/* + * Copyright (C) 2024 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 "HevcSei.h" + +void hevc_add_start_code_emulation_prevention_3_byte(std::vector<uint8_t>& buf) +{...
xbmc/utils/HevcSei.cpp
26
C++
0.786
suggestion
49
51
51
false
[Android] Add HDR allowed dynamic metadata formats setting
24,584
xbmc/xbmc
17,740
C++
sundermann
quietvoid
void hevc_add_start_code_emulation_prevention_3_byte(std::vector<uint8_t>& buf) { size_t i = 0; while (i < buf.size()) { if (i > 2 && buf[i - 2] == 0 && buf[i - 1] == 0 && buf[i] <= 3) buf.insert(buf.begin() + i, 3); i += 1; } } void hevc_clear_start_code_emulation_prevention_3_byte(const uint...
```suggestion out.emplace_back(buf[1]); ```
void HevcAddStartCodeEmulationPrevention3Byte(std::vector<uint8_t>& buf) { size_t i = 0; while (i < buf.size()) { if (i > 2 && buf[i - 2] == 0 && buf[i - 1] == 0 && buf[i] <= 3) buf.insert(buf.begin() + i, 3); i += 1; } } void HevcClearStartCodeEmulationPrevention3Byte(const uint8_t* buf, ...
@@ -0,0 +1,187 @@ +/* + * Copyright (C) 2024 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 "HevcSei.h" + +void hevc_add_start_code_emulation_prevention_3_byte(std::vector<uint8_t>& buf) +{...
xbmc/utils/HevcSei.cpp
26
C++
0.786
suggestion
49
51
51
false
[Android] Add HDR allowed dynamic metadata formats setting
24,584
xbmc/xbmc
17,740
C++
sundermann
quietvoid
while (i < buf.size()) { if (i > 2 && buf[i - 2] == 0 && buf[i - 1] == 0 && buf[i] <= 3) buf.insert(buf.begin() + i, 3); i += 1; } } void hevc_clear_start_code_emulation_prevention_3_byte(const uint8_t* buf, const size_t len, ...
```suggestion out.emplace_back(buf[i]); ```
while (i < buf.size()) { if (i > 2 && buf[i - 2] == 0 && buf[i - 1] == 0 && buf[i] <= 3) buf.insert(buf.begin() + i, 3); i += 1; } } void HevcClearStartCodeEmulationPrevention3Byte(const uint8_t* buf, const size_t len, ...
@@ -0,0 +1,187 @@ +/* + * Copyright (C) 2024 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 "HevcSei.h" + +void hevc_add_start_code_emulation_prevention_3_byte(std::vector<uint8_t>& buf) +{...
xbmc/utils/HevcSei.cpp
26
C++
0.857
suggestion
53
51
51
false
[Android] Add HDR allowed dynamic metadata formats setting
24,584
xbmc/xbmc
17,740
C++
sundermann
quietvoid
const auto application_identifier = br.ReadBits(8); const auto application_version = br.ReadBits(8); if (application_identifier == 4 && application_version <= 1) return &sei; } } } return {}; } std::pair<bool, const std::vector<uint8_t>> CHevcSei::RemoveHdr10PlusFromSe...
```suggestion if (!messages.isEmpty()) ```
const auto application_identifier = br.ReadBits(8); const auto application_version = br.ReadBits(8); if (application_identifier == 4 && application_version <= 1) return &sei; } } } return {}; } std::pair<bool, const std::vector<uint8_t>> CHevcSei::RemoveHdr10PlusFromSe...
@@ -0,0 +1,187 @@ +/* + * Copyright (C) 2024 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 "HevcSei.h" + +void hevc_add_start_code_emulation_prevention_3_byte(std::vector<uint8_t>& buf) +{...
xbmc/utils/HevcSei.cpp
26
C++
0.786
suggestion
48
48
47
false
[Android] Add HDR allowed dynamic metadata formats setting
24,584
xbmc/xbmc
17,740
C++
sundermann
quietvoid
std::vector<uint8_t>& out) { size_t i = 0; if (len > 2) { out.reserve(len); out.push_back(buf[0]); out.push_back(buf[1]); for (i = 2; i < len; i++) { if (!(buf[i - 2] == 0 && buf[i - 1] == 0 && buf[i] == 3)) out.push_back(...
```suggestion CHevcSei sei; ``` As now class is self-initialized is not necessary here
std::vector<uint8_t>& out) { size_t i = 0; if (len > 2) { out.reserve(len); out.emplace_back(buf[0]); out.emplace_back(buf[1]); for (i = 2; i < len; i++) { if (!(buf[i - 2] == 0 && buf[i - 1] == 0 && buf[i] == 3)) out.emplace_bac...
@@ -0,0 +1,187 @@ +/* + * Copyright (C) 2024 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 "HevcSei.h" + +void hevc_add_start_code_emulation_prevention_3_byte(std::vector<uint8_t>& buf) +{...
xbmc/utils/HevcSei.cpp
26
C++
0.857
suggestion
93
51
51
false
[Android] Add HDR allowed dynamic metadata formats setting
24,584
xbmc/xbmc
17,740
C++
thexai
quietvoid
* Copyright (C) 2024 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 "BitstreamReader.h" #include <optional> #include <vector> class CHevcSei { public: CHevcSei() = default; ~C...
A new reader might come across this class and not know what HEVC or SEI is. GPT-4 suggests some helpful documentation: ```c++ /*! * \brief Parses HEVC SEI messages for supplemental video information. * * The CHevcSei class is used to interpret and handle Supplemental Enhancement * Information (SEI) messages...
* Copyright (C) 2024 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 "BitstreamReader.h" #include <optional> #include <vector> /*! * \brief Parses HEVC SEI messages for supplement...
@@ -0,0 +1,54 @@ +/* + * Copyright (C) 2024 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 "BitstreamReader.h" + +#include <optional> +#include <vector> + +class CHevcSei
xbmc/utils/HevcSei.h
26
C/C++
1
refactor
639
51
51
false
[Android] Add HDR allowed dynamic metadata formats setting
24,584
xbmc/xbmc
17,740
C++
garbear
quietvoid
{ BaseYUV2RGBGLSLShader::OnCompiledAndLinked(); m_hKernTex = glGetUniformLocation(ProgramHandle(), "m_kernelTex"); if (m_scaling != VS_SCALINGMETHOD_LANCZOS3_FAST && m_scaling != VS_SCALINGMETHOD_SPLINE36_FAST) m_scaling = VS_SCALINGMETHOD_LANCZOS3_FAST; CConvolutionKernel kernel(m_scaling, 256); if (m...
Isn't here the else path missing now?
{ BaseYUV2RGBGLSLShader::OnCompiledAndLinked(); m_hKernTex = glGetUniformLocation(ProgramHandle(), "m_kernelTex"); if (m_scaling != VS_SCALINGMETHOD_LANCZOS3_FAST && m_scaling != VS_SCALINGMETHOD_SPLINE36_FAST) m_scaling = VS_SCALINGMETHOD_LANCZOS3_FAST; CConvolutionKernel kernel(m_scaling, 256); if (m...
@@ -320,7 +320,9 @@ void YUV2RGBFilterShader::OnCompiledAndLinked() glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); GLvoid* data = (GLvoid*)kernel.GetFloatPixels(); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32F, kernel.GetSize(), 1, 0, GL_RGBA, GL_FLOAT, data); +#if defined (GL_ES_VERSION_3_...
xbmc/cores/VideoPlayer/VideoRenderers/VideoShaders/YUV2RGBShaderGLES.cpp
26
C++
0.071
question
37
39
40
false
GLES: Implement fast HQ video scalers
24,611
xbmc/xbmc
17,740
C++
fritsch
sarbes
/// @remark For more detailed description of the <b>`addon.xml`</b>, see also https://kodi.wiki/view/Addon.xml. /// /// /// -------------------------------------------------------------------------- /// /// **Example:** /// /// ~~~~~~~~~~~~~{.cpp} /// #include <kodi/addon-instance/PVR.h> /// /// class CMyPVRClient : pu...
I would switch order of these arguments, in params first, out params next.
/// @remark For more detailed description of the <b>`addon.xml`</b>, see also https://kodi.wiki/view/Addon.xml. /// /// /// -------------------------------------------------------------------------- /// /// **Example:** /// /// ~~~~~~~~~~~~~{.cpp} /// #include <kodi/addon-instance/PVR.h> /// /// class CMyPVRClient : pu...
@@ -292,7 +292,8 @@ namespace addon /// PVR_ERROR GetChannelsAmount(int& amount) override; /// PVR_ERROR GetChannels(bool radio, std::vector<kodi::addon::PVRChannel>& channels) override; /// PVR_ERROR GetChannelStreamProperties(const kodi::addon::PVRChannel& channel, -/// ...
xbmc/addons/kodi-dev-kit/include/kodi/addon-instance/PVR.h
26
C/C++
0.143
suggestion
74
51
51
false
[pvr] Improve support for live streaming from Epg Tags for Archive/Catchup
24,622
xbmc/xbmc
17,740
C++
ksooo
phunkyfish
PVR_ERROR SignalQuality(int channelUid, PVR_SIGNAL_STATUS& qualityinfo) const; /*! * @brief Get the descramble information of the stream that's currently open. * @param channelUid Channel unique identifier * @param descrambleinfo The descramble information. * @return PVR_ERROR_NO_ERROR on success, resp...
Do you see a way to avoid the bool param, for example by providing an new method? I'm not a fan of bool parameters, because resulting calling code is (almost ever) not really readable.
* @param iWhence ? * @param iPosition The new position or -1 on error. * @return PVR_ERROR_NO_ERROR on success, respective error code otherwise. */ PVR_ERROR SeekLiveStream(int64_t iFilePosition, int iWhence, int64_t& iPosition); /*! * @brief Get the length of the currently playing live stream, if a...
@@ -570,10 +570,12 @@ class CPVRClient : public ADDON::IAddonInstanceHandler * @brief Fill the given container with the properties required for playback of the given channel. Values are obtained from the PVR backend. * @param channel The channel. * @param props The container to be filled with the stream pro...
xbmc/pvr/addons/PVRClient.h
26
C/C++
0.5
suggestion
184
51
51
false
[pvr] Improve support for live streaming from Epg Tags for Archive/Catchup
24,622
xbmc/xbmc
17,740
C++
ksooo
phunkyfish
*/ void OnPlaybackStarted(const CFileItem& item); /*! * @brief Inform that playback of an item was stopped due to user interaction. * @param item The item that stopped to play. * @return True, if the state has changed, false otherwise */ bool OnPlaybackStopped(const CFileItem& item); /*! * @...
Do you see a way to avoid the bool param, for example by providing an new method? I'm not a fan of bool parameters, because resulting calling code is (almost ever) not really readable. And please, no default parameters. Those are for the lazy guys only. :-)
* @brief Inform that playback of an item just started. * @param item The item that started to play. */ void OnPlaybackStarted(const CFileItem& item); /*! * @brief Inform that playback of an item was stopped due to user interaction. * @param item The item that stopped to play. * @return True, if t...
@@ -76,7 +76,8 @@ class CPVRPlaybackState */ void StartPlayback( CFileItem* item, - ContentUtils::PlayMode mode = ContentUtils::PlayMode::CHECK_AUTO_PLAY_NEXT_ITEM) const; + ContentUtils::PlayMode mode = ContentUtils::PlayMode::CHECK_AUTO_PLAY_NEXT_ITEM, + bool fromEpgAsLive = false) const;
xbmc/pvr/PVRPlaybackState.h
26
C/C++
0.571
suggestion
260
51
51
false
[pvr] Improve support for live streaming from Epg Tags for Archive/Catchup
24,622
xbmc/xbmc
17,740
C++
ksooo
phunkyfish
StartPlayback(nextToPlay.release()); return OnPlaybackStopped(item); } void CPVRPlaybackState::StartPlayback( CFileItem* item, ContentUtils::PlayMode mode /* = ContentUtils::PlayMode::CHECK_AUTO_PLAY_NEXT_ITEM */, bool fromEpgAsLive /* = false */) const { // Obtain dynamic playback url and propert...
this could be `const std::shared_ptr...`
StartPlayback(nextToPlay, ContentUtils::PlayMode::CHECK_AUTO_PLAY_NEXT_ITEM, PVR_SOURCE::DEFAULT); return OnPlaybackStopped(item); } void CPVRPlaybackState::StartPlayback(std::unique_ptr<CFileItem>& item, ContentUtils::PlayMode mode, ...
@@ -363,6 +363,13 @@ void CPVRPlaybackState::StartPlayback( client->StreamClosed(); client->GetChannelStreamProperties(item->GetPVRChannelInfoTag(), props, fromEpgAsLive); + + if (props.LivePlaybackAsEPG()) + { + std::shared_ptr<CPVREpgInfoTag> epgTag = item->GetPVRChannelInfoTag()->G...
xbmc/pvr/PVRPlaybackState.cpp
26
C++
0.5
suggestion
40
51
51
false
[pvr] Improve support for live streaming from Epg Tags for Archive/Catchup
24,622
xbmc/xbmc
17,740
C++
ksooo
phunkyfish
if (item.GetStartOffset() == STARTOFFSET_RESUME) parentItem->SetStartOffset(STARTOFFSET_RESUME); auto queuedItems = std::make_unique<CFileItemList>(); VIDEO_UTILS::GetItemsForPlayList(parentItem, *queuedItems); // figure out where to start playback int pos = 0; for (const s...
So this doesn't read well now. When playing a recording we pass `PVR_SOURCE::PVR_SOURCE_SWITCH_LIVE`, which doesn't make a huge amount a sense. Could change the enum to be simpley `PVR_SOURCE_SWITCH` or `DEFAULT` which would read better, thoughts?
const auto parentItem = std::make_shared<CFileItem>(parentPath, true); if (item.GetStartOffset() == STARTOFFSET_RESUME) parentItem->SetStartOffset(STARTOFFSET_RESUME); auto queuedItems = std::make_unique<CFileItemList>(); VIDEO::UTILS::GetItemsForPlayList(parentItem, *queuedItems); ...
@@ -162,7 +162,9 @@ bool CPVRGUIActionsPlayback::PlayRecording(const CFileItem& item, bool bCheckRes { CFileItem* itemToPlay = new CFileItem(recording); itemToPlay->SetStartOffset(item.GetStartOffset()); - CServiceBroker::GetPVRManager().PlaybackState()->StartPlayback(itemToPlay); + CServic...
xbmc/pvr/guilib/PVRGUIActionsPlayback.cpp
26
C++
0.786
question
249
51
51
false
[pvr] Improve support for live streaming from Epg Tags for Archive/Catchup
24,622
xbmc/xbmc
17,740
C++
phunkyfish
phunkyfish
enum PVR_ERROR(__cdecl* OnSystemSleep)(const struct AddonInstance_PVR*); enum PVR_ERROR(__cdecl* OnSystemWake)(const struct AddonInstance_PVR*); enum PVR_ERROR(__cdecl* OnPowerSavingActivated)(const struct AddonInstance_PVR*); enum PVR_ERROR(__cdecl* OnPowerSavingDeactivated)(const struct AddonInstance_...
Imo this should return `PVR_ERROR` not void, to be able to report for example disconnect errors.
enum PVR_ERROR(__cdecl* OnSystemWake)(const struct AddonInstance_PVR*); enum PVR_ERROR(__cdecl* OnPowerSavingActivated)(const struct AddonInstance_PVR*); enum PVR_ERROR(__cdecl* OnPowerSavingDeactivated)(const struct AddonInstance_PVR*); //--==----==----==----==----==----==----==----==----==----==----=...
@@ -307,6 +307,7 @@ extern "C" // Stream demux interface functions enum PVR_ERROR(__cdecl* GetStreamProperties)(const struct AddonInstance_PVR*, struct PVR_STREAM_PROPERTIES*); + void(__cdecl* StreamClosed)(const struct AddonInstance_PVR*);
xbmc/addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr.h
26
C/C++
0.857
suggestion
96
51
51
false
[pvr] Improve support for live streaming from Epg Tags for Archive/Catchup
24,622
xbmc/xbmc
17,740
C++
ksooo
phunkyfish
/// @copydetails cpp_kodi_addon_pvr_Streams_TV_Demux_source_addon_auto_check /// ///@{ //============================================================================ /// @brief Get the stream properties of the stream that's currently being read. /// /// @param[in] properties The properties of the current...
Should return a `PVR_ERROR` and the default implementation should return `PVR_ERROR_NOT_IMPLEMENTED`.
/// /// @copydetails cpp_kodi_addon_pvr_Streams_TV_Demux_header_addon_auto_check /// @copydetails cpp_kodi_addon_pvr_Streams_TV_Demux_source_addon_auto_check /// ///@{ //============================================================================ /// @brief Get the stream properties of the stream that's ...
@@ -2420,6 +2420,16 @@ class ATTR_DLL_LOCAL CInstancePVRClient : public IAddonInstance } //---------------------------------------------------------------------------- + //============================================================================ + /// @brief The currently playing stream has been closed + ...
xbmc/addons/kodi-dev-kit/include/kodi/addon-instance/PVR.h
26
C/C++
1
suggestion
101
51
51
false
[pvr] Improve support for live streaming from Epg Tags for Archive/Catchup
24,622
xbmc/xbmc
17,740
C++
ksooo
phunkyfish
{ // Obtain dynamic playback url and properties from the respective pvr client const std::shared_ptr<const CPVRClient> client = CServiceBroker::GetPVRManager().GetClient(*item); if (client) { CPVRStreamProperties props; if (item->IsPVRChannel()) { if (source == PVR_SOURCE::DEFAULT) cl...
This introduces a memory leak. You need to delete `item` before assigning it a new value. item is a raw pointer.
{ // Obtain dynamic playback url and properties from the respective pvr client const std::shared_ptr<const CPVRClient> client = CServiceBroker::GetPVRManager().GetClient(*item); if (client) { CPVRStreamProperties props; if (item->IsPVRChannel()) { if (source == PVR_SOURCE::DEFAULT) { ...
@@ -363,6 +363,13 @@ void CPVRPlaybackState::StartPlayback(CFileItem* item, client->StreamClosed(); client->GetChannelStreamProperties(item->GetPVRChannelInfoTag(), source, props); + + if (props.LivePlaybackAsEPG()) + { + const std::shared_ptr<CPVREpgInfoTag> epgTag = item->GetPVRChan...
xbmc/pvr/PVRPlaybackState.cpp
26
C++
0.786
performance
113
51
51
false
[pvr] Improve support for live streaming from Epg Tags for Archive/Catchup
24,622
xbmc/xbmc
17,740
C++
ksooo
phunkyfish
{ // Obtain dynamic playback url and properties from the respective pvr client const std::shared_ptr<const CPVRClient> client = CServiceBroker::GetPVRManager().GetClient(*item); if (client) { CPVRStreamProperties props; if (item->IsPVRChannel()) { if (source == PVR_SOURCE::DEFAULT) { ...
Although it works, this is so ugly. `item` is handed in from outside this method. If you delete it here and the calling method later on accesses the pointer - which currently is not the case but can change anytime - this will crash. Not sure how to solve this best. Maybe change method signature to take a `CFileItem...
{ // Obtain dynamic playback url and properties from the respective pvr client const std::shared_ptr<const CPVRClient> client = CServiceBroker::GetPVRManager().GetClient(*item); if (client) { CPVRStreamProperties props; if (item->IsPVRChannel()) { if (source == PVR_SOURCE::DEFAULT) { ...
@@ -358,14 +359,37 @@ void CPVRPlaybackState::StartPlayback( if (item->IsPVRChannel()) { - client->GetChannelStreamProperties(item->GetPVRChannelInfoTag(), props); + if (source == PVR_SOURCE::DEFAULT) + { + PVR_ERROR retVal = client->StreamClosed(); + if (retVal != PVR_ERROR_NO_...
xbmc/pvr/PVRPlaybackState.cpp
26
C++
0.857
bug
389
51
51
false
[pvr] Improve support for live streaming from Epg Tags for Archive/Catchup
24,622
xbmc/xbmc
17,740
C++
ksooo
phunkyfish
PVR_SOURCE source) const { // Obtain dynamic playback url and properties from the respective pvr client const std::shared_ptr<const CPVRClient> client = CServiceBroker::GetPVRManager().GetClient(*item); if (client) { CPVRStreamProperties props; if (item->IsPVRChann...
I'm more in favor for `item = std::make_unique<CFileItem>(epgTag);`, like you do at the other places.
PVR_SOURCE source) const { // Obtain dynamic playback url and properties from the respective pvr client const std::shared_ptr<const CPVRClient> client = CServiceBroker::GetPVRManager().GetClient(*item); if (client) { CPVRStreamProperties props; if (item->IsPVRChann...
@@ -374,8 +374,7 @@ void CPVRPlaybackState::StartPlayback(CFileItem* item, const std::shared_ptr<CPVREpgInfoTag> epgTag = item->GetPVRChannelInfoTag()->GetEPGNow(); if (epgTag) { - delete item; - item = new CFileItem(epgTag); + item.reset(new CFileItem(epgTag));
xbmc/pvr/PVRPlaybackState.cpp
26
C++
0.5
suggestion
101
51
51
false
[pvr] Improve support for live streaming from Epg Tags for Archive/Catchup
24,622
xbmc/xbmc
17,740
C++
ksooo
phunkyfish
/* * Copyright (C) 2012-2019 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 "addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr.h" #include "threads/CriticalSection.h" #inclu...
Including `pvr_general.h` should be sufficient. `pvr.h` includes everything from the c-API and you only need `PVR_SOURCE`here.
/* * Copyright (C) 2012-2019 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 "addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr/pvr_general.h" #include "pvr/PVRConstants.h" /...
@@ -8,6 +8,7 @@ #pragma once +#include "addons/kodi-dev-kit/include/kodi/c-api/addon-instance/pvr.h"
xbmc/pvr/PVRPlaybackState.h
11
C/C++
0.714
suggestion
126
36
36
false
[pvr] Improve support for live streaming from Epg Tags for Archive/Catchup
24,622
xbmc/xbmc
17,740
C++
ksooo
phunkyfish
m_pDS->exec("DROP TABLE videoversion"); m_pDS->exec("ALTER TABLE videoversion_new RENAME TO videoversion"); // Fix gap in the migration to videodb v127 for unused user-defined video version types. // Unfortunately due to original design we cannot tell which ones were movie versions or // extras and...
isn't `GROUP BY vvt.id` enough, or will the RDBMS complain otherwise?
m_pDS->exec("DROP TABLE videoversion"); m_pDS->exec("ALTER TABLE videoversion_new RENAME TO videoversion"); // Fix gap in the migration to videodb v127 for unused user-defined video version types. // Unfortunately due to original design we cannot tell which ones were movie versions or // extras and...
@@ -6335,11 +6336,46 @@ void CVideoDatabase::UpdateTables(int iVersion) "AND itemType = %i", VideoAssetTypeOwner::USER, VideoAssetType::VERSION)); } + + if (iVersion < 131) + { + // Remove quality-like predefined version types + + // Retrieve current ...
xbmc/video/VideoDatabase.cpp
26
C++
0.357
question
69
51
51
false
Videodb versions
24,683
xbmc/xbmc
17,740
C++
da-anda
CrystalP
// Retrieve current utilization per type m_pDS->query("SELECT vvt.id, vvt.name, count(vv.idType) " "FROM videoversiontype vvt " " LEFT JOIN videoversion vv ON vvt.id = vv.idType " "WHERE vvt.id = 40405 OR vvt.id BETWEEN 40418 AND 40430 " "GROU...
wouldn't the more correct way be to just empty the string? We still use the string ID as DB ID, don't we? And since we have a reserved ID range for builtin version labels, the full range is currently in the DB, partially with empty strings. That's at least the case on my beta2 build (can't run anything newer on Fedora ...
// Retrieve current utilization per type m_pDS->query("SELECT vvt.id, vvt.name, count(vv.idType) " "FROM videoversiontype vvt " " LEFT JOIN videoversion vv ON vvt.id = vv.idType " "WHERE vvt.id = 40405 OR vvt.id BETWEEN 40418 AND 40430 " "GROU...
@@ -6335,11 +6336,46 @@ void CVideoDatabase::UpdateTables(int iVersion) "AND itemType = %i", VideoAssetTypeOwner::USER, VideoAssetType::VERSION)); } + + if (iVersion < 131) + { + // Remove quality-like predefined version types + + // Retrieve current ...
xbmc/video/VideoDatabase.cpp
26
C++
0.929
suggestion
441
51
51
false
Videodb versions
24,683
xbmc/xbmc
17,740
C++
da-anda
CrystalP
getSourceName.header.type = DISPLAYCONFIG_DEVICE_INFO_GET_SOURCE_NAME; getSourceName.header.size = sizeof(getSourceName); for (const auto& path : paths) { getSourceName.header.adapterId.HighPart = path.sourceInfo.adapterId.HighPart; getSourceName.header.adapterId.LowPart = path....
This is a ugly hack that mostly will break and cause issues in all others systems. Please not do that. `getColorInfo.advancedColorSupported` by itself signals that display _supports_ HDR (enabled or not enabled) you can not add other conditions here. HDR may be supported but not enabled in Windows as you know (a...
advancedColorEnabled = true; if (getColorInfo.advancedColorSupported) advancedColorSupported = true; } if (g_hWnd != nullptr) break; } } } } } if (!advancedColorSupported) { status = HDR_STATUS::...
@@ -1424,7 +1424,7 @@ HDR_STATUS CWIN32Util::GetWindowsHDRStatus() if (getColorInfo.advancedColorEnabled) advancedColorEnabled = true; - if (getColorInfo.advancedColorSupported) + if (getColorInfo.advancedColorSupported && !getColorInfo.wideColorEnforced)
xbmc/platform/win32/WIN32Util.cpp
26
C++
0.857
suggestion
496
51
51
false
[windows] Identify SDR WCG screens as non HDR-capable
24,689
xbmc/xbmc
17,740
C++
thexai
CrystalP
hr = m_swapChain->ResizeBuffers(scDesc.BufferCount, lround(m_outputSize.Width), lround(m_outputSize.Height), scDesc.Format, windowed ? 0 : DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH); if (hr == DXGI_ERROR_DEVICE_REMOVED || hr == DXGI_ERROR_DEV...
This is necessary? It's not called from inside `CWIN32Util::GetWindowsHDRStatus();` when supported? Not used return value?
lround(m_outputSize.Height), scDesc.Format, windowed ? 0 : DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH); if (hr == DXGI_ERROR_DEVICE_REMOVED || hr == DXGI_ERROR_DEVICE_RESET) { // If the device was removed for any reason, a new device and...
@@ -641,6 +642,7 @@ void DX::DeviceResources::ResizeBuffers() else // Otherwise, create a new one using the same adapter as the existing Direct3D device. { HDR_STATUS hdrStatus = CWIN32Util::GetWindowsHDRStatus(); + CWinRtUtil::GetWindowsHDRStatus();
xbmc/rendering/dx/DeviceResources.cpp
26
C++
0.714
question
127
51
51
false
[windows] Identify SDR WCG screens as non HDR-capable
24,689
xbmc/xbmc
17,740
C++
thexai
CrystalP
/* * Copyright (C) 2005-2018 Team Kodi * This file is part of Kodi - https://kodi.tv * * SPDX-License-Identifier: GPL-2.0-or-later * See LICENSES/README.md for more information. */ #include "DeviceResources.h" #include "DirectXHelper.h" #include "RenderContext.h" #include "ServiceBroker.h" #include "guilib/...
After remove `CWinRtUtil::GetWindowsHDRStatus()` call this header is not needed
/* * Copyright (C) 2005-2018 Team Kodi * This file is part of Kodi - https://kodi.tv * * SPDX-License-Identifier: GPL-2.0-or-later * See LICENSES/README.md for more information. */ #include "DeviceResources.h" #include "DirectXHelper.h" #include "RenderContext.h" #include "ServiceBroker.h" #include "guilib/...
@@ -23,6 +23,7 @@ #include "platform/win32/CharsetConverter.h" #include "platform/win32/WIN32Util.h" +#include "platform/win32/WinRtUtil.h"
xbmc/rendering/dx/DeviceResources.cpp
26
C++
0.571
suggestion
79
51
51
false
[windows] Identify SDR WCG screens as non HDR-capable
24,689
xbmc/xbmc
17,740
C++
thexai
CrystalP
} if (!advancedColorSupported) { status = HDR_STATUS::HDR_UNSUPPORTED; if (CServiceBroker::IsServiceManagerUp()) CLog::LogF(LOGDEBUG, "Display is not HDR capable or cannot be detected"); } else { status = advancedColorEnabled ? HDR_STATUS::HDR_ON : HDR_STATUS::HDR_OFF; if (CServiceBro...
It's only a personal preference but since Visual Studio editor grey out not used code path (desktop/UWP) I prefer no extra blank lines inside `#ifdef` code blocks. i.e. this instead of current: ![after](https://github.com/xbmc/xbmc/assets/58434170/bf5f7cd8-982a-467a-bc97-fc4cf7db3015) here and similar others
} if (!advancedColorSupported) { status = HDR_STATUS::HDR_UNSUPPORTED; if (CServiceBroker::IsServiceManagerUp()) CLog::LogF(LOGDEBUG, "Display is not HDR capable or cannot be detected"); } else { status = advancedColorEnabled ? HDR_STATUS::HDR_ON : HDR_STATUS::HDR_OFF; if (CServiceBro...
@@ -1469,6 +1429,35 @@ HDR_STATUS CWIN32Util::GetWindowsHDRStatus() return status; } +#endif // TARGET_WINDOWS_DESKTOP + +HDR_STATUS CWIN32Util::GetWindowsHDRStatus() +{ + HDR_STATUS status = HDR_STATUS::HDR_UNKNOWN; + +#ifdef TARGET_WINDOWS_STORE + + if (CSysInfo::GetWindowsDeviceFamily() == CSysInfo::Xbox &&
xbmc/platform/win32/WIN32Util.cpp
26
C++
0.857
suggestion
319
51
51
false
[windows] Identify SDR WCG screens as non HDR-capable
24,689
xbmc/xbmc
17,740
C++
thexai
CrystalP
{ float fps = static_cast<float>(modeDesc.RefreshRate.Numerator) / static_cast<float>(modeDesc.RefreshRate.Denominator); int32_t est; DEVMODEW devmode = {}; devmode.dmSize = sizeof(devmode); devmode.dmPelsWidth = modeDesc.Width; devmode.dmPelsHeight = modeDesc.Height; devmo...
For consistency with WinRtUtil maybe include `GetWindowsHDRStatusWin32` method in `CWIN32Util` class and return HDR_STATUS::HDR_UNKNOWN if its called from target store. I mean: ```c++ HDR_STATUS CWIN32Util::GetWindowsHDRStatusWin32() { HDR_STATUS status = HDR_STATUS::HDR_UNKNOWN; #ifdef TARGET_WINDOWS_DES...
{ float fps = static_cast<float>(modeDesc.RefreshRate.Numerator) / static_cast<float>(modeDesc.RefreshRate.Denominator); int32_t est; DEVMODEW devmode = {}; devmode.dmSize = sizeof(devmode); devmode.dmPelsWidth = modeDesc.Width; devmode.dmPelsHeight = modeDesc.Height; devmo...
@@ -1347,53 +1348,13 @@ HDR_STATUS CWIN32Util::ToggleWindowsHDR(DXGI_MODE_DESC& modeDesc) return status; } -HDR_STATUS CWIN32Util::GetWindowsHDRStatus() +#ifdef TARGET_WINDOWS_DESKTOP +static HDR_STATUS GetWindowsHDRStatusWin32()
xbmc/platform/win32/WIN32Util.cpp
26
C++
0.929
style
367
51
51
false
[windows] Identify SDR WCG screens as non HDR-capable
24,689
xbmc/xbmc
17,740
C++
thexai
CrystalP
using namespace winrt::Windows::Graphics::Display; #ifdef TARGET_WINDOWS_DESKTOP extern HWND g_hWnd; #endif static constexpr std::string_view AdvancedColorKindToString(AdvancedColorKind kind) { switch (kind) { case AdvancedColorKind::StandardDynamicRange: return "SDR"; case AdvancedColorKind::WideC...
```suggestion constexpr std::array<AdvancedColorKind, 3> kinds{AdvancedColorKind::StandardDynamicRange, ```
using namespace winrt::Windows::Graphics::Display; #ifdef TARGET_WINDOWS_DESKTOP extern HWND g_hWnd; #endif static constexpr std::string_view AdvancedColorKindToString(AdvancedColorKind kind) { switch (kind) { case AdvancedColorKind::StandardDynamicRange: return "SDR"; case AdvancedColorKind::WideC...
@@ -0,0 +1,203 @@ +/* + * Copyright (C) 2024 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 "WinRtUtil.h" + +#include "rendering/dx/DirectXHelper.h" +#include "utils/SystemInfo.h" +#include...
xbmc/platform/win32/WinRtUtil.cpp
26
C++
1
suggestion
111
51
51
false
[windows] Identify SDR WCG screens as non HDR-capable
24,689
xbmc/xbmc
17,740
C++
thexai
CrystalP
extern HWND g_hWnd; #endif static constexpr std::string_view AdvancedColorKindToString(AdvancedColorKind kind) { switch (kind) { case AdvancedColorKind::StandardDynamicRange: return "SDR"; case AdvancedColorKind::WideColorGamut: return "WCG"; case AdvancedColorKind::HighDynamicRange: ...
```suggestion for (const auto& kind : kinds) ```
extern HWND g_hWnd; #endif static constexpr std::string_view AdvancedColorKindToString(AdvancedColorKind kind) { switch (kind) { case AdvancedColorKind::StandardDynamicRange: return "SDR"; case AdvancedColorKind::WideColorGamut: return "WCG"; case AdvancedColorKind::HighDynamicRange: ...
@@ -0,0 +1,203 @@ +/* + * Copyright (C) 2024 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 "WinRtUtil.h" + +#include "rendering/dx/DirectXHelper.h" +#include "utils/SystemInfo.h" +#include...
xbmc/platform/win32/WinRtUtil.cpp
26
C++
0.857
suggestion
52
51
51
false
[windows] Identify SDR WCG screens as non HDR-capable
24,689
xbmc/xbmc
17,740
C++
thexai
CrystalP
if (!m_strDynPath.empty()) return m_strDynPath; else return m_strPath; } void CFileItem::SetDynPath(const std::string &path) { m_strDynPath = path; } const std::string CFileItem::GetBlurayPath() const { if (IsBlurayPlaylist()) { CURL url(GetDynPath()); CURL url2(url.GetHostName()); // strip ...
```suggestion return GetDynPath(); ``` Remove the `else` so that the function returns a value on every path.
} // if a folder, check for folder.jpg if (m_bIsFolder && !IsFileFolder() && (!IsRemote() || alwaysCheckRemote || CServiceBroker::GetSettingsComponent()->GetSettings()->GetBool(CSettings::SETTING_MUSICFILES_FINDREMOTETHUMBS))) { std::vector<CVariant> thumbs = CServiceBroker::GetSettingsComponent()->GetSett...
@@ -2099,6 +2110,23 @@ void CFileItem::SetDynPath(const std::string &path) m_strDynPath = path; } +const std::string CFileItem::GetBlurayPath() const +{ + if (IsBlurayPlaylist()) + { + CURL url(GetDynPath()); + CURL url2(url.GetHostName()); // strip bluray:// + if (url2.IsProtocol("udf")) + // ISO...
xbmc/FileItem.cpp
26
C++
1
suggestion
115
51
51
false
[Video] Improve user experience when playing movies/episodes from Bluray ISO/BDMV.
24,720
xbmc/xbmc
17,740
C++
neo1973
78andyp
explicit CFileItem(const CVideoInfoTag& movie); explicit CFileItem(const std::shared_ptr<PVR::CPVREpgInfoTag>& tag); explicit CFileItem(const std::shared_ptr<PVR::CPVREpgSearchFilter>& filter); explicit CFileItem(const std::shared_ptr<PVR::CPVRChannelGroupMember>& channelGroupMember); explicit CFileItem(const...
```suggestion std::string GetBlurayPath() const; ``` Please don't return by const value, see http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rf-return-const
explicit CFileItem(const CVideoInfoTag& movie); explicit CFileItem(const std::shared_ptr<PVR::CPVREpgInfoTag>& tag); explicit CFileItem(const std::shared_ptr<PVR::CPVREpgSearchFilter>& filter); explicit CFileItem(const std::shared_ptr<PVR::CPVRChannelGroupMember>& channelGroupMember); explicit CFileItem(const...
@@ -142,6 +142,8 @@ class CFileItem : const std::string &GetDynPath() const; void SetDynPath(const std::string &path); + const std::string GetBlurayPath() const;
xbmc/FileItem.h
26
C/C++
1
suggestion
173
51
51
false
[Video] Improve user experience when playing movies/episodes from Bluray ISO/BDMV.
24,720
xbmc/xbmc
17,740
C++
neo1973
78andyp
return bResult; } /*! * \brief On play and media queue * * \note Override if you want to change the default behavior of what is done * when the user clicks on a file in a "folder" with similar files. * * This function is called by OnClick() */ bool CGUIMediaWindow::OnPlayAndQueueMedia(const CFileItemPtr& ite...
```suggestion return i->IsZIP() || i->IsRAR() || i->m_bIsFolder; ```
if (pItem->GetStartOffset() == STARTOFFSET_RESUME) pItem->SetStartOffset(0); return bResult; } /*! * \brief On play and media queue * * \note Override if you want to change the default behavior of what is done * when the user clicks on a file in a "folder" with similar files. * * This function is calle...
@@ -1525,39 +1526,38 @@ bool CGUIMediaWindow::OnPlayAndQueueMedia(const CFileItemPtr& item, const std::s PLAYLIST::Id playlistId = m_guiState->GetPlaylist(); if (playlistId != PLAYLIST::TYPE_NONE) { + // Remove ZIP, RAR files and folders + CFileItemList playlist; + playlist.Copy(*m_vecItems, true); + ...
xbmc/windows/GUIMediaWindow.cpp
26
C++
1
suggestion
106
51
51
false
[Video] Improve user experience when playing movies/episodes from Bluray ISO/BDMV.
24,720
xbmc/xbmc
17,740
C++
neo1973
78andyp
* * This function is called by OnClick() */ bool CGUIMediaWindow::OnPlayAndQueueMedia(const CFileItemPtr& item, const std::string& player) { //play and add current directory to temporary playlist PLAYLIST::Id playlistId = m_guiState->GetPlaylist(); if (playlistId != PLAYLIST::TYPE_NONE) { // Remove ZIP, ...
```suggestion return i->GetVideoInfoTag()->m_basePath == j->GetVideoInfoTag()->m_basePath; ```
* * \note Override if you want to change the default behavior of what is done * when the user clicks on a file in a "folder" with similar files. * * This function is called by OnClick() */ bool CGUIMediaWindow::OnPlayAndQueueMedia(const CFileItemPtr& item, const std::string& player) { //play and add current dir...
@@ -1525,39 +1526,38 @@ bool CGUIMediaWindow::OnPlayAndQueueMedia(const CFileItemPtr& item, const std::s PLAYLIST::Id playlistId = m_guiState->GetPlaylist(); if (playlistId != PLAYLIST::TYPE_NONE) { + // Remove ZIP, RAR files and folders + CFileItemList playlist; + playlist.Copy(*m_vecItems, true); + ...
xbmc/windows/GUIMediaWindow.cpp
26
C++
1
suggestion
148
51
51
false
[Video] Improve user experience when playing movies/episodes from Bluray ISO/BDMV.
24,720
xbmc/xbmc
17,740
C++
neo1973
78andyp
// Remove ZIP, RAR files and folders CFileItemList playlist; playlist.Copy(*m_vecItems, true); playlist.erase(std::remove_if(playlist.begin(), playlist.end(), [](const std::shared_ptr<CFileItem>& i) { ...
```suggestion return i->GetVideoInfoTag()->m_basePath == item->GetVideoInfoTag()->m_basePath; ```
PLAYLIST::Id playlistId = m_guiState->GetPlaylist(); if (playlistId != PLAYLIST::TYPE_NONE) { // Remove ZIP, RAR files and folders CFileItemList playlist; playlist.Copy(*m_vecItems, true); playlist.erase(std::remove_if(playlist.begin(), playlist.end(), [](const st...
@@ -1525,39 +1526,38 @@ bool CGUIMediaWindow::OnPlayAndQueueMedia(const CFileItemPtr& item, const std::s PLAYLIST::Id playlistId = m_guiState->GetPlaylist(); if (playlistId != PLAYLIST::TYPE_NONE) { + // Remove ZIP, RAR files and folders + CFileItemList playlist; + playlist.Copy(*m_vecItems, true); + ...
xbmc/windows/GUIMediaWindow.cpp
26
C++
1
suggestion
209
51
51
false
[Video] Improve user experience when playing movies/episodes from Bluray ISO/BDMV.
24,720
xbmc/xbmc
17,740
C++
neo1973
78andyp
int idEpisode /* = -1 */) { const auto filePath = details.GetPath(); try { BeginTransaction(); if (idEpisode < 0) idEpisode = GetEpisodeId(filePath); if (idEpisode > 0) DeleteEpisode(idEpisode, true); // true to keep the table entry else {...
Sorry for noticing this late and after a fixup commit was just merged. This line is wrong, it will update all versions/extra of the movie and break them. videoversion.idFile is the only link between a parent movie and its additional versions/extras. This also breaks version artwork, which uses idFile as key in the ar...
{ BeginTransaction(); std::string sql = PrepareSQL("UPDATE episode SET c18='%s', idFile=%i WHERE idEpisode=%i", fileAndPath.c_str(), idFile, idEpisode); m_pDS->exec(sql); CommitTransaction(); return true; } catch (...) { CLog::Log(LOGERROR, "{} ({}) fail...
@@ -3020,6 +3020,49 @@ int CVideoDatabase::SetDetailsForSeason(const CVideoInfoTag& details, const std: return -1; } +bool CVideoDatabase::SetFileForEpisode(const std::string& fileAndPath, int idEpisode, int idFile) +{ + try + { + BeginTransaction(); + std::string sql = PrepareSQL("UPDATE episode SET c18=...
xbmc/video/VideoDatabase.cpp
26
C++
0.643
bug
522
51
51
false
[Video] Improve user experience when playing movies/episodes from Bluray ISO/BDMV.
24,720
xbmc/xbmc
17,740
C++
CrystalP
78andyp
"OnUpdate", data); } updateListing = true; } } if (item.HasVideoInfoTag() && item.GetVideoInfoTag()->HasStreamDetails()) { CFileItem dbItem(item); // Check whether the item's...
@78andyp Why use item.GetDynPath() instead of progressTrackingFile? This bypasses other logic at the top of the function. For the specific case of bluray progressTrackingFile is set to item.GetDynPath() Got curious while stepping through this for pvr and found inconsistencies
// UPnP announce resume point changes to clients // however not if playcount is modified as that already announces if (item.HasVideoInfoTag() && !updatePlayCount) { CVariant data; data["id"] = item.GetVideoInfoTag()->m_iDbId; dat...
@@ -162,7 +171,14 @@ void CSaveFileState::DoWork(CFileItem& item, if (!videodatabase.GetStreamDetails(dbItem) || dbItem.GetVideoInfoTag()->m_streamDetails != item.GetVideoInfoTag()->m_streamDetails) { - videodatabase.SetStreamDetailsForFile(item.GetVideoInfoTag()->m_strea...
xbmc/utils/SaveFileStateJob.cpp
26
C++
0.571
suggestion
278
51
51
false
[Video] Improve user experience when playing movies/episodes from Bluray ISO/BDMV.
24,720
xbmc/xbmc
17,740
C++
CrystalP
78andyp
m_pRenderer->RenderUpdate(m_presentsource, m_presentsourcePast, clear, flags | RENDER_FLAG_BOT | RENDER_FLAG_FIELD1, alpha); else m_pRenderer->RenderUpdate(m_presentsource, m_presentsourcePast, clear, flags | RENDER_FLAG_TOP | RENDER_FLAG_FIELD1, alpha); } } void CRenderManager::PresentBlend(bool cle...
```suggestion const bool isHDREnabled = CServiceBroker::GetWinSystem()->GetOSHDRStatus() == HDR_STATUS::HDR_ON; ```
m_pRenderer->RenderUpdate(m_presentsource, m_presentsourcePast, clear, flags | RENDER_FLAG_BOT | RENDER_FLAG_FIELD1, alpha); else m_pRenderer->RenderUpdate(m_presentsource, m_presentsourcePast, clear, flags | RENDER_FLAG_TOP | RENDER_FLAG_FIELD1, alpha); } } void CRenderManager::PresentBlend(bool cle...
@@ -890,11 +890,13 @@ void CRenderManager::PresentBlend(bool clear, DWORD flags, DWORD alpha) void CRenderManager::UpdateLatencyTweak() { float fps = CServiceBroker::GetWinSystem()->GetGfxContext().GetFPS(); + bool isHDREnabled = CServiceBroker::GetWinSystem()->GetOSHDRStatus() == HDR_STATUS::HDR_ON;
xbmc/cores/VideoPlayer/VideoRenderers/RenderManager.cpp
26
C++
1
suggestion
119
51
51
false
[AdvandedSettings] Additional latency setting for HDR
24,917
xbmc/xbmc
17,740
C++
thexai
XR0M4N
{ std::vector<std::string> exts = StringUtils::Split(extraExtensions, '|'); for (std::vector<std::string>::const_iterator i = exts.begin(); i != exts.end(); ++i) { size_t iPos = extensions.find(*i); if (iPos != std::string::npos) extensions.erase(iPos,i->size()+1); } } } void CA...
```suggestion if (isHDREnabled && (videolatency.hdrlatency > 0.0f || videolatency.hdrlatency < 0.0f)) ``` Compare float with NULL is not correct.
if (XMLUtils::GetString(pRootElement, "remove", extraExtensions) && !extraExtensions.empty()) { std::vector<std::string> exts = StringUtils::Split(extraExtensions, '|'); for (std::vector<std::string>::const_iterator i = exts.begin(); i != exts.end(); ++i) { size_t iPos = extensions.find(*i); ...
@@ -1385,14 +1388,18 @@ void CAdvancedSettings::AddSettingsFile(const std::string &filename) m_settingsFiles.push_back(filename); } -float CAdvancedSettings::GetLatencyTweak(float refreshrate) +float CAdvancedSettings::GetLatencyTweak(float refreshrate, bool isHDREnabled) { float delay = m_videoDefaultLatency...
xbmc/settings/AdvancedSettings.cpp
26
C++
1
performance
154
51
51
false
[AdvandedSettings] Additional latency setting for HDR
24,917
xbmc/xbmc
17,740
C++
thexai
XR0M4N
} if (fallback.refreshmin > 0.0f && fallback.refreshmax >= fallback.refreshmin) m_videoAdjustRefreshOverrides.push_back(fallback); else CLog::Log(LOGWARNING, "Ignoring malformed refreshrate fallback, fpsmin:{:f} fpsmax:{:f} " "refreshm...
Is the extra variable here really needed? It should be possible to pass `videolatency.hdrlatency` directly into `XMLUtils::GetFloat`.
fallback.refreshmax = refreshmax; } if (fallback.refreshmin > 0.0f && fallback.refreshmax >= fallback.refreshmin) m_videoAdjustRefreshOverrides.push_back(fallback); else CLog::Log(LOGWARNING, "Ignoring malformed refreshrate fallback, fpsmin:{:f}...
@@ -743,7 +743,7 @@ void CAdvancedSettings::ParseSettingsFile(const std::string &file) TiXmlElement* pVideoLatency = pElement->FirstChildElement("latency"); if (pVideoLatency) { - float refresh, refreshmin, refreshmax, delay; + float refresh, refreshmin, refreshmax, delay, hdrlatency;
xbmc/settings/AdvancedSettings.cpp
26
C++
0.714
performance
133
51
51
false
[AdvandedSettings] Additional latency setting for HDR
24,917
xbmc/xbmc
17,740
C++
sundermann
XR0M4N
std::vector<std::string> exts = StringUtils::Split(extraExtensions, '|'); for (std::vector<std::string>::const_iterator i = exts.begin(); i != exts.end(); ++i) { size_t iPos = extensions.find(*i); if (iPos != std::string::npos) extensions.erase(iPos,i->size()+1); } } } void CAdvan...
I'm not sure about making the hdr latency a delta rather than an absolute value. Is there a reason you went that way?
{ std::vector<std::string> exts = StringUtils::Split(extraExtensions, '|'); for (std::vector<std::string>::const_iterator i = exts.begin(); i != exts.end(); ++i) { size_t iPos = extensions.find(*i); if (iPos != std::string::npos) extensions.erase(iPos,i->size()+1); } } } void CA...
@@ -1385,14 +1388,18 @@ void CAdvancedSettings::AddSettingsFile(const std::string &filename) m_settingsFiles.push_back(filename); } -float CAdvancedSettings::GetLatencyTweak(float refreshrate) +float CAdvancedSettings::GetLatencyTweak(float refreshrate, bool isHDREnabled) { float delay = m_videoDefaultLatency...
xbmc/settings/AdvancedSettings.cpp
26
C++
0.286
performance
117
51
51
false
[AdvandedSettings] Additional latency setting for HDR
24,917
xbmc/xbmc
17,740
C++
CrystalP
XR0M4N
// Store global display latency settings TiXmlElement* pVideoLatency = pElement->FirstChildElement("latency"); if (pVideoLatency) { float refresh, refreshmin, refreshmax, delay, hdrlatency; TiXmlElement* pRefreshVideoLatency = pVideoLatency->FirstChildElement("refresh"); while (pRefre...
For consistency, hdrdelay would be better I think. or hdrdelta if it remains a delta value.
// Store global display latency settings TiXmlElement* pVideoLatency = pElement->FirstChildElement("latency"); if (pVideoLatency) { float refresh, refreshmin, refreshmax; TiXmlElement* pRefreshVideoLatency = pVideoLatency->FirstChildElement("refresh"); while (pRefreshVideoLatency) ...
@@ -764,6 +764,9 @@ void CAdvancedSettings::ParseSettingsFile(const std::string &file) if (XMLUtils::GetFloat(pRefreshVideoLatency, "delay", delay, -600.0f, 600.0f)) videolatency.delay = delay; + if (XMLUtils::GetFloat(pRefreshVideoLatency, "hdrlatency", hdrlatency, -600.0f, 600.0f))
xbmc/settings/AdvancedSettings.cpp
26
C++
0.357
suggestion
91
51
51
false
[AdvandedSettings] Additional latency setting for HDR
24,917
xbmc/xbmc
17,740
C++
CrystalP
XR0M4N
} } void CAdvancedSettings::AddSettingsFile(const std::string &filename) { m_settingsFiles.push_back(filename); } float CAdvancedSettings::GetLatencyTweak(float refreshrate, bool isHDREnabled) { float delay = m_videoDefaultLatency; if (isHDREnabled) delay += m_videoDefaultHdrExtraLatency; for (const au...
When HDR is enabled and `videolatency.hdrextradelay == 0`, `m_videoDefaultHdrExtraLatency` is added twice. Global latency already added before for loop, then is not need this `else` code.
extensions.erase(iPos,i->size()+1); } } } void CAdvancedSettings::AddSettingsFile(const std::string &filename) { m_settingsFiles.push_back(filename); } float CAdvancedSettings::GetLatencyTweak(float refreshrate, bool isHDREnabled) { float delay{}; const auto& latency = std::find_if(m_videoRe...
@@ -1385,16 +1387,27 @@ void CAdvancedSettings::AddSettingsFile(const std::string &filename) m_settingsFiles.push_back(filename); } -float CAdvancedSettings::GetLatencyTweak(float refreshrate) +float CAdvancedSettings::GetLatencyTweak(float refreshrate, bool isHDREnabled) { float delay = m_videoDefaultLatency...
xbmc/settings/AdvancedSettings.cpp
26
C++
0.5
performance
194
51
51
false
[AdvandedSettings] Additional latency setting for HDR
24,917
xbmc/xbmc
17,740
C++
thexai
XR0M4N
if (!IsConfigured()) return false; std::unique_lock<CCriticalSection> lock(m_presentlock); if (!m_presentTimer.IsTimePast()) return true; else return false; } void CRenderManager::FrameMove() { bool firstFrame = false; UpdateResolution(); { std::unique_lock<CCriticalSection> lock(m_stat...
in which scenario does this help?
if (!IsConfigured()) return false; std::unique_lock<CCriticalSection> lock(m_presentlock); if (!m_presentTimer.IsTimePast()) return true; else return false; } void CRenderManager::FrameMove() { bool firstFrame = false; UpdateResolution(); { std::unique_lock<CCriticalSection> lock(m_stat...
@@ -304,7 +304,7 @@ void CRenderManager::FrameMove() lock.unlock(); if (!Configure()) return; - + UpdateLatencyTweak();
xbmc/cores/VideoPlayer/VideoRenderers/RenderManager.cpp
26
C++
0.071
question
33
51
51
false
[AdvandedSettings] Additional latency setting for HDR
24,917
xbmc/xbmc
17,740
C++
CrystalP
XR0M4N