|
48 | 48 | #define AVINPUT_METHOD_GET_EDID_VERSION "getEdidVersion"
|
49 | 49 | #define AVINPUT_METHOD_SET_EDID_ALLM_SUPPORT "setEdid2AllmSupport"
|
50 | 50 | #define AVINPUT_METHOD_GET_EDID_ALLM_SUPPORT "getEdid2AllmSupport"
|
| 51 | +#define AVINPUT_METHOD_SET_VRR_SUPPORT "setVRRSupport" |
| 52 | +#define AVINPUT_METHOD_GET_VRR_SUPPORT "getVRRSupport" |
51 | 53 | #define AVINPUT_METHOD_GET_HDMI_COMPATIBILITY_VERSION "getHdmiVersion"
|
52 | 54 | #define AVINPUT_METHOD_SET_MIXER_LEVELS "setMixerLevels"
|
53 | 55 | #define AVINPUT_METHOD_START_INPUT "startInput"
|
|
65 | 67 | #define AVINPUT_EVENT_ON_GAME_FEATURE_STATUS_CHANGED "gameFeatureStatusUpdate"
|
66 | 68 | #define AVINPUT_EVENT_ON_AVI_CONTENT_TYPE_CHANGED "aviContentTypeUpdate"
|
67 | 69 |
|
68 |
| -//demo |
69 | 70 | static bool isAudioBalanceSet = false;
|
70 | 71 | static int planeType = 0;
|
71 | 72 |
|
@@ -232,6 +233,8 @@ void AVInput::RegisterAll()
|
232 | 233 | Register<JsonObject, JsonObject>(_T(AVINPUT_METHOD_SET_MIXER_LEVELS), &AVInput::setMixerLevels, this);
|
233 | 234 | Register<JsonObject, JsonObject>(_T(AVINPUT_METHOD_SET_EDID_ALLM_SUPPORT), &AVInput::setEdid2AllmSupportWrapper, this);
|
234 | 235 | Register<JsonObject, JsonObject>(_T(AVINPUT_METHOD_GET_EDID_ALLM_SUPPORT), &AVInput::getEdid2AllmSupportWrapper, this);
|
| 236 | + Register<JsonObject, JsonObject>(_T(AVINPUT_METHOD_SET_VRR_SUPPORT), &AVInput::setVRRSupportWrapper, this); |
| 237 | + Register<JsonObject, JsonObject>(_T(AVINPUT_METHOD_GET_VRR_SUPPORT), &AVInput::getVRRSupportWrapper, this); |
235 | 238 | Register<JsonObject, JsonObject>(_T(AVINPUT_METHOD_GET_HDMI_COMPATIBILITY_VERSION), &AVInput::getHdmiVersionWrapper, this);
|
236 | 239 | Register<JsonObject, JsonObject>(_T(AVINPUT_METHOD_START_INPUT), &AVInput::startInput, this);
|
237 | 240 | Register<JsonObject, JsonObject>(_T(AVINPUT_METHOD_STOP_INPUT), &AVInput::stopInput, this);
|
@@ -1364,6 +1367,77 @@ uint32_t AVInput::getEdid2AllmSupportWrapper(const JsonObject& parameters, JsonO
|
1364 | 1367 | }
|
1365 | 1368 | }
|
1366 | 1369 |
|
| 1370 | +bool getVRRSupport(int portId,bool *vrrSupportValue) |
| 1371 | +{ |
| 1372 | + bool ret = true; |
| 1373 | + //To implement |
| 1374 | + return ret; |
| 1375 | +} |
| 1376 | + |
| 1377 | +uint32_t AVInput::getVRRSupportWrapper(const JsonObject& parameters, JsonObject& response) |
| 1378 | +{ |
| 1379 | + LOGINFOMETHOD(); |
| 1380 | + string sPortId = parameters["portId"].String(); |
| 1381 | + |
| 1382 | + int portId = 0; |
| 1383 | + bool vrrSupport = true; |
| 1384 | + returnIfParamNotFound(parameters, "portId"); |
| 1385 | + |
| 1386 | + try { |
| 1387 | + portId = stoi(sPortId); |
| 1388 | + }catch (const std::exception& err) { |
| 1389 | + LOGWARN("sPortId invalid paramater: %s ", sPortId.c_str()); |
| 1390 | + returnResponse(false); |
| 1391 | + } |
| 1392 | + |
| 1393 | + bool result = getVRRSupport(portId, &allmSupport); |
| 1394 | + if(result == true) |
| 1395 | + { |
| 1396 | + response["vrrSupport"] = vrrSupport; |
| 1397 | + returnResponse(true); |
| 1398 | + } |
| 1399 | + else |
| 1400 | + { |
| 1401 | + returnResponse(false); |
| 1402 | + } |
| 1403 | +} |
| 1404 | + |
| 1405 | +bool setVRRSupport(int portId, bool vrrSupport) |
| 1406 | +{ |
| 1407 | + bool ret = true; |
| 1408 | + //To implement |
| 1409 | +return ret; |
| 1410 | +} |
| 1411 | + |
| 1412 | +uint32_t AVInput::setVRRSupportWrapper(const JsonObject& parameters, JsonObject& response) |
| 1413 | +{ |
| 1414 | + LOGINFOMETHOD(); |
| 1415 | + |
| 1416 | + returnIfParamNotFound(parameters, "portId"); |
| 1417 | + returnIfParamNotFound(parameters, "vrrSupport"); |
| 1418 | + |
| 1419 | + int portId = 0; |
| 1420 | + string sPortId = parameters["portId"].String(); |
| 1421 | + bool vrrSupport = parameters["vrrSupport"].Boolean(); |
| 1422 | + |
| 1423 | + try { |
| 1424 | + portId = stoi(sPortId); |
| 1425 | + }catch (const std::exception& err) { |
| 1426 | + LOGWARN("sPortId invalid paramater: %s ", sPortId.c_str()); |
| 1427 | + returnResponse(false); |
| 1428 | + } |
| 1429 | + |
| 1430 | + bool result = setVRRSupport(portId, vrrSupport); |
| 1431 | + if(result == true) |
| 1432 | + { |
| 1433 | + returnResponse(true); |
| 1434 | + } |
| 1435 | + else |
| 1436 | + { |
| 1437 | + returnResponse(false); |
| 1438 | + } |
| 1439 | +} |
| 1440 | + |
1367 | 1441 | uint32_t AVInput::setEdidVersionWrapper(const JsonObject& parameters, JsonObject& response)
|
1368 | 1442 | {
|
1369 | 1443 | LOGINFOMETHOD();
|
|
0 commit comments