@@ -375,13 +375,6 @@ namespace Plugin {
375
375
}
376
376
else {
377
377
LOGINFO (" Platform Init successful...\n " );
378
- ret = TvSyncCalibrationInfoODM ();
379
- if (ret != tvERROR_NONE) {
380
- LOGERR (" SD3 <->cri_data sync failed, ret: %s \n " , getErrorString (ret).c_str ());
381
- }
382
- else {
383
- LOGERR (" SD3 <->cri_data sync success, ret: %s \n " , getErrorString (ret).c_str ());
384
- }
385
378
}
386
379
387
380
tvVideoFormatCallbackData callbackData = {this ,tvVideoFormatChangeHandler};
@@ -2280,28 +2273,32 @@ namespace Plugin {
2280
2273
2281
2274
uint32_t AVOutputTV::getSupportedDolbyVisionModes (const JsonObject& parameters, JsonObject& response)
2282
2275
{
2283
-
2284
2276
LOGINFO (" Entry\n " );
2285
- pic_modes_t *dvModes;
2277
+ tvDolbyMode_t dvModes[tvMode_Max];
2278
+ tvDolbyMode_t *dvModesPtr = dvModes; // Pointer to statically allocated tvDolbyMode_t array
2286
2279
unsigned short totalAvailable = 0 ;
2287
- tvError_t ret = GetTVSupportedDolbyVisionModesODM (&dvModes,&totalAvailable);
2280
+
2281
+ // Set an initial value to indicate the mode type
2282
+ dvModes[0 ] = tvDolbyMode_Dark;
2283
+
2284
+ tvError_t ret = GetTVSupportedDolbyVisionModes (&dvModesPtr, &totalAvailable);
2288
2285
if (ret != tvERROR_NONE) {
2289
2286
returnResponse (false );
2290
2287
}
2291
2288
else {
2292
2289
JsonArray SupportedDVModes;
2293
2290
2294
2291
for (int count = 0 ;count <totalAvailable;count++ ) {
2295
- SupportedDVModes.Add (dvModes[count]. name );
2292
+ SupportedDVModes.Add (getDolbyModeStringFromEnum ( dvModes[count]) );
2296
2293
}
2297
2294
2298
2295
response[" supportedDVModes" ] = SupportedDVModes;
2299
2296
LOGINFO (" Exit\n " );
2300
2297
returnResponse (true );
2301
2298
}
2302
-
2303
2299
}
2304
2300
2301
+
2305
2302
uint32_t AVOutputTV::getDolbyVisionMode (const JsonObject& parameters, JsonObject& response)
2306
2303
{
2307
2304
LOGINFO (" Entry" );
@@ -2376,7 +2373,7 @@ namespace Plugin {
2376
2373
2377
2374
if ( isSetRequired (" Current" ,source," DV" ) ) {
2378
2375
LOGINFO (" Proceed with setDolbyVisionMode\n\n " );
2379
- ret = SetTVDolbyVisionModeODM ( value.c_str ());
2376
+ ret = SetTVDolbyVisionMode ( GetDolbyVisionEnumFromModeString ( value.c_str () ));
2380
2377
}
2381
2378
2382
2379
if (ret != tvERROR_NONE) {
@@ -2437,7 +2434,7 @@ namespace Plugin {
2437
2434
if ( err == 0 ) {
2438
2435
std::string dolbyModeValue = getDolbyModeStringFromEnum ((tvDolbyMode_t)dolbyMode);
2439
2436
LOGINFO (" %s : getLocalparam success format :%d source : %d format : %d dolbyvalue : %s\n " ,__FUNCTION__,formatIndex, sourceIndex, pqIndex, dolbyModeValue.c_str ());
2440
- ret = SetTVDolbyVisionModeODM (dolbyModeValue. c_str () );
2437
+ ret = SetTVDolbyVisionMode ((tvDolbyMode_t)dolbyMode );
2441
2438
}
2442
2439
else {
2443
2440
LOGERR (" %s : GetLocalParam Failed \n " ,__FUNCTION__);
@@ -2822,7 +2819,7 @@ namespace Plugin {
2822
2819
if ( tr181Success == err ) {
2823
2820
// get curren source and if matches save for that alone
2824
2821
tvVideoSrcType_t current_source = VIDEO_SOURCE_IP;
2825
- GetCurrentSource (¤t_source);
2822
+ GetCurrentVideoSource (¤t_source);
2826
2823
2827
2824
tvVideoFormatType_t current_format = VIDEO_FORMAT_NONE;
2828
2825
GetCurrentVideoFormat (¤t_format);
@@ -3077,7 +3074,7 @@ namespace Plugin {
3077
3074
LOGINFO (" Entry\n " );
3078
3075
tvVideoSrcType_t currentSource = VIDEO_SOURCE_IP;
3079
3076
3080
- tvError_t ret = GetCurrentSource (¤tSource);
3077
+ tvError_t ret = GetCurrentVideoSource (¤tSource);
3081
3078
if (ret != tvERROR_NONE) {
3082
3079
response[" currentVideoSource" ] = " NONE" ;
3083
3080
returnResponse (false );
0 commit comments