@@ -868,7 +868,7 @@ namespace Plugin {
868
868
869
869
uint32_t AVOutputTV::getBacklightCapsV2 (const JsonObject& parameters, JsonObject& response) {
870
870
return getPQCapabilityWithContext ([this ]( tvContextCaps_t** context_caps, int * max_backlight) {
871
- #if HAL_NOT_READY
871
+ #if ENABLE_CAPS_SUPPORT_FROM_PLUGIN
872
872
return this ->GetBacklightCaps (max_backlight, context_caps);
873
873
#else
874
874
return GetBacklightCaps (max_backlight, context_caps);
@@ -878,7 +878,7 @@ namespace Plugin {
878
878
879
879
uint32_t AVOutputTV::getBrightnessCapsV2 (const JsonObject& parameters, JsonObject& response) {
880
880
return getPQCapabilityWithContext ([this ]( tvContextCaps_t** context_caps, int * max_brightness) {
881
- #if HAL_NOT_READY
881
+ #if ENABLE_CAPS_SUPPORT_FROM_PLUGIN
882
882
return this ->GetBrightnessCaps (max_brightness, context_caps);
883
883
#else
884
884
return GetBrightnessCaps (max_brightness, context_caps);
@@ -889,7 +889,7 @@ namespace Plugin {
889
889
890
890
uint32_t AVOutputTV::getContrastCapsV2 (const JsonObject& parameters, JsonObject& response) {
891
891
return getPQCapabilityWithContext ([this ](tvContextCaps_t** context_caps, int * max_contrast) {
892
- #if HAL_NOT_READY
892
+ #if ENABLE_CAPS_SUPPORT_FROM_PLUGIN
893
893
return this ->GetContrastCaps (max_contrast, context_caps);
894
894
#else
895
895
return GetContrastCaps (max_contrast, context_caps);
@@ -900,7 +900,7 @@ namespace Plugin {
900
900
901
901
uint32_t AVOutputTV::getSharpnessCapsV2 (const JsonObject& parameters, JsonObject& response) {
902
902
return getPQCapabilityWithContext ([this ](tvContextCaps_t** context_caps, int * max_sharpness) {
903
- #if HAL_NOT_READY
903
+ #if ENABLE_CAPS_SUPPORT_FROM_PLUGIN
904
904
return this ->GetSharpnessCaps (max_sharpness, context_caps);
905
905
#else
906
906
return GetSharpnessCaps (max_sharpness, context_caps);
@@ -911,7 +911,7 @@ namespace Plugin {
911
911
912
912
uint32_t AVOutputTV::getSaturationCapsV2 (const JsonObject& parameters, JsonObject& response) {
913
913
return getPQCapabilityWithContext ([this ](tvContextCaps_t** context_caps, int * max_saturation) {
914
- #if HAL_NOT_READY
914
+ #if ENABLE_CAPS_SUPPORT_FROM_PLUGIN
915
915
return this ->GetSaturationCaps (max_saturation, context_caps);
916
916
#else
917
917
return GetSaturationCaps (max_saturation, context_caps);
@@ -922,7 +922,7 @@ namespace Plugin {
922
922
923
923
uint32_t AVOutputTV::getHueCapsV2 (const JsonObject& parameters, JsonObject& response) {
924
924
return getPQCapabilityWithContext ([this ]( tvContextCaps_t** context_caps, int * max_hue) {
925
- #if HAL_NOT_READY
925
+ #if ENABLE_CAPS_SUPPORT_FROM_PLUGIN
926
926
return this ->GetHueCaps (max_hue, context_caps);
927
927
#else
928
928
return GetHueCaps (max_hue, context_caps);
@@ -933,7 +933,7 @@ namespace Plugin {
933
933
934
934
uint32_t AVOutputTV::getPrecisionDetailCaps (const JsonObject& parameters, JsonObject& response) {
935
935
return getPQCapabilityWithContext ([this ](tvContextCaps_t** context_caps, int * max_precision) {
936
- #if HAL_NOT_READY
936
+ #if ENABLE_CAPS_SUPPORT_FROM_PLUGIN
937
937
return this ->GetPrecisionDetailCaps (max_precision, context_caps);
938
938
#else
939
939
return GetPrecisionDetailCaps (max_precision, context_caps);
@@ -944,7 +944,7 @@ namespace Plugin {
944
944
945
945
uint32_t AVOutputTV::getLocalContrastEnhancementCaps (const JsonObject& parameters, JsonObject& response) {
946
946
return getPQCapabilityWithContext ([this ](tvContextCaps_t** context_caps, int * max_val) {
947
- #if HAL_NOT_READY
947
+ #if ENABLE_CAPS_SUPPORT_FROM_PLUGIN
948
948
return this ->GetLocalContrastEnhancementCaps (max_val, context_caps);
949
949
#else
950
950
return GetLocalContrastEnhancementCaps (max_val, context_caps);
@@ -955,7 +955,7 @@ namespace Plugin {
955
955
956
956
uint32_t AVOutputTV::getMPEGNoiseReductionCaps (const JsonObject& parameters, JsonObject& response) {
957
957
return getPQCapabilityWithContext ([this ](tvContextCaps_t** context_caps, int * max_val) {
958
- #if HAL_NOT_READY
958
+ #if ENABLE_CAPS_SUPPORT_FROM_PLUGIN
959
959
return this ->GetMPEGNoiseReductionCaps (max_val, context_caps);
960
960
#else
961
961
return GetMPEGNoiseReductionCaps (max_val, context_caps);
@@ -966,7 +966,7 @@ namespace Plugin {
966
966
967
967
uint32_t AVOutputTV::getDigitalNoiseReductionCaps (const JsonObject& parameters, JsonObject& response) {
968
968
return getPQCapabilityWithContext ([this ](tvContextCaps_t** context_caps, int * max_val) {
969
- #if HAL_NOT_READY
969
+ #if ENABLE_CAPS_SUPPORT_FROM_PLUGIN
970
970
return this ->GetDigitalNoiseReductionCaps (max_val, context_caps);
971
971
#else
972
972
return GetDigitalNoiseReductionCaps (max_val, context_caps);
@@ -977,7 +977,7 @@ namespace Plugin {
977
977
978
978
uint32_t AVOutputTV::getAISuperResolutionCaps (const JsonObject& parameters, JsonObject& response) {
979
979
return getPQCapabilityWithContext ([this ](tvContextCaps_t** context_caps, int * max_val) {
980
- #if HAL_NOT_READY
980
+ #if ENABLE_CAPS_SUPPORT_FROM_PLUGIN
981
981
return this ->GetAISuperResolutionCaps (max_val, context_caps);
982
982
#else
983
983
return GetAISuperResolutionCaps (max_val, context_caps);
@@ -1023,7 +1023,7 @@ namespace Plugin {
1023
1023
}
1024
1024
response[" uiMatrixPositions" ] = uiPosArray;
1025
1025
response[" context" ] = parseContextCaps (context_caps);
1026
- #if HAL_NOT_READY
1026
+ #if ENABLE_CAPS_SUPPORT_FROM_PLUGIN
1027
1027
// TODO:: Review cleanup once HAL is available, as memory will be allocated in HAL.
1028
1028
delete[] ui_matrix_positions;
1029
1029
#endif
@@ -1033,7 +1033,7 @@ namespace Plugin {
1033
1033
1034
1034
uint32_t AVOutputTV::getMEMCCaps (const JsonObject& parameters, JsonObject& response) {
1035
1035
return getPQCapabilityWithContext ([this ](tvContextCaps_t** context_caps, int * max_val) {
1036
- #if HAL_NOT_READY
1036
+ #if ENABLE_CAPS_SUPPORT_FROM_PLUGIN
1037
1037
return this ->GetMEMCCaps (max_val, context_caps);
1038
1038
#else
1039
1039
return GetMEMCCaps (max_val, context_caps);
@@ -1044,7 +1044,7 @@ namespace Plugin {
1044
1044
1045
1045
uint32_t AVOutputTV::getLowLatencyStateCapsV2 (const JsonObject& parameters, JsonObject& response) {
1046
1046
return getPQCapabilityWithContext ([this ](tvContextCaps_t** context_caps, int * max_latency) {
1047
- #if HAL_NOT_READY
1047
+ #if ENABLE_CAPS_SUPPORT_FROM_PLUGIN
1048
1048
return this ->GetLowLatencyStateCaps (max_latency, context_caps);
1049
1049
#else
1050
1050
return GetLowLatencyStateCaps (max_latency, context_caps);
@@ -1103,7 +1103,7 @@ namespace Plugin {
1103
1103
response[" options" ] = optionsArray;
1104
1104
response[" context" ] = parseContextCaps (context_caps);
1105
1105
1106
- #if HAL_NOT_READY
1106
+ #if ENABLE_CAPS_SUPPORT_FROM_PLUGIN
1107
1107
free (color_temp);
1108
1108
#endif
1109
1109
@@ -1141,7 +1141,7 @@ namespace Plugin {
1141
1141
1142
1142
response[" context" ] = parseContextCaps (context_caps);
1143
1143
1144
- #if HAL_NOT_READY
1144
+ #if ENABLE_CAPS_SUPPORT_FROM_PLUGIN
1145
1145
free (sdr_gamma);
1146
1146
#endif
1147
1147
@@ -1172,7 +1172,7 @@ namespace Plugin {
1172
1172
1173
1173
response[" context" ] = parseContextCaps (context_caps);
1174
1174
1175
- #if HAL_NOT_READY
1175
+ #if ENABLE_CAPS_SUPPORT_FROM_PLUGIN
1176
1176
free (dimming_mode);
1177
1177
#endif
1178
1178
@@ -1194,7 +1194,7 @@ namespace Plugin {
1194
1194
1195
1195
response[" context" ] = parseContextCaps (m_aspectRatioCaps);
1196
1196
1197
- #if HAL_NOT_READY
1197
+ #if ENABLE_CAPS_SUPPORT_FROM_PLUGIN
1198
1198
free (m_aspectRatio);
1199
1199
#endif
1200
1200
@@ -1216,7 +1216,7 @@ namespace Plugin {
1216
1216
1217
1217
response[" context" ] = parseContextCaps (m_pictureModeCaps);
1218
1218
1219
- #if HAL_NOT_READY
1219
+ #if ENABLE_CAPS_SUPPORT_FROM_PLUGIN
1220
1220
free (m_pictureModes);
1221
1221
#endif
1222
1222
@@ -1248,7 +1248,7 @@ namespace Plugin {
1248
1248
1249
1249
response[" context" ] = parseContextCaps (m_backlightModeCaps);
1250
1250
1251
- #if HAL_NOT_READY
1251
+ #if ENABLE_CAPS_SUPPORT_FROM_PLUGIN
1252
1252
// TODO: Review cleanup once HAL is available, as memory will be allocated in HAL.
1253
1253
free (m_backlightModes);
1254
1254
#endif
@@ -1288,7 +1288,7 @@ namespace Plugin {
1288
1288
// Indicate success
1289
1289
response[" success" ] = true ;
1290
1290
1291
- #if HAL_NOT_READY
1291
+ #if ENABLE_CAPS_SUPPORT_FROM_PLUGIN
1292
1292
// TODO: Clean up when HAL handles memory
1293
1293
delete min_values;
1294
1294
delete max_values;
@@ -1591,80 +1591,43 @@ namespace Plugin {
1591
1591
1592
1592
uint32_t AVOutputTV::resetPrecisionDetail (const JsonObject& parameters, JsonObject& response)
1593
1593
{
1594
- #if HAL_NOT_READY
1595
- bool success = false ;
1596
- #else
1597
1594
bool success = resetPQParamToDefault (parameters, " PrecisionDetail" ,
1598
1595
PQ_PARAM_PRECISION_DETAIL, SetPrecisionDetail);
1599
- #endif
1600
1596
returnResponse (success);
1601
1597
}
1602
1598
1603
1599
uint32_t AVOutputTV::resetLocalContrastEnhancement (const JsonObject& parameters, JsonObject& response)
1604
1600
{
1605
- #if HAL_NOT_READY
1606
- bool success = false ;
1607
- #else
1608
- #if ENABLE_PQ_PARAM
1609
1601
bool success = resetPQParamToDefault (parameters, " LocalContrastEnhancement" ,
1610
1602
PQ_PARAM_LOCAL_CONTRAST_ENHANCEMENT, SetLocalContrastEnhancement);
1611
- #else
1612
- bool success = true ;
1613
- #endif
1614
- #endif
1615
1603
returnResponse (success);
1616
1604
}
1617
1605
1618
1606
uint32_t AVOutputTV::resetMPEGNoiseReduction (const JsonObject& parameters, JsonObject& response)
1619
1607
{
1620
- #if HAL_NOT_READY
1621
- bool success = false ;
1622
- #else
1623
- #if ENABLE_PQ_PARAM
1624
1608
bool success = resetPQParamToDefault (parameters, " MPEGNoiseReduction" ,
1625
1609
PQ_PARAM_MPEG_NOISE_REDUCTION, SetMPEGNoiseReduction);
1626
- #else
1627
- bool success = true ;
1628
- #endif
1629
- #endif
1630
1610
returnResponse (success);
1631
1611
}
1632
1612
1633
1613
uint32_t AVOutputTV::resetDigitalNoiseReduction (const JsonObject& parameters, JsonObject& response)
1634
1614
{
1635
- #if HAL_NOT_READY
1636
- bool success = false ;
1637
- #else
1638
- #if ENABLE_PQ_PARAM
1639
1615
bool success = resetPQParamToDefault (parameters, " DigitalNoiseReduction" ,
1640
1616
PQ_PARAM_DIGITAL_NOISE_REDUCTION, SetDigitalNoiseReduction);
1641
- #else
1642
- bool success = true ;
1643
- #endif
1644
-
1645
- #endif
1646
1617
returnResponse (success);
1647
1618
}
1648
1619
1649
1620
uint32_t AVOutputTV::resetMEMC (const JsonObject& parameters, JsonObject& response)
1650
1621
{
1651
- #if HAL_NOT_READY
1652
- bool success = false ;
1653
- #else
1654
1622
bool success = resetPQParamToDefault (parameters, " MEMC" ,
1655
1623
PQ_PARAM_MEMC, SetMEMC);
1656
- #endif
1657
1624
returnResponse (success);
1658
1625
}
1659
1626
1660
1627
uint32_t AVOutputTV::resetAISuperResolution (const JsonObject& parameters, JsonObject& response)
1661
1628
{
1662
- #if HAL_NOT_READY
1663
- bool success= false ;
1664
- #else
1665
1629
bool success= resetPQParamToDefault (parameters," AISuperResolution" ,
1666
1630
PQ_PARAM_AI_SUPER_RESOLUTION, SetAISuperResolution);
1667
- #endif
1668
1631
returnResponse (success);
1669
1632
}
1670
1633
@@ -1805,14 +1768,11 @@ namespace Plugin {
1805
1768
LOGINFO (" currentPQMode: %d, currentFmt: %d, currentSrc: %d" , currentPQMode, currentFmt, currentSrc);
1806
1769
1807
1770
if (isSetRequiredForParam (parameters, tr181ParamName)) {
1808
- #if HAL_NOT_READY
1809
- #else
1810
1771
tvError_t ret = halSetter (currentSrc, currentPQMode, currentFmt, value);
1811
1772
if (ret != tvERROR_NONE) {
1812
1773
LOGERR (" HAL setter failed for %s" , inputParamName.c_str ());
1813
1774
returnResponse (false );
1814
1775
}
1815
- #endif
1816
1776
}
1817
1777
1818
1778
// Persist
@@ -1868,7 +1828,6 @@ namespace Plugin {
1868
1828
1869
1829
uint32_t AVOutputTV::setLocalContrastEnhancement (const JsonObject& parameters, JsonObject& response)
1870
1830
{
1871
- #if ENABLE_PQ_PARAM
1872
1831
return setContextPQParam (
1873
1832
parameters, response,
1874
1833
" localContrastEnhancement" , " LocalContrastEnhancement" ,
@@ -1878,14 +1837,10 @@ namespace Plugin {
1878
1837
return SetLocalContrastEnhancement (src, mode, fmt, val);
1879
1838
}
1880
1839
);
1881
- #else
1882
- returnResponse (true );
1883
- #endif
1884
1840
}
1885
1841
1886
1842
uint32_t AVOutputTV::setMPEGNoiseReduction (const JsonObject& parameters, JsonObject& response)
1887
1843
{
1888
- #if ENABLE_PQ_PARAM
1889
1844
return setContextPQParam (
1890
1845
parameters, response,
1891
1846
" mpegNoiseReduction" , " MPEGNoiseReduction" ,
@@ -1895,14 +1850,10 @@ namespace Plugin {
1895
1850
return SetMPEGNoiseReduction (src, mode, fmt, val);
1896
1851
}
1897
1852
);
1898
- #else
1899
- returnResponse (true );
1900
- #endif
1901
1853
}
1902
1854
1903
1855
uint32_t AVOutputTV::setDigitalNoiseReduction (const JsonObject& parameters, JsonObject& response)
1904
1856
{
1905
- #if ENABLE_PQ_PARAM
1906
1857
return setContextPQParam (
1907
1858
parameters, response,
1908
1859
" digitalNoiseReduction" , " DigitalNoiseReduction" ,
@@ -1912,9 +1863,6 @@ namespace Plugin {
1912
1863
return SetDigitalNoiseReduction (src, mode, fmt, val);
1913
1864
}
1914
1865
);
1915
- #else
1916
- returnResponse (true );
1917
- #endif
1918
1866
}
1919
1867
1920
1868
uint32_t AVOutputTV::getBacklight (const JsonObject& parameters, JsonObject& response)
@@ -4440,7 +4388,7 @@ namespace Plugin {
4440
4388
if (ctx.videoSrcType == currentSrc && ctx.videoFormatType == currentFmt) {
4441
4389
if (SetTVPictureMode (mode.c_str ()) != tvERROR_NONE) {
4442
4390
LOGERR (" SetTVPictureMode failed for mode: %s" , mode.c_str ());
4443
- continue ;
4391
+ return false ;
4444
4392
}
4445
4393
}
4446
4394
// TODO:: Revisit this logic. Have to revert if HAL call fails.
@@ -5384,7 +5332,7 @@ namespace Plugin {
5384
5332
}
5385
5333
response[" component" ] = componentJson;
5386
5334
response[" context" ] = parseContextCaps (context_caps);
5387
- #if HAL_NOT_READY
5335
+ #if ENABLE_CAPS_SUPPORT_FROM_PLUGIN
5388
5336
// Clean up dynamic memory
5389
5337
delete[] colorArray;
5390
5338
delete[] componentArray;
@@ -5893,7 +5841,7 @@ namespace Plugin {
5893
5841
response[" color" ] = colorJson;
5894
5842
response[" context" ] = parseContextCaps (context_caps);
5895
5843
5896
- #if HAL_NOT_READY
5844
+ #if ENABLE_CAPS_SUPPORT_FROM_PLUGIN
5897
5845
delete[] colorArray;
5898
5846
delete[] controlArray;
5899
5847
#endif
0 commit comments