static void utc_emotion_shutdown_p(void)
{
	signal(SIGSEGV, sigprocess);
	
    Eina_Bool res = emotion_shutdown();

	if (EINA_FALSE == res) {
		tet_printf("[TET_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
		tet_result(TET_FAIL);
		return;
	}

	tet_printf("[TET_PASS]:: %s[%d] : Test has passed..", __FILE__, __LINE__);
	tet_result(TET_PASS);
}
예제 #2
0
파일: emotion_smart.c 프로젝트: wargio/efl
static void
_smart_data_free(Smart_Data *sd)
{
#ifdef HAVE_EIO
   /* Only cancel the load_xattr or we will loose ref to time_seek stringshare */
   if (sd->load_xattr) eio_file_cancel(sd->load_xattr);
   sd->load_xattr = NULL;
   if (sd->save_xattr) eio_file_cancel(sd->save_xattr);
   sd->save_xattr = NULL;
#endif
   
   if (sd->engine_instance)
     {
        emotion_engine_instance_file_close(sd->engine_instance);
        emotion_engine_instance_del(sd->engine_instance);
     }
   sd->engine_instance = NULL;
   if (sd->obj) evas_object_del(sd->obj);
   sd->obj = NULL;
   if (sd->crop.clipper) evas_object_del(sd->crop.clipper);
   sd->crop.clipper = NULL;
   if (sd->bg) evas_object_del(sd->bg);
   sd->bg = NULL;
   if (sd->file) eina_stringshare_del(sd->file);
   sd->file = NULL;
   if (sd->job) ecore_job_del(sd->job);
   sd->job = NULL;
   if (sd->anim) ecore_animator_del(sd->anim);
   sd->anim = NULL;
   free(sd->progress.info);
   sd->progress.info = NULL;
   free(sd->ref.file);
   sd->ref.file = NULL;
   free(sd);

   /* TODO: remove legacy: emotion used to have no shutdown, call automatically */
   emotion_shutdown();
}
예제 #3
0
파일: main.c 프로젝트: Naruto/play_emotion
int main(int argc, char** argv) {
  Eina_Bool ret;
  Ecore_Evas *ecore_evas;
  Evas *evas;
  Evas_Object *bg, *video;
  Evas_Map *m;

  if(argc != 2) {
    fprintf(stderr, "Usage: %s moviefile\n", argv[0]);
    return 1;
  }

  ecore_init();
  ecore_evas_init();
  emotion_init();

  ecore_evas = ecore_evas_new
    ("software_x11", 300, 200, WINDOW_WIDTH, WINDOW_HEIGHT, NULL);
   if (!ecore_evas)
     goto end;

  ecore_evas_callback_delete_request_set(ecore_evas, main_delete_request);
  // ecore_evas_callback_resize_set(ecore_evas, main_resize);
  ecore_evas_title_set(ecore_evas, "Evas Media Test Program");
  // ecore_evas_name_class_set(ecore_evas, "evas_media_test", "main");
  ecore_evas_show(ecore_evas);

  evas = ecore_evas_get(ecore_evas);

  bg = evas_object_rectangle_add(evas);
  evas_object_color_set(bg, 0x00, 0x00, 0x00, 0xff);
  evas_object_move(bg, 0, 0);
  evas_object_resize(bg, WINDOW_WIDTH, WINDOW_HEIGHT);
  evas_object_show(bg);

  video = emotion_object_add(evas);
  evas_object_move(video, 0, 0);
  evas_object_resize(video, WINDOW_WIDTH, WINDOW_HEIGHT);

  ret = emotion_object_init(video, "gstreamer");
  if(ret != EINA_TRUE) {
    fprintf(stderr, "faild to emotion_object_init\n");
    goto end;
  }
  ret = emotion_object_file_set(video, argv[1]);
  if(ret != EINA_TRUE) {
    fprintf(stderr, "emotion_object_file_set\n");
    goto end;
  }
  emotion_object_play_set(video, EINA_TRUE);
  evas_object_show(video);

  m = evas_map_new(4);
  evas_map_util_points_populate_from_object(m, video);
  // 2d rotate
  // evas_map_util_rotate(m, 90, 0 + (WINDOW_WIDTH/2), 0 + (WINDOW_HEIGHT/2));
  // 3d rotate
  //evas_map_util_3d_rotate(m, 10.0, 10.0, 0.0, 0, 0, 0);
  evas_object_map_set(video, m);
  evas_object_map_enable_set(video, EINA_TRUE);

  ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, key_cb, video);

  ecore_main_loop_begin();

 end:
  if(ecore_evas)
    ecore_evas_free(ecore_evas);

  evas_map_free(m);
  emotion_shutdown();
  ecore_evas_shutdown();
  ecore_shutdown();

  return 0;
}