default_backend: implements frame_duration to proceed each frame at a different speed
[platform/core/uifw/libpui.git] / backends / default_backend.c
index bc13c94..8ed95cf 100644 (file)
@@ -267,6 +267,12 @@ _read_json(const char *path)
                //printf("\tframe id: %d\n", json_object_get_int(frame_data_obj));
                frame_id = json_object_get_int(frame_data_obj);
 
+               frame_data_obj = json_object_object_get(frame_obj, "frame_duration");
+               if (frame_data_obj)
+                       ani_info->frames[frame_id - 1].frame_duration = json_object_get_int(frame_data_obj);
+               else
+                       ani_info->frames[frame_id - 1].frame_duration = ani_info->interval;
+
                frame_data_obj = json_object_object_get(frame_obj, "led");
                led_len = json_object_array_length(frame_data_obj);