Skip to content
Open
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
48 changes: 47 additions & 1 deletion AVInput/AVInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "exception.hpp"
#include <vector>
#include <algorithm>
#include <time.h>

#define API_VERSION_NUMBER_MAJOR 1
#define API_VERSION_NUMBER_MINOR 7
Expand Down Expand Up @@ -543,6 +544,13 @@ bool AVInput::setVideoRectangle(int x, int y, int width, int height, int type)
uint32_t AVInput::getInputDevicesWrapper(const JsonObject& parameters, JsonObject& response)
{
LOGINFOMETHOD();
struct timespec ts;

clock_gettime(CLOCK_MONOTONIC, &ts);

LOGERR("RDKEVD-8305 [Wrapper] Entry : %ld.%06ld\n",
ts.tv_sec,
ts.tv_nsec / 1000);
Comment on lines +549 to +553
Comment on lines +549 to +553

if (parameters.HasLabel("typeOfInput")) {
string sType = parameters["typeOfInput"].String();
Expand All @@ -563,6 +571,11 @@ uint32_t AVInput::getInputDevicesWrapper(const JsonObject& parameters, JsonObjec
}
response["devices"] = listHdmi;
}
clock_gettime(CLOCK_MONOTONIC, &ts);

printf("RDKEVD-8305 [wrapper] Exit : %ld.%06ld\n",
ts.tv_sec,
ts.tv_nsec / 1000);
Comment on lines +574 to +578
returnResponse(true);
}

Expand Down Expand Up @@ -613,6 +626,14 @@ uint32_t AVInput::readEDIDWrapper(const JsonObject& parameters, JsonObject& resp
JsonArray AVInput::getInputDevices(int iType)
{
JsonArray list;
struct timespec ts;

clock_gettime(CLOCK_MONOTONIC, &ts);

LOGERR("RDKEVD-8305 [THUNDER] Entry : %ld.%06ld\n",
ts.tv_sec,
ts.tv_nsec / 1000);
Comment on lines +631 to +635

try
{
int num = 0;
Expand All @@ -631,21 +652,46 @@ JsonArray AVInput::getInputDevices(int iType)
std::stringstream locator;
if (iType == HDMI) {
locator << "hdmiin://localhost/deviceid/" << i;
clock_gettime(CLOCK_MONOTONIC, &ts);

LOGERR("RDKEVD-8305 [HDMI port : %d] Entry : %d %ld.%06ld\n",i,
ts.tv_sec,
ts.tv_nsec / 1000);
Comment on lines +657 to +659
Comment on lines +655 to +659
hash["connected"] = device::HdmiInput::getInstance().isPortConnected(i);
clock_gettime(CLOCK_MONOTONIC, &ts);

LOGERR("RDKEVD-8305 [HDMI port : %d] Exit : %d %ld.%06ld\n",i,
ts.tv_sec,
ts.tv_nsec / 1000);
Comment on lines +663 to +665
Comment on lines +661 to +665
}
else if (iType == COMPOSITE) {
locator << "cvbsin://localhost/deviceid/" << i;
clock_gettime(CLOCK_MONOTONIC, &ts);

LOGERR("RDKEVD-8305 [HDMI port : %d] Entry : %d %ld.%06ld\n",i,
ts.tv_sec,
ts.tv_nsec / 1000);
Comment on lines +671 to +673
Comment on lines +669 to +673
hash["connected"] = device::CompositeInput::getInstance().isPortConnected(i);
clock_gettime(CLOCK_MONOTONIC, &ts);

LOGERR("RDKEVD-8305 [composite port : %d] Exit : %d %ld.%06ld\n",i,
ts.tv_sec,
ts.tv_nsec / 1000);
Comment on lines +677 to +679
Comment on lines +675 to +679
}
hash["locator"] = locator.str();
LOGWARN("AVInputService::getInputDevices id %d, locator=[%s], connected=[%d]", i, hash["locator"].String().c_str(), hash["connected"].Boolean());
LOGERR("AVInputService::getInputDevices id %d, locator=[%s], connected=[%d]", i, hash["locator"].String().c_str(), hash["connected"].Boolean());
list.Add(hash);
}
}
}
catch (const std::exception &e) {
LOGWARN("AVInputService::getInputDevices Failed");
}
clock_gettime(CLOCK_MONOTONIC, &ts);

printf("RDKEVD-8305 [THUNDER] Exit : %ld.%06ld\n",
ts.tv_sec,
ts.tv_nsec / 1000);
Comment on lines +690 to +694
Comment on lines +690 to +694
return list;
}

Expand Down