@@ -4075,44 +4075,55 @@ namespace Plugin {
40754075
40764076 uint32_t AVOutputTV::getVideoSourceCaps (const JsonObject& parameters, JsonObject& response)
40774077 {
4078+ tvVideoSrcType_t sources[VIDEO_SOURCE_MAX] = { VIDEO_SOURCE_IP };
4079+ tvVideoSrcType_t *sourcePtr[VIDEO_SOURCE_MAX] = { 0 };
4080+ unsigned short numOfSources = 0 ;
4081+ for (int i = 0 ; i < VIDEO_SOURCE_MAX; i++)
4082+ {
4083+ sourcePtr[i] = &sources[i];
4084+ }
40784085
4079- JsonArray rangeArray;
4080-
4081- std::vector<std::string> range;
4082- std::vector<std::string> pqmode;
4083- std::vector<std::string> source;
4084- std::vector<std::string> format;
4085-
4086- if (getCapabilitySource (rangeArray) != 0 ) {
4086+ tvError_t ret = GetTVSupportedVideoSources (sourcePtr, &numOfSources);
4087+ if (ret != tvERROR_NONE) {
40874088 returnResponse (false );
40884089 }
4089- response[" options" ]=rangeArray;
4090- LOGINFO (" Exit\n " );
4091- returnResponse (true );
4090+ else {
4091+ JsonArray supportedVideoSources;
4092+ for (int count = 0 ;count <numOfSources;count++ ) {
4093+ supportedVideoSources.Add (convertSourceIndexToStringV2 (int (sources[count])));
4094+ }
4095+
4096+ response[" options" ] = supportedVideoSources;
4097+ LOGINFO (" Exit\n " );
4098+ returnResponse (true );
4099+ }
40924100 }
40934101
40944102 uint32_t AVOutputTV::getVideoFormatCaps (const JsonObject& parameters, JsonObject& response)
40954103 {
40964104
4097- JsonArray rangeArray;
4098-
4099- capVectors_t info;
4100-
4101- tvError_t ret = getParamsCaps (" VideoFormat" ,info);
4105+ tvVideoFormatType_t formats[VIDEO_FORMAT_MAX] = { VIDEO_FORMAT_SDR };
4106+ tvVideoFormatType_t *formatPtr[VIDEO_FORMAT_MAX] = { 0 };
4107+ unsigned short numOfFormats = 0 ;
4108+ for (int i = 0 ; i < VIDEO_FORMAT_MAX; i++)
4109+ {
4110+ formatPtr[i] = &formats[i];
4111+ }
41024112
4113+ tvError_t ret = GetTVSupportedVideoFormats (formatPtr, &numOfFormats);
41034114 if (ret != tvERROR_NONE) {
41044115 returnResponse (false );
41054116 }
41064117 else {
4107- if ((info.rangeVector .front ()).compare (" none" ) != 0 ) {
4108- for (unsigned int index = 0 ; index < info.rangeVector .size (); index++) {
4109- rangeArray.Add (info.rangeVector [index]);
4110- }
4111- response[" options" ]=rangeArray;
4118+ JsonArray supportedVideoFormats;
4119+ for (int count = 0 ;count <numOfFormats;count++ ) {
4120+ supportedVideoFormats.Add (convertVideoFormatToStringV2 (int (formats[count])));
41124121 }
4122+
4123+ response[" options" ] = supportedVideoFormats;
4124+ LOGINFO (" Exit\n " );
4125+ returnResponse (true );
41134126 }
4114- LOGINFO (" Exit\n " );
4115- returnResponse (true );
41164127 }
41174128
41184129 uint32_t AVOutputTV::getVideoFrameRateCaps (const JsonObject& parameters, JsonObject& response)
0 commit comments