mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-10-29 05:40:27 -04:00 
			
		
		
		
	bluez5: use position clock time
Use the position clock time and fall back to the monotonic time.
This commit is contained in:
		
							parent
							
								
									ebccd89ae1
								
							
						
					
					
						commit
						0cdcd04f77
					
				
					 1 changed files with 7 additions and 3 deletions
				
			
		|  | @ -1479,10 +1479,14 @@ static int impl_node_process(void *object) | |||
| 	} | ||||
| 	if (!spa_list_is_empty(&port->ready)) { | ||||
| 		if (this->following) { | ||||
| 			if (this->position) { | ||||
| 				this->current_time = this->position->clock.nsec; | ||||
| 			} else { | ||||
| 				struct timespec now; | ||||
| 				spa_system_clock_gettime(this->data_system, CLOCK_MONOTONIC, &now); | ||||
| 				this->current_time = SPA_TIMESPEC_TO_NSEC(&now); | ||||
| 			} | ||||
| 		} | ||||
| 		if (this->need_flush) | ||||
| 			reset_buffer(this); | ||||
| 		flush_data(this, this->current_time); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Wim Taymans
						Wim Taymans