Skip to content
6 changes: 4 additions & 2 deletions common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ add_subdirectory(public)
add_library(
RialtoCommon
STATIC

source/EventThread.cpp
Comment on lines 29 to 31
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whitespace-only blank line introduced here (line contains spaces). Please remove trailing whitespace to avoid noisy diffs / potential lint failures.

Copilot uses AI. Check for mistakes.
source/LinuxUtils.cpp
source/Timer.cpp
Expand All @@ -43,6 +43,7 @@ target_include_directories(
RialtoCommon

PUBLIC

interface
Comment on lines 45 to 46
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whitespace-only blank line introduced here (line contains spaces). Please remove trailing whitespace to avoid noisy diffs / potential lint failures.

Copilot uses AI. Check for mistakes.
$<TARGET_PROPERTY:RialtoCommonPublic,INTERFACE_INCLUDE_DIRECTORIES>

Expand All @@ -52,7 +53,8 @@ target_include_directories(

target_link_libraries (
RialtoCommon

PUBLIC
rdkperf
PRIVATE
RialtoLogging
)
3 changes: 3 additions & 0 deletions media/server/gstplayer/source/GstGenericPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include "Utils.h"
#include "WorkerThread.h"
#include "tasks/generic/GenericPlayerTaskFactory.h"
#include "rdk_perf.h"

Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This introduces a dependency on external rdk_perf.h in the server gstplayer component, but the repo doesn't provide it and there’s no CMake discovery/guard for environments where rdkperf isn't present (e.g. native builds). Please add a build option / availability check (with a stub) or wire rdkperf in via find_package/pkg-config and include dirs. Also consider switching to #include <rdk_perf.h> to keep external header style consistent with other third-party includes (e.g. <gst/gst.h>).

Suggested change
#include "rdk_perf.h"
#if defined(__has_include)
#if __has_include(<rdk_perf.h>)
#include <rdk_perf.h>
#define RIALTO_HAS_RDK_PERF 1
#else
#define RIALTO_HAS_RDK_PERF 0
#endif
#else
#include <rdk_perf.h>
#define RIALTO_HAS_RDK_PERF 1
#endif
#if !RIALTO_HAS_RDK_PERF
#ifndef RDK_PERF_EVENT_ON
#define RDK_PERF_EVENT_ON(...) ((void)0)
#endif
#ifndef RDK_PERF_EVENT_OFF
#define RDK_PERF_EVENT_OFF(...) ((void)0)
#endif
#ifndef RDK_PERF_START
#define RDK_PERF_START(...) ((void)0)
#endif
#ifndef RDK_PERF_STOP
#define RDK_PERF_STOP(...) ((void)0)
#endif
#ifndef RDK_PERF_START_TS
#define RDK_PERF_START_TS(...) ((void)0)
#endif
#ifndef RDK_PERF_STOP_TS
#define RDK_PERF_STOP_TS(...) ((void)0)
#endif
#endif

Copilot uses AI. Check for mistakes.
namespace
{
Expand Down Expand Up @@ -1410,6 +1411,7 @@ bool GstGenericPlayer::setCodecData(GstCaps *caps, const std::shared_ptr<CodecDa

void GstGenericPlayer::pushSampleIfRequired(GstElement *source, const std::string &typeStr)
{

Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whitespace-only blank line introduced at the start of the function body. Please remove trailing whitespace to avoid noisy diffs / potential lint failures.

Suggested change

Copilot uses AI. Check for mistakes.
auto initialPosition = m_context.initialPositions.find(source);
if (m_context.initialPositions.end() == initialPosition)
{
Expand All @@ -1419,6 +1421,7 @@ void GstGenericPlayer::pushSampleIfRequired(GstElement *source, const std::strin
// GstAppSrc does not replace segment, if it's the same as previous one.
// It causes problems with position reporing in amlogic devices, so we need to push
// two segments with different reset time value.
RDKPerf perf(__FUNCTION__);
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perf is only created for RAII side-effects and is otherwise unused; with -Wall -Werror this is likely to trigger -Wunused-variable in some build configurations. Please mark it as intentionally unused (e.g. [[maybe_unused]] or a project macro) to avoid build failures.

Suggested change
RDKPerf perf(__FUNCTION__);
[[maybe_unused]] RDKPerf perf(__FUNCTION__);

Copilot uses AI. Check for mistakes.
pushAdditionalSegmentIfRequired(source);

for (const auto &[position, resetTime, appliedRate, stopPosition] : initialPosition->second)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#include "RialtoServerLogging.h"
#include "TypeConverters.h"
#include <utility>
#include "rdk_perf.h"


namespace firebolt::rialto::server::tasks::generic
{
Expand Down Expand Up @@ -85,7 +87,8 @@ AttachSamples::~AttachSamples()

void AttachSamples::execute() const
{
RIALTO_SERVER_LOG_DEBUG("Executing AttachSamples");
RDKPerf perf(__FUNCTION__);
RIALTO_SERVER_LOG_DEBUG("Executing AttachSamples");
for (AudioData audioData : m_audioData)
{
m_player.updateAudioCaps(audioData.rate, audioData.channels, audioData.codecData);
Expand Down
6 changes: 5 additions & 1 deletion media/server/service/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "IApplicationSessionServer.h"
#include "IGstInitialiser.h"
#include "RialtoServerLogging.h"
#include "rdk_perf.h"

Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This adds a dependency on the external rdk_perf.h header, but the repo doesn't vendor it and the native dependency install script doesn't install rdkperf. To keep NATIVE_BUILD/CI builds working, please either (a) add proper dependency discovery + installation (and include dirs) for rdkperf, or (b) guard this include/instrumentation behind a build option and provide a stub implementation when rdkperf isn't available. Also consider using angle brackets for third-party headers (#include <rdk_perf.h>) to match other external includes in this file.

Suggested change
#include "rdk_perf.h"
#if defined(__has_include)
#if __has_include(<rdk_perf.h>)
#include <rdk_perf.h>
#define RIALTO_HAS_RDK_PERF 1
#endif
#endif
#ifndef RIALTO_HAS_RDK_PERF
class RDKPerf
{
public:
explicit RDKPerf(const char *) {}
};
#endif

Copilot uses AI. Check for mistakes.
// NOLINT(build/filename_format)

Expand All @@ -31,6 +32,7 @@ int main(int argc, char *argv[])
const char kSrcRev[] = SRCREV;
const char kTags[] = TAGS;

RDKPerf perf(__FUNCTION__);
Copy link

Copilot AI Apr 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RDKPerf perf(__FUNCTION__); is never referenced. With repo-wide -Wall -Werror enabled, this is likely to fail the build due to -Wunused-variable. If the object is meant to exist only for RAII timing, mark it [[maybe_unused]] (or otherwise explicitly suppress the unused-variable warning) so the build remains warning-free.

Suggested change
RDKPerf perf(__FUNCTION__);
[[maybe_unused]] RDKPerf perf(__FUNCTION__);

Copilot uses AI. Check for mistakes.
if (std::strlen(kSrcRev) > 0)
{
if (std::strlen(kTags) > 0)
Expand All @@ -56,8 +58,10 @@ int main(int argc, char *argv[])
{
return EXIT_FAILURE;
}
appSessionServer->startService();


appSessionServer->startService();

Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are whitespace-only lines introduced here (blank lines containing spaces / trailing whitespace). Please remove the trailing whitespace to avoid formatting/lint issues and noisy diffs.

Suggested change
appSessionServer->startService();
appSessionServer->startService();

Copilot uses AI. Check for mistakes.
#ifdef FREE_MEM_BEFORE_EXIT
RIALTO_SERVER_LOG_INFO("Calling ShutdownProtobufLibrary");
google::protobuf::ShutdownProtobufLibrary();
Expand Down
Loading