mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	improve debug and error reporting a little
This commit is contained in:
		
							parent
							
								
									ae1bbc93d8
								
							
						
					
					
						commit
						5f4c0cdd1e
					
				
					 3 changed files with 8 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -1725,8 +1725,8 @@ impl_node_port_use_buffers(void *object,
 | 
			
		|||
				SPA_META_Header, sizeof(struct spa_meta_header));
 | 
			
		||||
 | 
			
		||||
		if (n_datas != port->blocks) {
 | 
			
		||||
			spa_log_error(this->log, "%p: invalid blocks %d on buffer %d",
 | 
			
		||||
					this, n_datas, i);
 | 
			
		||||
			spa_log_error(this->log, "%p: invalid blocks %d on buffer %d, expected %d",
 | 
			
		||||
					this, n_datas, i, port->blocks);
 | 
			
		||||
			return -EINVAL;
 | 
			
		||||
		}
 | 
			
		||||
		if (SPA_FLAG_IS_SET(flags, SPA_NODE_BUFFERS_FLAG_ALLOC)) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -62,7 +62,7 @@ void gst_pipewire_pool_wrap_buffer (GstPipeWirePool *pool, struct pw_buffer *b)
 | 
			
		|||
  uint32_t i;
 | 
			
		||||
  GstPipeWirePoolData *data;
 | 
			
		||||
 | 
			
		||||
  GST_DEBUG_OBJECT (pool, "wrap buffer");
 | 
			
		||||
  GST_DEBUG_OBJECT (pool, "wrap buffer, datas:%d", b->buffer->n_datas);
 | 
			
		||||
 | 
			
		||||
  data = g_slice_new (GstPipeWirePoolData);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -89,6 +89,10 @@ void gst_pipewire_pool_wrap_buffer (GstPipeWirePool *pool, struct pw_buffer *b)
 | 
			
		|||
      gmem = gst_memory_new_wrapped (0, d->data, d->maxsize, 0,
 | 
			
		||||
                                     d->maxsize, NULL, NULL);
 | 
			
		||||
    }
 | 
			
		||||
    else {
 | 
			
		||||
      GST_WARNING_OBJECT (pool, "unknown data type (%s %d)",
 | 
			
		||||
        spa_debug_type_find_short_name(spa_type_data_type, d->type), d->type);
 | 
			
		||||
    }
 | 
			
		||||
    if (gmem)
 | 
			
		||||
      gst_buffer_insert_memory (buf, i, gmem);
 | 
			
		||||
  }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -686,7 +686,7 @@ static GstBuffer *dequeue_buffer(GstPipeWireSrc *pwsrc)
 | 
			
		|||
  }
 | 
			
		||||
 | 
			
		||||
  if (b->buffer->n_datas != gst_buffer_n_memory(data->buf)) {
 | 
			
		||||
      GST_ERROR_OBJECT(pwsrc, "n_datas != n_memory");
 | 
			
		||||
      GST_ERROR_OBJECT(pwsrc, "n_datas != n_memory, (%d != %d)", b->buffer->n_datas, gst_buffer_n_memory(data->buf));
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  for (i = 0; i < b->buffer->n_datas; i++) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue