Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ds/host.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:

Check failure on line 3 in ds/host.cpp

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'ds/host.cpp' (Match: rdk/components/generic/devicesettings/rdk/components/generic/devicesettings/1902, 391 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/devicesettings/+archive/rdk-dev-1902.tar.gz, file: ds/host.cpp)

Check failure on line 3 in ds/host.cpp

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'ds/host.cpp' (Match: rdk/components/generic/devicesettings/rdk/components/generic/devicesettings/1907, 391 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/devicesettings/+archive/rdk-dev-1907.tar.gz, file: ds/host.cpp)
*
* Copyright 2025 RDK Management
*
Expand Down Expand Up @@ -217,7 +217,11 @@
*/
VideoOutputPort &Host::getVideoOutputPort(int id)
{
printf("Aishwarya [DEBUG] Enter Host::getVideoOutputPort()\n");
printf("Aishwarya [DEBUG] Requested port name: %s\n", name.c_str());
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

The variable 'name' is used in this debug statement but it does not exist in this function's scope. The function 'getVideoOutputPort(int id)' takes an 'id' parameter, not a 'name' parameter. This will cause a compilation error. If the intention is to log the id, use 'id' instead of 'name.c_str()'.

Copilot uses AI. Check for mistakes.
printf("Aishwarya [DEBUG] Calling VideoOutputPortConfig::getPort()...\n");
return VideoOutputPortConfig::getInstance().getPort(id);
printf("Aishwarya [DEBUG] getPort() returned successfully for: %s\n", name.c_str());
Comment on lines +221 to +224
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

This line is unreachable code. It appears after a 'return' statement on line 223, so it will never be executed. Additionally, this line references 'name' which does not exist in this function's scope (the parameter is 'id'). Remove this line as it serves no purpose and would cause a compilation error.

Suggested change
printf("Aishwarya [DEBUG] Requested port name: %s\n", name.c_str());
printf("Aishwarya [DEBUG] Calling VideoOutputPortConfig::getPort()...\n");
return VideoOutputPortConfig::getInstance().getPort(id);
printf("Aishwarya [DEBUG] getPort() returned successfully for: %s\n", name.c_str());
printf("Aishwarya [DEBUG] Calling VideoOutputPortConfig::getPort()...\n");
return VideoOutputPortConfig::getInstance().getPort(id);

Copilot uses AI. Check for mistakes.
Comment on lines +220 to +224
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

Debug logging statements should not be committed to production code. These appear to be temporary debugging statements added during development. Consider using a proper logging framework or removing these statements before merging. If they must remain, they should be wrapped in a debug flag check or removed entirely.

Suggested change
printf("Aishwarya [DEBUG] Enter Host::getVideoOutputPort()\n");
printf("Aishwarya [DEBUG] Requested port name: %s\n", name.c_str());
printf("Aishwarya [DEBUG] Calling VideoOutputPortConfig::getPort()...\n");
return VideoOutputPortConfig::getInstance().getPort(id);
printf("Aishwarya [DEBUG] getPort() returned successfully for: %s\n", name.c_str());
return VideoOutputPortConfig::getInstance().getPort(id);

Copilot uses AI. Check for mistakes.
}


Expand Down
9 changes: 9 additions & 0 deletions ds/videoOutputPort.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:

Check failure on line 3 in ds/videoOutputPort.cpp

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'ds/videoOutputPort.cpp' (Match: rdk/components/generic/devicesettings/rdk/components/generic/devicesettings/1906, 920 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/devicesettings/+archive/rdk-dev-1906.tar.gz, file: ds/videoOutputPort.cpp)

