int
main(int argc, char *argv[])
{
   GstElement *pipeline;
   char *filename;
   Ecore_Pipe *pipe;

   gst_init(&argc, &argv);

   if (!ecore_init())
     {
        gst_deinit();
        return 0;
     }

   pipe = ecore_pipe_add(handler);
   if (!pipe)
     {
        ecore_shutdown();
        gst_deinit();
        return 0;
     }

   if (argc < 2)
     {
        g_print("usage: %s file.avi\n", argv[0]);
        ecore_pipe_del(pipe);
        ecore_shutdown();
        gst_deinit();
        return 0;
     }
   filename = argv[1];

   pipeline = _buid_pipeline(filename, pipe);
   if (!pipeline)
     {
        g_print("Error during the pipeline building\n");
        ecore_pipe_del(pipe);
        ecore_shutdown();
        gst_deinit();
        return -1;
     }

   gst_element_set_state(pipeline, GST_STATE_PLAYING);

   ecore_main_loop_begin();

   ecore_pipe_del(pipe);
   ecore_shutdown();
   gst_deinit();

   return 0;
}
int
main (int argc, char *argv[])
{
   Ecore_Pipe *pipe;
   pid_t child_pid;

   ecore_init();

   pipe = ecore_pipe_add(handler, NULL);

   child_pid = fork();
   if(!child_pid)
     {
        ecore_pipe_read_close(pipe);
        do_lengthy_task(pipe);
     }
   else
     {
        ecore_pipe_write_close(pipe);
        ecore_main_loop_begin();
     }

   ecore_pipe_del(pipe);
   ecore_shutdown();

   return 0;
}
Example #3
0
/* Private function */
static void
_ecore_pipe_unhandle(Ecore_Pipe *p)
{
   p->handling--;
   if (p->delete_me)
     {
        ecore_pipe_del(p);
     }
}
Example #4
0
bool
mp_app_noti_ignore(void)
{
	sound_manager_unset_available_route_changed_cb();
	sound_manager_unset_active_device_changed_cb();

	if (vconf_ignore_key_changed(VCONFKEY_FILEMANAGER_DB_STATUS, _mp_app_noti_changed_cb) < 0)
	{
		ERROR_TRACE("Error when ignore callback\n");
		return FALSE;
	}
	if (vconf_ignore_key_changed(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, _mp_app_noti_changed_cb) < 0)
	{
		ERROR_TRACE("Error when ignore callback\n");
		return FALSE;
	}

	if (vconf_ignore_key_changed(VCONFKEY_SYSMAN_EARJACKKEY, _mp_app_noti_changed_cb) < 0)
	{
		ERROR_TRACE("Error when ignore callback\n");
		return FALSE;
	}

	if (vconf_ignore_key_changed(VCONFKEY_SYSMAN_MMC_STATUS, _mp_app_noti_changed_cb) < 0)
	{
		ERROR_TRACE("Error when ignore callback\n");
		return FALSE;
	}

	if (vconf_ignore_key_changed(MP_VCONFKEY_PLAYING_PID, _mp_app_noti_changed_cb) < 0)
	{
		ERROR_TRACE("Error when ignore callback\n");
		return FALSE;
	}

#ifdef MP_FEATURE_AVRCP_13
	mp_avrcp_target_finalize();
#endif

	if(gNotiPipe)
	{
		ecore_pipe_del(gNotiPipe);
		gNotiPipe = NULL;
	}
	return TRUE;
}
Example #5
0
EAPI void
ecore_fork_reset(void)
{
   Eina_List *l, *ln;
   Ecore_Fork_Cb *fcb;
   
   eina_lock_take(&_thread_safety);

   ecore_pipe_del(_thread_call);
   _thread_call = ecore_pipe_add(_thread_callback, NULL);
   /* If there was something in the pipe, trigger a wakeup again */
   if (_thread_cb) ecore_pipe_write(_thread_call, &wakeup, sizeof (int));

   eina_lock_release(&_thread_safety);

   // should this be done withing the eina lock stuff?
   
   fork_cbs_walking++;
   EINA_LIST_FOREACH(fork_cbs, l, fcb)
     {
        fcb->func(fcb->data);
     }
Example #6
0
void
mp_app_inotify_finalize(struct appdata *ad)
{
	mp_inotify_t *handle = NULL;
	handle = g_handle;

	mp_retm_if(handle == NULL, "handle is NULL");

	if (ad->inotify_pipe)
	{
		ecore_pipe_del(ad->inotify_pipe);
		ad->inotify_pipe = NULL;
	}

	g_list_free_full(handle->wd_list, _mp_app_inotify_wd_list_destroy);
	handle->wd_list = NULL;

	pthread_cancel(handle->monitor);
	pthread_join(handle->monitor, NULL);

	_mp_app_inotify_handle_free();

	return;
}
void deleteOwnedPtr(Ecore_Pipe* ptr)
{
    if (ptr)
        ecore_pipe_del(ptr);
}