Log when any libobs objects are created/destroyed
This commit is contained in:
parent
0da870afeb
commit
413641a11f
@ -79,6 +79,7 @@ static struct obs_encoder *create_encoder(const char *id,
|
||||
&obs->data.encoders_mutex,
|
||||
&obs->data.first_encoder);
|
||||
|
||||
blog(LOG_INFO, "encoder '%s' (%s) created", name, id);
|
||||
return encoder;
|
||||
}
|
||||
|
||||
@ -181,6 +182,8 @@ static void obs_encoder_actually_destroy(obs_encoder_t encoder)
|
||||
da_free(encoder->outputs);
|
||||
pthread_mutex_unlock(&encoder->outputs_mutex);
|
||||
|
||||
blog(LOG_INFO, "encoder '%s' destroyed", encoder->context.name);
|
||||
|
||||
free_audio_buffers(encoder);
|
||||
|
||||
if (encoder->context.data)
|
||||
|
@ -98,6 +98,7 @@ obs_output_t obs_output_create(const char *id, const char *name,
|
||||
&obs->data.outputs_mutex,
|
||||
&obs->data.first_output);
|
||||
|
||||
blog(LOG_INFO, "output '%s' (%s) created", name, id);
|
||||
return output;
|
||||
|
||||
fail:
|
||||
@ -117,6 +118,8 @@ void obs_output_destroy(obs_output_t output)
|
||||
if (output) {
|
||||
obs_context_data_remove(&output->context);
|
||||
|
||||
blog(LOG_INFO, "output '%s' destroyed", output->context.name);
|
||||
|
||||
if (output->valid && output->active)
|
||||
obs_output_stop(output);
|
||||
if (output->service)
|
||||
|
@ -64,6 +64,7 @@ obs_service_t obs_service_create(const char *id, const char *name,
|
||||
&obs->data.services_mutex,
|
||||
&obs->data.first_service);
|
||||
|
||||
blog(LOG_INFO, "service '%s' (%s) created", name, id);
|
||||
return service;
|
||||
}
|
||||
|
||||
@ -75,6 +76,8 @@ static void actually_destroy_service(struct obs_service *service)
|
||||
if (service->output)
|
||||
service->output->service = NULL;
|
||||
|
||||
blog(LOG_INFO, "service '%s' destroyed", service->context.name);
|
||||
|
||||
obs_context_data_free(&service->context);
|
||||
bfree(service);
|
||||
}
|
||||
|
@ -181,6 +181,7 @@ obs_source_t obs_source_create(enum obs_source_type type, const char *id,
|
||||
if (!obs_source_init(source, info))
|
||||
goto fail;
|
||||
|
||||
blog(LOG_INFO, "source '%s' (%s) created", name, id);
|
||||
obs_source_dosignal(source, "source_create", NULL);
|
||||
return source;
|
||||
|
||||
@ -218,6 +219,8 @@ void obs_source_destroy(struct obs_source *source)
|
||||
|
||||
obs_context_data_remove(&source->context);
|
||||
|
||||
blog(LOG_INFO, "source '%s' destroyed", source->context.name);
|
||||
|
||||
obs_source_dosignal(source, "source_destroy", "destroy");
|
||||
|
||||
if (source->context.data) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user