{
frame_broker_h broker = user_data;
frame_context_h context = broker->context;
- frame_direction_e direction;
- frame_h frame;
- int ret;
_D("[__SCLS_EVAS__] Stop");
if (context == NULL) {
return;
}
- frame_context_on_pause(context);
-
- ret = frame_context_get_frame(context, &frame);
- if (ret != FRAME_BROKER_ERROR_NONE) {
- _W("Failed to get frame");
- return;
- }
-
- ret = frame_get_direction(frame, &direction);
- if ((ret == FRAME_BROKER_ERROR_NONE &&
- direction == FRAME_DIRECTION_BACKWARD) ||
- frame == NULL) {
- _D("Destroy context");
- frame_context_destroy(context);
- }
+ _D("Destroy context");
+ frame_context_destroy(context);
}
static frame_context_error_e __convert_error(
static void __scls_evas_cleanup_cb(uint32_t serial, void *user_data)
{
- _D("[__SCLS_EVAS__] Clean Up");
- __scls_evas_stop_cb(serial, user_data);
+ frame_broker_h broker = user_data;
+ frame_context_h context = broker->context;
+ frame_direction_e direction;
+ frame_h frame;
+ int ret;
+
+ _D("[__SCLS_EVAS__] Clean up");
+ if (context == NULL) {
+ _E("Invalid context");
+ return;
+ }
+
+ frame_context_on_pause(context);
+
+ ret = frame_context_get_frame(context, &frame);
+ if (ret != FRAME_BROKER_ERROR_NONE) {
+ _W("Failed to get frame");
+ return;
+ }
+
+ ret = frame_get_direction(frame, &direction);
+ if ((ret == FRAME_BROKER_ERROR_NONE &&
+ direction == FRAME_DIRECTION_BACKWARD) ||
+ frame == NULL) {
+ _D("Destroy context");
+ frame_context_destroy(context);
+ }
}
API int frame_broker_create(Evas_Object *win,