Beispiel #1
0
bool Skitt::start_animation()
{
	if (!animation->open()) {
		return false;
	}
	/* Have to get that first frame. */
	if (!animation->next_frame()) {
		return false;
	}
	if (!start_loading_files()) {
		return false;
	}
	printf("Waiting for buffers to get a few frames...\n");
	while (!screen->are_buffers_full(min_num_frames_load)) {
		pthread_yield();
	}
	printf("Buffers have 100 frames. Starting the playback timer.\n");
	if (!start_playback_loop()) {
		return false;
	}
	return true;
}
Beispiel #2
0
static void
search_query_ready_cb (void     *buffer,
		       gsize     count,
		       GError   *error,
		       gpointer  user_data)
{
	DialogData *data = user_data;

	if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
		search_completed (data);
		return;
	}

	if (error != NULL) {
		_gtk_error_dialog_from_gerror_show (GTK_WINDOW (data->dialog),
						    _("Could not search for a cover on Internet"),
						    &error);
		search_completed (data);
		return;
	}

	data->file_list = make_file_list_from_search_result (buffer, count, MAX_IMAGES);
	start_loading_files (data);
}