mirror of https://github.com/OpenIPC/firmware.git
				
				
				
			Add rtp patch for baresip (#1438)
							parent
							
								
									3d4b450fdc
								
							
						
					
					
						commit
						a693444a7e
					
				|  | @ -0,0 +1,34 @@ | |||
| diff --git a/include/baresip.h b/include/baresip.h
 | ||||
| index 2049ac74..a1b0501e 100644
 | ||||
| --- a/include/baresip.h
 | ||||
| +++ b/include/baresip.h
 | ||||
| @@ -540,12 +540,15 @@ typedef int  (auplay_alloc_h)(struct auplay_st **stp, const struct auplay *ap,
 | ||||
|  			      struct auplay_prm *prm, const char *device, | ||||
|  			      auplay_write_h *wh, void *arg); | ||||
|   | ||||
| +typedef void (auplay_send_h)(const void *sampv, size_t sampc);
 | ||||
| +
 | ||||
|  /** Defines an Audio Player */ | ||||
|  struct auplay { | ||||
|  	struct le        le; | ||||
|  	const char      *name; | ||||
|  	struct list      dev_list; | ||||
|  	auplay_alloc_h  *alloch; | ||||
| +	auplay_send_h   *asend;
 | ||||
|  }; | ||||
|   | ||||
|  int auplay_register(struct auplay **pp, struct list *auplayl, | ||||
| diff --git a/src/audio.c b/src/audio.c
 | ||||
| index 67af6f0e..add06d6b 100644
 | ||||
| --- a/src/audio.c
 | ||||
| +++ b/src/audio.c
 | ||||
| @@ -1035,6 +1035,9 @@ static int aurx_stream_decode(struct aurx *rx, bool marker,
 | ||||
|  	rx->aubuf_started = true; | ||||
|  	lock_rel(rx->lock); | ||||
|   | ||||
| +	if (rx->ap->asend)
 | ||||
| +		rx->ap->asend(af.sampv, num_bytes);
 | ||||
| +
 | ||||
|   out: | ||||
|  	return err; | ||||
|  } | ||||
		Loading…
	
		Reference in New Issue