Beispiel #1
0
void gui_set_filename_display(GuTabContext* tc, gboolean title,
                              gboolean label)
{
  gchar* filetext = tabmanager_get_tabname(tc);

  if (label) tabmanagergui_update_label(tc->page, filetext);
  if (title) gui_set_window_title(tc->editor->filename, filetext);
}
Beispiel #2
0
void gstreamer_destroy_pipeline() {
	main_set_normal_scheduling_policy();

	GstState state, pending;
	gst_element_set_state (pipeline, GST_STATE_PAUSED);
	gst_element_get_state (pipeline, &state, &pending, GST_CLOCK_TIME_NONE);

	/* Iterate main loop to process pending stuff. */
	while (g_main_context_iteration (NULL, FALSE));

	gst_element_set_state (pipeline, GST_STATE_READY);
	gst_element_get_state (pipeline, &state, &pending, GST_CLOCK_TIME_NONE);

	gst_element_set_state(pipeline, GST_STATE_NULL);

	g_source_remove(bus_watch_id);
	gst_object_unref(GST_OBJECT(pipeline));
	pipeline_description = "";

	GList *list = g_list_first(inform_pipeline_destroyed_cb_list);
	GValue value = G_VALUE_INIT;
	g_value_init(&value, G_TYPE_POINTER);
	g_value_set_pointer(&value, NULL);
	while (list != NULL) {
		GClosure *closure = list->data;
		g_closure_invoke(closure, NULL, 1, &value, NULL);
		g_closure_unref(closure);
		list = g_list_next(list);
	}
	g_value_unset(&value);
	g_list_free(inform_pipeline_destroyed_cb_list);

	stats_reset();

	gui_set_window_title("gstplay");
}