Add support for trace logging in lockfree ringbuffer

Fix some crashes when the connection is dead.
Small cleanups in the audio mixer
Only propose alloc_buffer when we are using export_buf in v4l2
This commit is contained in:
Wim Taymans 2017-04-27 17:17:47 +02:00
parent b51d3e4862
commit 214a0e27d8
10 changed files with 248 additions and 83 deletions

View file

@ -79,6 +79,9 @@ core_marshal_client_update (void *object,
SpaPODFrame f;
int i, n_items;
if (connection == NULL)
return;
core_update_map (proxy->context);
n_items = props ? props->n_items : 0;
@ -107,6 +110,9 @@ core_marshal_sync (void *object,
Builder b = { { NULL, 0, 0, NULL, write_pod }, connection };
SpaPODFrame f;
if (connection == NULL)
return;
core_update_map (proxy->context);
spa_pod_builder_struct (&b.b, &f,
@ -124,6 +130,9 @@ core_marshal_get_registry (void *object,
Builder b = { { NULL, 0, 0, NULL, write_pod }, connection };
SpaPODFrame f;
if (connection == NULL)
return;
core_update_map (proxy->context);
spa_pod_builder_struct (&b.b, &f,
@ -145,6 +154,9 @@ core_marshal_create_node (void *object,
SpaPODFrame f;
uint32_t i, n_items;
if (connection == NULL)
return;
core_update_map (proxy->context);
n_items = props ? props->n_items : 0;
@ -180,6 +192,9 @@ core_marshal_create_client_node (void *object,
SpaPODFrame f;
uint32_t i, n_items;
if (connection == NULL)
return;
core_update_map (proxy->context);
n_items = props ? props->n_items : 0;
@ -214,6 +229,9 @@ core_marshal_update_types (void *object,
SpaPODFrame f;
uint32_t i;
if (connection == NULL)
return;
spa_pod_builder_add (&b.b,
SPA_POD_TYPE_STRUCT, &f,
SPA_POD_TYPE_INT, first_id,
@ -460,6 +478,9 @@ client_node_marshal_update (void *object,
Builder b = { { NULL, 0, 0, NULL, write_pod }, connection };
SpaPODFrame f;
if (connection == NULL)
return;
core_update_map (proxy->context);
spa_pod_builder_struct (&b.b, &f,
@ -488,6 +509,9 @@ client_node_marshal_port_update (void *object,
SpaPODFrame f[2];
int i, n_items;
if (connection == NULL)
return;
core_update_map (proxy->context);
spa_pod_builder_add (&b.b,
@ -546,6 +570,9 @@ client_node_marshal_event (void *object,
Builder b = { { NULL, 0, 0, NULL, write_pod }, connection };
SpaPODFrame f;
if (connection == NULL)
return;
core_update_map (proxy->context);
spa_pod_builder_struct (&b.b, &f,
@ -562,6 +589,9 @@ client_node_marshal_destroy (void *object)
Builder b = { { NULL, 0, 0, NULL, write_pod }, connection };
SpaPODFrame f;
if (connection == NULL)
return;
core_update_map (proxy->context);
spa_pod_builder_struct (&b.b, &f, 0);
@ -990,6 +1020,9 @@ registry_marshal_bind (void *object,
Builder b = { { NULL, 0, 0, NULL, write_pod }, connection };
SpaPODFrame f;
if (connection == NULL)
return;
core_update_map (proxy->context);
spa_pod_builder_struct (&b.b, &f,