diff --git a/ds/host.cpp b/ds/host.cpp index aae3453b..cf5685a1 100644 --- a/ds/host.cpp +++ b/ds/host.cpp @@ -217,7 +217,11 @@ Host::~Host() */ VideoOutputPort &Host::getVideoOutputPort(int id) { + 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()); } diff --git a/ds/videoOutputPort.cpp b/ds/videoOutputPort.cpp index c77aa5c4..a779b43e 100644 --- a/ds/videoOutputPort.cpp +++ b/ds/videoOutputPort.cpp @@ -465,12 +465,21 @@ bool VideoOutputPort::isDynamicResolutionSupported() const */ void VideoOutputPort::setResolution(const std::string &resolutionName, bool persist/* = true*/, bool isIgnoreEdid/* = false*/) { + 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()); dsVideoPortResolution_t resolution; memset(&resolution, 0, sizeof(resolution)); diff --git a/ds/videoOutputPortConfig.cpp b/ds/videoOutputPortConfig.cpp index 8f1e475c..d5e192fe 100644 --- a/ds/videoOutputPortConfig.cpp +++ b/ds/videoOutputPortConfig.cpp @@ -123,12 +123,21 @@ VideoOutputPort &VideoOutputPortConfig::getPort(int id) 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"); + throw IllegalArgumentException(); }