Ejemplo n.º 1
0
void obs_shutdown(void)
{
	if (!obs)
		return;

	da_free(obs->input_types);
	da_free(obs->filter_types);
	da_free(obs->encoder_types);
	da_free(obs->transition_types);
	da_free(obs->output_types);
	da_free(obs->service_types);
	da_free(obs->modal_ui_callbacks);
	da_free(obs->modeless_ui_callbacks);

	stop_video();

	obs_free_data();
	obs_free_video();
	obs_free_graphics();
	obs_free_audio();
	proc_handler_destroy(obs->procs);
	signal_handler_destroy(obs->signals);

	for (size_t i = 0; i < obs->modules.num; i++)
		free_module(obs->modules.array+i);
	da_free(obs->modules);

	bfree(obs->locale);
	bfree(obs);
	obs = NULL;
}
Ejemplo n.º 2
0
void obs_shutdown(void)
{
	size_t i;

	if (!obs)
		return;

	da_free(obs->input_types);
	da_free(obs->filter_types);
	da_free(obs->transition_types);
	da_free(obs->output_types);
	da_free(obs->service_types);

	obs_free_data();
	obs_free_video();
	obs_free_graphics();
	obs_free_audio();
	media_close(obs->media);
	proc_handler_destroy(obs->procs);
	signal_handler_destroy(obs->signals);

	for (i = 0; i < obs->modules.num; i++)
		free_module(obs->modules.array+i);
	da_free(obs->modules);

	bfree(obs);
	obs = NULL;
}
Ejemplo n.º 3
0
bool obs_reset_audio(struct audio_output_info *ai)
{
	if (!obs) return false;

	/* don't allow changing of audio settings if active. */
	if (obs->audio.audio && audio_output_active(obs->audio.audio))
		return false;

	obs_free_audio();
	if(!ai)
		return true;

	return obs_init_audio(ai);
}
Ejemplo n.º 4
0
void obs_shutdown(void)
{
	struct obs_module *module;

	if (!obs)
		return;

	da_free(obs->input_types);
	da_free(obs->filter_types);
	da_free(obs->encoder_types);
	da_free(obs->transition_types);
	da_free(obs->output_types);
	da_free(obs->service_types);
	da_free(obs->modal_ui_callbacks);
	da_free(obs->modeless_ui_callbacks);

	stop_video();

	obs_free_data();
	obs_free_video();
	obs_free_graphics();
	obs_free_audio();
	proc_handler_destroy(obs->procs);
	signal_handler_destroy(obs->signals);

	module = obs->first_module;
	while (module) {
		struct obs_module *next = module->next;
		free_module(module);
		module = next;
	}
	obs->first_module = NULL;

	for (size_t i = 0; i < obs->module_paths.num; i++)
		free_module_path(obs->module_paths.array+i);
	da_free(obs->module_paths);

	bfree(obs->locale);
	bfree(obs);
	obs = NULL;
}
Ejemplo n.º 5
0
bool obs_reset_audio(struct audio_output_info *ai)
{
	if (!obs) return false;

	/* don't allow changing of audio settings if active. */
	if (obs->audio.audio && audio_output_active(obs->audio.audio))
		return false;

	obs_free_audio();
	if(!ai)
		return true;

	blog(LOG_INFO, "audio settings reset:\n"
	               "\tsamples per sec: %d\n"
	               "\tspeakers:        %d\n"
	               "\tbuffering (ms):  %d\n",
	               (int)ai->samples_per_sec,
	               (int)ai->speakers,
	               (int)ai->buffer_ms);

	return obs_init_audio(ai);
}