mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	context: log rate changes
We don't need to check, rt.position of a node is never NULL. Check if the rate changed and log an info message, just like we do for the quantum.
This commit is contained in:
		
							parent
							
								
									ebf4bf8d83
								
							
						
					
					
						commit
						65e7402d01
					
				
					 1 changed files with 8 additions and 2 deletions
				
			
		| 
						 | 
					@ -1123,8 +1123,14 @@ again:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		quantum = SPA_CLAMP(quantum, min_quantum, max_quantum);
 | 
							quantum = SPA_CLAMP(quantum, min_quantum, max_quantum);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		n->rt.position->clock.rate = SPA_FRACTION(1, def_rate);
 | 
							if (def_rate != n->rt.position->clock.rate.denom) {
 | 
				
			||||||
		if (n->rt.position && quantum != n->rt.position->clock.duration) {
 | 
								pw_log_info("(%s-%u) new rate:%u->%u",
 | 
				
			||||||
 | 
										n->name, n->info.id,
 | 
				
			||||||
 | 
										n->rt.position->clock.rate.denom,
 | 
				
			||||||
 | 
										def_rate);
 | 
				
			||||||
 | 
								n->rt.position->clock.rate = SPA_FRACTION(1, def_rate);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							if (quantum != n->rt.position->clock.duration) {
 | 
				
			||||||
			pw_log_info("(%s-%u) new quantum:%"PRIu64"->%u",
 | 
								pw_log_info("(%s-%u) new quantum:%"PRIu64"->%u",
 | 
				
			||||||
					n->name, n->info.id,
 | 
										n->name, n->info.id,
 | 
				
			||||||
					n->rt.position->clock.duration,
 | 
										n->rt.position->clock.duration,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue