mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	module-rtp: fix sender latency
The sender should ask for a latency that matches the packet size, not the playout latency, that is for the receiver only.
This commit is contained in:
		
							parent
							
								
									7c9ce63795
								
							
						
					
					
						commit
						f3230ca2e6
					
				
					 1 changed files with 7 additions and 2 deletions
				
			
		| 
						 | 
					@ -362,8 +362,13 @@ struct rtp_stream *rtp_stream_new(struct pw_core *core,
 | 
				
			||||||
	impl->max_error = msec_to_samples(impl, ERROR_MSEC);
 | 
						impl->max_error = msec_to_samples(impl, ERROR_MSEC);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pw_properties_setf(props, PW_KEY_NODE_RATE, "1/%d", impl->rate);
 | 
						pw_properties_setf(props, PW_KEY_NODE_RATE, "1/%d", impl->rate);
 | 
				
			||||||
 | 
						if (direction == PW_DIRECTION_INPUT) {
 | 
				
			||||||
 | 
							pw_properties_setf(props, PW_KEY_NODE_LATENCY, "%d/%d",
 | 
				
			||||||
 | 
									impl->psamples, impl->rate);
 | 
				
			||||||
 | 
						} else {
 | 
				
			||||||
		pw_properties_setf(props, PW_KEY_NODE_LATENCY, "%d/%d",
 | 
							pw_properties_setf(props, PW_KEY_NODE_LATENCY, "%d/%d",
 | 
				
			||||||
				impl->target_buffer / 2, impl->rate);
 | 
									impl->target_buffer / 2, impl->rate);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	pw_properties_setf(props, "net.mtu", "%u", impl->mtu);
 | 
						pw_properties_setf(props, "net.mtu", "%u", impl->mtu);
 | 
				
			||||||
	pw_properties_setf(props, "rtp.ptime", "%u",
 | 
						pw_properties_setf(props, "rtp.ptime", "%u",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue