@@ -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};
@@ -2282,17 +2275,22 @@ namespace Plugin {
2282
2275
{
2283
2276
2284
2277
LOGINFO (" Entry\n " );
2285
- pic_modes_t *dvModes;
2278
+ tvDolbyMode_t dvModes[tvMode_Max];
2279
+ tvDolbyMode_t *dvModesPtr = dvModes; // Pointer to statically allocated tvDolbyMode_t array
2286
2280
unsigned short totalAvailable = 0 ;
2287
- tvError_t ret = GetTVSupportedDolbyVisionModesODM (&dvModes,&totalAvailable);
2281
+
2282
+ // Set an initial value to indicate the mode type
2283
+ dvModes[0 ] = tvDolbyMode_Dark;
2284
+
2285
+ tvError_t ret = GetTVSupportedDolbyVisionModes (&dvModesPtr, &totalAvailable);
2288
2286
if (ret != tvERROR_NONE) {
2289
2287
returnResponse (false );
2290
2288
}
2291
2289
else {
2292
2290
JsonArray SupportedDVModes;
2293
2291
2294
2292
for (int count = 0 ;count <totalAvailable;count++ ) {
2295
- SupportedDVModes.Add (dvModes[count]. name );
2293
+ SupportedDVModes.Add (getDolbyModeStringFromEnum ( dvModes[count]) );
2296
2294
}
2297
2295
2298
2296
response[" supportedDVModes" ] = SupportedDVModes;
@@ -2376,7 +2374,7 @@ namespace Plugin {
2376
2374
2377
2375
if ( isSetRequired (" Current" ,source," DV" ) ) {
2378
2376
LOGINFO (" Proceed with setDolbyVisionMode\n\n " );
2379
- ret = SetTVDolbyVisionModeODM ( value.c_str ());
2377
+ ret = SetTVDolbyVisionMode ( GetDolbyVisionEnumFromModeString ( value.c_str () ));
2380
2378
}
2381
2379
2382
2380
if (ret != tvERROR_NONE) {
@@ -2437,7 +2435,7 @@ namespace Plugin {
2437
2435
if ( err == 0 ) {
2438
2436
std::string dolbyModeValue = getDolbyModeStringFromEnum ((tvDolbyMode_t)dolbyMode);
2439
2437
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 () );
2438
+ ret = SetTVDolbyVisionMode ((tvDolbyMode_t)dolbyMode );
2441
2439
}
2442
2440
else {
2443
2441
LOGERR (" %s : GetLocalParam Failed \n " ,__FUNCTION__);
@@ -2822,7 +2820,7 @@ namespace Plugin {
2822
2820
if ( tr181Success == err ) {
2823
2821
// get curren source and if matches save for that alone
2824
2822
tvVideoSrcType_t current_source = VIDEO_SOURCE_IP;
2825
- GetCurrentSource (¤t_source);
2823
+ GetCurrentVideoSource (¤t_source);
2826
2824
2827
2825
tvVideoFormatType_t current_format = VIDEO_FORMAT_NONE;
2828
2826
GetCurrentVideoFormat (¤t_format);
@@ -3077,7 +3075,7 @@ namespace Plugin {
3077
3075
LOGINFO (" Entry\n " );
3078
3076
tvVideoSrcType_t currentSource = VIDEO_SOURCE_IP;
3079
3077
3080
- tvError_t ret = GetCurrentSource (¤tSource);
3078
+ tvError_t ret = GetCurrentVideoSource (¤tSource);
3081
3079
if (ret != tvERROR_NONE) {
3082
3080
response[" currentVideoSource" ] = " NONE" ;
3083
3081
returnResponse (false );
0 commit comments