mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	impl-node: set signal and awake time
When a non-driver emits the ready event, set the awake and signal time so that pw-top reports times correctly. See #1987
This commit is contained in:
		
							parent
							
								
									126d380e85
								
							
						
					
					
						commit
						ce8af10cfe
					
				
					 1 changed files with 10 additions and 0 deletions
				
			
		| 
						 | 
					@ -1654,6 +1654,16 @@ again:
 | 
				
			||||||
	if (SPA_UNLIKELY(node->driver && !node->driving))
 | 
						if (SPA_UNLIKELY(node->driver && !node->driving))
 | 
				
			||||||
		return 0;
 | 
							return 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!node->driver) {
 | 
				
			||||||
 | 
							struct timespec ts;
 | 
				
			||||||
 | 
							struct pw_node_activation *a = node->rt.activation;
 | 
				
			||||||
 | 
							struct spa_system *data_system = node->context->data_system;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							spa_system_clock_gettime(data_system, CLOCK_MONOTONIC, &ts);
 | 
				
			||||||
 | 
							a->status = PW_NODE_ACTIVATION_AWAKE;
 | 
				
			||||||
 | 
							a->signal_time = a->awake_time = SPA_TIMESPEC_TO_NSEC(&ts);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (status & SPA_STATUS_HAVE_DATA) {
 | 
						if (status & SPA_STATUS_HAVE_DATA) {
 | 
				
			||||||
		spa_list_for_each(p, &node->rt.output_mix, rt.node_link)
 | 
							spa_list_for_each(p, &node->rt.output_mix, rt.node_link)
 | 
				
			||||||
			spa_node_process(p->mix);
 | 
								spa_node_process(p->mix);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue