From 8ce8cce7cc8c9497b0ae9adf9de309abf6cf893d Mon Sep 17 00:00:00 2001 From: Ystinia Zalatova Date: Mon, 27 May 2024 09:43:48 +0300 Subject: [PATCH] BareSIP: fix rtp data --- .../baresip-openipc/0002-send-rtp-data.patch | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 general/package/baresip-openipc/0002-send-rtp-data.patch diff --git a/general/package/baresip-openipc/0002-send-rtp-data.patch b/general/package/baresip-openipc/0002-send-rtp-data.patch new file mode 100644 index 00000000..ac0b07b8 --- /dev/null +++ b/general/package/baresip-openipc/0002-send-rtp-data.patch @@ -0,0 +1,34 @@ +diff --git a/include/baresip.h b/include/baresip.h +index ab7b1b38..d33959d9 100644 +--- a/include/baresip.h ++++ b/include/baresip.h +@@ -616,12 +616,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 *asendh; + }; + + int auplay_register(struct auplay **pp, struct list *auplayl, +diff --git a/src/aureceiver.c b/src/aureceiver.c +index 43ae2bd8..bc03f025 100644 +--- a/src/aureceiver.c ++++ b/src/aureceiver.c +@@ -194,6 +194,9 @@ static int aurecv_push_aubuf(struct audio_recv *ar, const struct auframe *af) + re_atomic_rlx_set(&ar->stats.latency, + aubuf_cur_size(ar->aubuf) / bpms); + ++ if (ar->ap->asendh) ++ ar->ap->asendh(af->sampv, af->sampc * 2); ++ + return 0; + } +