@@ -375,13 +375,6 @@ namespace Plugin {
375375 }
376376 else {
377377 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- }
385378 }
386379
387380 tvVideoFormatCallbackData callbackData = {this ,tvVideoFormatChangeHandler};
@@ -2282,17 +2275,22 @@ namespace Plugin {
22822275 {
22832276
22842277 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
22862280 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);
22882286 if (ret != tvERROR_NONE) {
22892287 returnResponse (false );
22902288 }
22912289 else {
22922290 JsonArray SupportedDVModes;
22932291
22942292 for (int count = 0 ;count <totalAvailable;count++ ) {
2295- SupportedDVModes.Add (dvModes[count]. name );
2293+ SupportedDVModes.Add (getDolbyModeStringFromEnum ( dvModes[count]) );
22962294 }
22972295
22982296 response[" supportedDVModes" ] = SupportedDVModes;
@@ -2376,7 +2374,7 @@ namespace Plugin {
23762374
23772375 if ( isSetRequired (" Current" ,source," DV" ) ) {
23782376 LOGINFO (" Proceed with setDolbyVisionMode\n\n " );
2379- ret = SetTVDolbyVisionModeODM ( value.c_str ());
2377+ ret = SetTVDolbyVisionMode ( GetDolbyVisionEnumFromModeString ( value.c_str () ));
23802378 }
23812379
23822380 if (ret != tvERROR_NONE) {
@@ -2437,7 +2435,7 @@ namespace Plugin {
24372435 if ( err == 0 ) {
24382436 std::string dolbyModeValue = getDolbyModeStringFromEnum ((tvDolbyMode_t)dolbyMode);
24392437 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 );
24412439 }
24422440 else {
24432441 LOGERR (" %s : GetLocalParam Failed \n " ,__FUNCTION__);
@@ -2822,7 +2820,7 @@ namespace Plugin {
28222820 if ( tr181Success == err ) {
28232821 // get curren source and if matches save for that alone
28242822 tvVideoSrcType_t current_source = VIDEO_SOURCE_IP;
2825- GetCurrentSource (¤t_source);
2823+ GetCurrentVideoSource (¤t_source);
28262824
28272825 tvVideoFormatType_t current_format = VIDEO_FORMAT_NONE;
28282826 GetCurrentVideoFormat (¤t_format);
@@ -3077,7 +3075,7 @@ namespace Plugin {
30773075 LOGINFO (" Entry\n " );
30783076 tvVideoSrcType_t currentSource = VIDEO_SOURCE_IP;
30793077
3080- tvError_t ret = GetCurrentSource (¤tSource);
3078+ tvError_t ret = GetCurrentVideoSource (¤tSource);
30813079 if (ret != tvERROR_NONE) {
30823080 response[" currentVideoSource" ] = " NONE" ;
30833081 returnResponse (false );
0 commit comments