Check failure on line 3 in ds/videoOutputPort.cpp

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'ds/videoOutputPort.cpp' (Match: rdk/components/generic/devicesettings/rdk/components/generic/devicesettings/2009, 920 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/devicesettings/+archive/RDK-DEV-2009.tar.gz, file: ds/videoOutputPort.cpp)
*
* Copyright 2016 RDK Management
*
Expand Down Expand Up @@ -465,12 +465,21 @@
*/
void VideoOutputPort::setResolution(const std::string &resolutionName, bool persist/* = true*/, bool isIgnoreEdid/* = false*/)
{
printf("Aishwarya [DEBUG] Enter setResolution()\n");
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

Inconsistent indentation with surrounding code. This line uses spaces for indentation while the rest of the function uses tabs. Ensure consistent indentation by using tabs to match the surrounding code style.

Copilot uses AI. Check for mistakes.
printf("ResOverride VideoOutputPort::setResolution resolutionName:%s persist:%d isIgnoreEdid:%d line:%d\r\n", resolutionName.c_str(), persist, isIgnoreEdid, __LINE__);
if (0 && resolutionName.compare(_resolution) == 0) {
printf("Aishwarya [DEBUG] Resolution already set (%s). Skipping.\n", _resolution.c_str());
return;
}
printf("Aishwarya [DEBUG] Getting VideoResolution instance...\n");

VideoResolution newResolution = VideoResolution::getInstance(resolutionName, isIgnoreEdid);
printf("Aishwarya [DEBUG] VideoResolution created successfully\n");
printf("Aishwarya[DEBUG] AspectRatio: %d\n", newResolution.getAspectRatio().getId());
printf("Aishwarya[DEBUG] FrameRate: %d\n", newResolution.getFrameRate().getId());
printf("Aishwarya[DEBUG] Interlaced: %d\n", newResolution.isInterlaced());
printf("Aishwarya[DEBUG] PixelResolution: %d\n", newResolution.getPixelResolution().getId());
printf("Aishwarya[DEBUG] StereoMode: %d\n", newResolution.getStereoscopicMode().getId());
Comment on lines +478 to +482
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

Inconsistent spacing in debug message prefix. Lines 478-482 use "Aishwarya[DEBUG]" (no space between name and bracket) while other debug statements in the same function and file use "Aishwarya [DEBUG]" (with space). For consistency, add a space between "Aishwarya" and "[DEBUG]".

Suggested change
printf("Aishwarya[DEBUG] AspectRatio: %d\n", newResolution.getAspectRatio().getId());
printf("Aishwarya[DEBUG] FrameRate: %d\n", newResolution.getFrameRate().getId());
printf("Aishwarya[DEBUG] Interlaced: %d\n", newResolution.isInterlaced());
printf("Aishwarya[DEBUG] PixelResolution: %d\n", newResolution.getPixelResolution().getId());
printf("Aishwarya[DEBUG] StereoMode: %d\n", newResolution.getStereoscopicMode().getId());
printf("Aishwarya [DEBUG] AspectRatio: %d\n", newResolution.getAspectRatio().getId());
printf("Aishwarya [DEBUG] FrameRate: %d\n", newResolution.getFrameRate().getId());
printf("Aishwarya [DEBUG] Interlaced: %d\n", newResolution.isInterlaced());
printf("Aishwarya [DEBUG] PixelResolution: %d\n", newResolution.getPixelResolution().getId());
printf("Aishwarya [DEBUG] StereoMode: %d\n", newResolution.getStereoscopicMode().getId());

Copilot uses AI. Check for mistakes.
Comment on lines +468 to +482
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

Debug logging statements should not be committed to production code. These appear to be temporary debugging statements added during development. Consider using a proper logging framework or removing these statements before merging. If they must remain, they should be wrapped in a debug flag check or removed entirely.

Suggested change
printf("Aishwarya [DEBUG] Enter setResolution()\n");
printf("ResOverride VideoOutputPort::setResolution resolutionName:%s persist:%d isIgnoreEdid:%d line:%d\r\n", resolutionName.c_str(), persist, isIgnoreEdid, __LINE__);
if (0 && resolutionName.compare(_resolution) == 0) {
printf("Aishwarya [DEBUG] Resolution already set (%s). Skipping.\n", _resolution.c_str());
return;
}
printf("Aishwarya [DEBUG] Getting VideoResolution instance...\n");
VideoResolution newResolution = VideoResolution::getInstance(resolutionName, isIgnoreEdid);
printf("Aishwarya [DEBUG] VideoResolution created successfully\n");
printf("Aishwarya[DEBUG] AspectRatio: %d\n", newResolution.getAspectRatio().getId());
printf("Aishwarya[DEBUG] FrameRate: %d\n", newResolution.getFrameRate().getId());
printf("Aishwarya[DEBUG] Interlaced: %d\n", newResolution.isInterlaced());
printf("Aishwarya[DEBUG] PixelResolution: %d\n", newResolution.getPixelResolution().getId());
printf("Aishwarya[DEBUG] StereoMode: %d\n", newResolution.getStereoscopicMode().getId());
if (0 && resolutionName.compare(_resolution) == 0) {
return;
}
VideoResolution newResolution = VideoResolution::getInstance(resolutionName, isIgnoreEdid);

Copilot uses AI. Check for mistakes.

dsVideoPortResolution_t resolution;
memset(&resolution, 0, sizeof(resolution));
Expand Down
9 changes: 9 additions & 0 deletions ds/videoOutputPortConfig.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* If not stated otherwise in this file or this component's LICENSE file the
* following copyright and licenses apply:

Check failure on line 3 in ds/videoOutputPortConfig.cpp

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'ds/videoOutputPortConfig.cpp' (Match: rdk/components/generic/devicesettings/rdk/components/generic/devicesettings/2.1-20161031, 373 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/devicesettings/+archive/2.1-20161031.tar.gz, file: ds/videoOutputPortConfig.cpp)

Check failure on line 3 in ds/videoOutputPortConfig.cpp

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'Apache-2.0' license found in local file 'ds/videoOutputPortConfig.cpp' (Match: rdk/components/generic/devicesettings/rdk/components/generic/devicesettings/b34ed54, 373 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdk/components/generic/devicesettings/+archive/b34ed545b533a0cf4d29d221cc23daad47f32644.tar.gz, file: ds/videoOutputPortConfig.cpp)
*
* Copyright 2016 RDK Management
*
Expand Down Expand Up @@ -123,12 +123,21 @@

VideoOutputPort &VideoOutputPortConfig::getPort(const std::string & name)
{
printf("\n Aishwarya [DEBUG] Enter VideoOutputPortConfig::getPort()\n");
printf("Aishwarya [DEBUG] Requested port name: %s\n", name.c_str());
printf("Aishwarya [DEBUG] Total available ports: %zu\n", _vPorts.size());
for (size_t i = 0; i < _vPorts.size(); i++) {
printf("Aishwarya [DEBUG] Checking index %zu\n", i);
printf("Aishwarya [DEBUG] Port name: %s\n", _vPorts.at(i).getName().c_str());
if (name.compare(_vPorts.at(i).getName()) == 0) {
printf("Aishwarya [DEBUG] Match found at index %zu for name: %s\n", i, name.c_str());
return _vPorts.at(i);
}
}
printf("Aishwarya [ERROR] No matching port found for name: %s\n", name.c_str());
printf("Aishwarya [DEBUG] Throwing IllegalArgumentException\n");


Comment on lines +126 to +140
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

Debug logging statements should not be committed to production code. These appear to be temporary debugging statements added during development. Consider using a proper logging framework or removing these statements before merging. If they must remain, they should be wrapped in a debug flag check or removed entirely.

Suggested change
printf("\n Aishwarya [DEBUG] Enter VideoOutputPortConfig::getPort()\n");
printf("Aishwarya [DEBUG] Requested port name: %s\n", name.c_str());
printf("Aishwarya [DEBUG] Total available ports: %zu\n", _vPorts.size());
for (size_t i = 0; i < _vPorts.size(); i++) {
printf("Aishwarya [DEBUG] Checking index %zu\n", i);
printf("Aishwarya [DEBUG] Port name: %s\n", _vPorts.at(i).getName().c_str());
if (name.compare(_vPorts.at(i).getName()) == 0) {
printf("Aishwarya [DEBUG] Match found at index %zu for name: %s\n", i, name.c_str());
return _vPorts.at(i);
}
}
printf("Aishwarya [ERROR] No matching port found for name: %s\n", name.c_str());
printf("Aishwarya [DEBUG] Throwing IllegalArgumentException\n");
for (size_t i = 0; i < _vPorts.size(); i++) {
if (name.compare(_vPorts.at(i).getName()) == 0) {
return _vPorts.at(i);
}
}

Copilot uses AI. Check for mistakes.
throw IllegalArgumentException();
}

Expand Down
Loading