Skip to content

Topic/rdkmve 1680 test#216

Open
Nairisnotavailable wants to merge 3 commits intodevelopfrom
topic/RDKMVE-1680_test
Open

Topic/rdkmve 1680 test#216
Nairisnotavailable wants to merge 3 commits intodevelopfrom
topic/RDKMVE-1680_test

Conversation

@Nairisnotavailable
Copy link
Copy Markdown

No description provided.

@Nairisnotavailable Nairisnotavailable requested a review from a team as a code owner February 24, 2026 16:05
Copilot AI review requested due to automatic review settings February 24, 2026 16:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds debug logging statements to help troubleshoot video output port operations. The PR title "Topic/rdkmve 1680 test" suggests this is a test or debugging branch related to RDKMVE-1680.

Changes:

  • Added debug printf statements to track video output port lookup and resolution setting operations
  • Debug messages include entry/exit logging, parameter values, and error conditions

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.

File Description
ds/videoOutputPortConfig.cpp Added debug logging to track port name lookup in getPort() method
ds/videoOutputPort.cpp Added debug logging to track resolution setting operations and VideoResolution object properties
ds/host.cpp Added debug logging to Host::getVideoOutputPort() method (with compilation errors)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.
Comment on lines +221 to +224
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());
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 +478 to +482
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());
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.
*/
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.
Comment on lines +126 to +140
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");


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.
Comment on lines +468 to +482
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());
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.
Comment on lines +220 to +224
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());
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants