/** * gst_deinit: * * Clean up any resources created by GStreamer in gst_init(). * * It is normally not needed to call this function in a normal application * as the resources will automatically be freed when the program terminates. * This function is therefore mostly used by testsuites and other memory * profiling tools. * * After this call GStreamer (including this method) should not be used anymore. */ void gst_deinit (void) { GstBinClass *bin_class; GstClock *clock; GST_INFO ("deinitializing GStreamer"); if (gst_deinitialized) { GST_DEBUG ("already deinitialized"); return; } #ifndef GST_DISABLE_GST_DEBUG _priv_gst_tracing_deinit (); #endif g_thread_pool_set_max_unused_threads (0); bin_class = GST_BIN_CLASS (g_type_class_peek (gst_bin_get_type ())); if (bin_class->pool != NULL) { g_thread_pool_free (bin_class->pool, FALSE, TRUE); bin_class->pool = NULL; } gst_task_cleanup_all (); g_slist_foreach (_priv_gst_preload_plugins, (GFunc) g_free, NULL); g_slist_free (_priv_gst_preload_plugins); _priv_gst_preload_plugins = NULL; #ifndef GST_DISABLE_REGISTRY g_list_foreach (_priv_gst_plugin_paths, (GFunc) g_free, NULL); g_list_free (_priv_gst_plugin_paths); _priv_gst_plugin_paths = NULL; #endif clock = gst_system_clock_obtain (); gst_object_unref (clock); gst_object_unref (clock); _priv_gst_registry_cleanup (); #ifndef GST_DISABLE_TRACE _priv_gst_alloc_trace_deinit (); #endif g_type_class_unref (g_type_class_peek (gst_object_get_type ())); g_type_class_unref (g_type_class_peek (gst_pad_get_type ())); g_type_class_unref (g_type_class_peek (gst_element_factory_get_type ())); g_type_class_unref (g_type_class_peek (gst_element_get_type ())); g_type_class_unref (g_type_class_peek (gst_tracer_factory_get_type ())); g_type_class_unref (g_type_class_peek (gst_type_find_factory_get_type ())); g_type_class_unref (g_type_class_peek (gst_bin_get_type ())); g_type_class_unref (g_type_class_peek (gst_bus_get_type ())); g_type_class_unref (g_type_class_peek (gst_task_get_type ())); g_type_class_unref (g_type_class_peek (gst_object_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_bin_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_buffer_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_buffer_copy_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_bus_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_bus_sync_reply_get_type ())); g_type_class_unref (g_type_class_peek (gst_caps_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_clock_type_get_type ())); g_type_class_unref (g_type_class_peek (gst_clock_return_get_type ())); g_type_class_unref (g_type_class_peek (gst_clock_entry_type_get_type ())); g_type_class_unref (g_type_class_peek (gst_clock_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_debug_graph_details_get_type ())); g_type_class_unref (g_type_class_peek (gst_state_get_type ())); g_type_class_unref (g_type_class_peek (gst_state_change_return_get_type ())); g_type_class_unref (g_type_class_peek (gst_state_change_get_type ())); g_type_class_unref (g_type_class_peek (gst_element_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_core_error_get_type ())); g_type_class_unref (g_type_class_peek (gst_library_error_get_type ())); g_type_class_unref (g_type_class_peek (gst_plugin_dependency_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_parse_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_resource_error_get_type ())); g_type_class_unref (g_type_class_peek (gst_search_mode_get_type ())); g_type_class_unref (g_type_class_peek (gst_stream_error_get_type ())); g_type_class_unref (g_type_class_peek (gst_stream_status_type_get_type ())); g_type_class_unref (g_type_class_peek (gst_structure_change_type_get_type ())); g_type_class_unref (g_type_class_peek (gst_event_type_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_event_type_get_type ())); g_type_class_unref (g_type_class_peek (gst_seek_type_get_type ())); g_type_class_unref (g_type_class_peek (gst_seek_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_qos_type_get_type ())); g_type_class_unref (g_type_class_peek (gst_format_get_type ())); g_type_class_unref (g_type_class_peek (gst_debug_level_get_type ())); g_type_class_unref (g_type_class_peek (gst_debug_color_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_iterator_result_get_type ())); g_type_class_unref (g_type_class_peek (gst_iterator_item_get_type ())); g_type_class_unref (g_type_class_peek (gst_message_type_get_type ())); g_type_class_unref (g_type_class_peek (gst_meta_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_mini_object_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_pad_link_return_get_type ())); g_type_class_unref (g_type_class_peek (gst_pad_link_check_get_type ())); g_type_class_unref (g_type_class_peek (gst_flow_return_get_type ())); g_type_class_unref (g_type_class_peek (gst_pad_mode_get_type ())); g_type_class_unref (g_type_class_peek (gst_pad_direction_get_type ())); g_type_class_unref (g_type_class_peek (gst_pad_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_pad_presence_get_type ())); g_type_class_unref (g_type_class_peek (gst_pad_template_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_pipeline_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_plugin_error_get_type ())); g_type_class_unref (g_type_class_peek (gst_plugin_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_rank_get_type ())); g_type_class_unref (g_type_class_peek (gst_query_type_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_query_type_get_type ())); g_type_class_unref (g_type_class_peek (gst_buffering_mode_get_type ())); g_type_class_unref (g_type_class_peek (gst_tag_merge_mode_get_type ())); g_type_class_unref (g_type_class_peek (gst_tag_flag_get_type ())); g_type_class_unref (g_type_class_peek (gst_tag_scope_get_type ())); g_type_class_unref (g_type_class_peek (gst_task_state_get_type ())); g_type_class_unref (g_type_class_peek (gst_toc_entry_type_get_type ())); g_type_class_unref (g_type_class_peek (gst_toc_scope_get_type ())); g_type_class_unref (g_type_class_peek (gst_type_find_probability_get_type ())); g_type_class_unref (g_type_class_peek (gst_uri_type_get_type ())); g_type_class_unref (g_type_class_peek (gst_uri_error_get_type ())); g_type_class_unref (g_type_class_peek (gst_parse_error_get_type ())); g_type_class_unref (g_type_class_peek (gst_param_spec_fraction_get_type ())); g_type_class_unref (g_type_class_peek (gst_progress_type_get_type ())); g_type_class_unref (g_type_class_peek (gst_buffer_pool_acquire_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_memory_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_map_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_caps_intersect_mode_get_type ())); g_type_class_unref (g_type_class_peek (gst_pad_probe_type_get_type ())); g_type_class_unref (g_type_class_peek (gst_pad_probe_return_get_type ())); g_type_class_unref (g_type_class_peek (gst_segment_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_scheduling_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_control_binding_get_type ())); g_type_class_unref (g_type_class_peek (gst_control_source_get_type ())); g_type_class_unref (g_type_class_peek (gst_toc_entry_type_get_type ())); g_type_class_unref (g_type_class_peek (gst_toc_loop_type_get_type ())); g_type_class_unref (g_type_class_peek (gst_lock_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_allocator_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_stream_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_debug_color_mode_get_type ())); gst_deinitialized = TRUE; GST_INFO ("deinitialized GStreamer"); }
/** * gst_deinit: * * Clean up any resources created by GStreamer in gst_init(). * * It is normally not needed to call this function in a normal application * as the resources will automatically be freed when the program terminates. * This function is therefore mostly used by testsuites and other memory * profiling tools. * * After this call GStreamer (including this method) should not be used anymore. */ void gst_deinit (void) { GstClock *clock; GST_INFO ("deinitializing GStreamer"); if (gst_deinitialized) { GST_DEBUG ("already deinitialized"); return; } g_slist_foreach (_priv_gst_preload_plugins, (GFunc) g_free, NULL); g_slist_free (_priv_gst_preload_plugins); _priv_gst_preload_plugins = NULL; #ifndef GST_DISABLE_REGISTRY g_list_foreach (_priv_gst_plugin_paths, (GFunc) g_free, NULL); g_list_free (_priv_gst_plugin_paths); _priv_gst_plugin_paths = NULL; #endif clock = gst_system_clock_obtain (); gst_object_unref (clock); gst_object_unref (clock); _priv_gst_registry_cleanup (); g_type_class_unref (g_type_class_peek (gst_object_get_type ())); g_type_class_unref (g_type_class_peek (gst_pad_get_type ())); g_type_class_unref (g_type_class_peek (gst_element_factory_get_type ())); g_type_class_unref (g_type_class_peek (gst_element_get_type ())); g_type_class_unref (g_type_class_peek (gst_type_find_factory_get_type ())); g_type_class_unref (g_type_class_peek (gst_bin_get_type ())); g_type_class_unref (g_type_class_peek (gst_bus_get_type ())); g_type_class_unref (g_type_class_peek (gst_task_get_type ())); g_type_class_unref (g_type_class_peek (gst_index_factory_get_type ())); g_type_class_unref (g_type_class_peek (gst_object_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_bin_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_buffer_flag_get_type ())); g_type_class_unref (g_type_class_peek (gst_buffer_copy_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_buffer_list_item_get_type ())); g_type_class_unref (g_type_class_peek (gst_bus_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_bus_sync_reply_get_type ())); g_type_class_unref (g_type_class_peek (gst_caps_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_clock_type_get_type ())); g_type_class_unref (g_type_class_peek (gst_clock_return_get_type ())); g_type_class_unref (g_type_class_peek (gst_clock_entry_type_get_type ())); g_type_class_unref (g_type_class_peek (gst_clock_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_debug_graph_details_get_type ())); g_type_class_unref (g_type_class_peek (gst_state_get_type ())); g_type_class_unref (g_type_class_peek (gst_state_change_return_get_type ())); g_type_class_unref (g_type_class_peek (gst_state_change_get_type ())); g_type_class_unref (g_type_class_peek (gst_element_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_core_error_get_type ())); g_type_class_unref (g_type_class_peek (gst_library_error_get_type ())); g_type_class_unref (g_type_class_peek (gst_plugin_dependency_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_parse_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_resource_error_get_type ())); g_type_class_unref (g_type_class_peek (gst_search_mode_get_type ())); g_type_class_unref (g_type_class_peek (gst_stream_error_get_type ())); g_type_class_unref (g_type_class_peek (gst_stream_status_type_get_type ())); g_type_class_unref (g_type_class_peek (gst_structure_change_type_get_type ())); g_type_class_unref (g_type_class_peek (gst_event_type_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_event_type_get_type ())); g_type_class_unref (g_type_class_peek (gst_seek_type_get_type ())); g_type_class_unref (g_type_class_peek (gst_seek_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_qos_type_get_type ())); g_type_class_unref (g_type_class_peek (gst_format_get_type ())); g_type_class_unref (g_type_class_peek (gst_index_certainty_get_type ())); g_type_class_unref (g_type_class_peek (gst_index_entry_type_get_type ())); g_type_class_unref (g_type_class_peek (gst_index_lookup_method_get_type ())); g_type_class_unref (g_type_class_peek (gst_assoc_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_index_resolver_method_get_type ())); g_type_class_unref (g_type_class_peek (gst_index_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_debug_level_get_type ())); g_type_class_unref (g_type_class_peek (gst_debug_color_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_iterator_result_get_type ())); g_type_class_unref (g_type_class_peek (gst_iterator_item_get_type ())); g_type_class_unref (g_type_class_peek (gst_message_type_get_type ())); g_type_class_unref (g_type_class_peek (gst_mini_object_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_pad_link_return_get_type ())); g_type_class_unref (g_type_class_peek (gst_pad_link_check_get_type ())); g_type_class_unref (g_type_class_peek (gst_flow_return_get_type ())); g_type_class_unref (g_type_class_peek (gst_activate_mode_get_type ())); g_type_class_unref (g_type_class_peek (gst_pad_direction_get_type ())); g_type_class_unref (g_type_class_peek (gst_pad_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_pad_presence_get_type ())); g_type_class_unref (g_type_class_peek (gst_pad_template_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_pipeline_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_plugin_error_get_type ())); g_type_class_unref (g_type_class_peek (gst_plugin_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_rank_get_type ())); g_type_class_unref (g_type_class_peek (gst_query_type_get_type ())); g_type_class_unref (g_type_class_peek (gst_buffering_mode_get_type ())); g_type_class_unref (g_type_class_peek (gst_tag_merge_mode_get_type ())); g_type_class_unref (g_type_class_peek (gst_tag_flag_get_type ())); g_type_class_unref (g_type_class_peek (gst_task_state_get_type ())); g_type_class_unref (g_type_class_peek (gst_alloc_trace_flags_get_type ())); g_type_class_unref (g_type_class_peek (gst_type_find_probability_get_type ())); g_type_class_unref (g_type_class_peek (gst_uri_type_get_type ())); g_type_class_unref (g_type_class_peek (gst_parse_error_get_type ())); g_type_class_unref (g_type_class_peek (gst_param_spec_fraction_get_type ())); g_type_class_unref (g_type_class_peek (gst_progress_type_get_type ())); g_type_class_unref (g_type_class_peek (gst_caps_intersect_mode_get_type ())); gst_deinitialized = TRUE; GST_INFO ("deinitialized GStreamer"); }