From 3b31367da4d4916d619b3936e73393e00737747f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joni=20R=C3=A4s=C3=A4nen?= Date: Mon, 19 Sep 2022 14:22:10 +0300 Subject: [PATCH] common: Add better name for fragment pacing --- docs/README.md | 4 ++-- include/uvgrtp/util.hh | 3 ++- src/frame_queue.cc | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/README.md b/docs/README.md index fa922fe..34d7ae1 100644 --- a/docs/README.md +++ b/docs/README.md @@ -85,7 +85,7 @@ session->create_stream(..., RCE_SRTP | RCE_SRTP_KMNGMNT_ZRTP | RCE_SRTP_NULL_CIP | RCE_SRTP_KEYSIZE_256 | Use 256 bit SRTP keys, currently works only with RCE_SRTP_KMNGMNT_USER | | RCE_ZRTP_MULTISTREAM_NO_DH | Select which streams do not perform Diffie-Hellman with ZRTP. Currently, ZRTP only works reliably with one stream performing DH and one not performing it | | RCE_FRAMERATE | Try to keep the sent framerate as constant as possible (default fps is 30) | -| RCE_FRAGMENT_PACING | Pace the sending of framents to frame interval to help receiver receive packets (default frame interval is 1/30) | +| RCE_PACE_FRAGMENT_SENDING | Pace the sending of framents to frame interval to help receiver receive packets (default frame interval is 1/30) | ### RTP Context Configuration (RCC) flags @@ -162,6 +162,6 @@ The default configuration of uvgRTP should be able to handle most basic scenario * RCC_UDP_RCV_BUF_SIZE: You can try increasing this to 40 or 80 MB if it helps receiving frames * RCC_UDP_SND_BUF_SIZE_ You can try increasing this to 40 or 80 MB if it helps sending frames * RCC_RING_BUFFER_SIZE: You can try increasing this to 40 or 80 MB if it helps receiving frames -* RCE_FRAGMENT_PACING, RCC_FPS_ENUMERATOR and RCC_FPS_DENOMINATOR: You can try RCE_FRAGMENT_PACING to make sender pace the sending of framents so receiver has easier time receiving them. Use RCC_FPS_ENUMERATOR and RCC_FPS_DENOMINATOR to set your fps +* RCE_PACE_FRAGMENT_SENDING, RCC_FPS_ENUMERATOR and RCC_FPS_DENOMINATOR: You can try RCE_PACE_FRAGMENT_SENDING to make sender pace the sending of framents so receiver has easier time receiving them. Use RCC_FPS_ENUMERATOR and RCC_FPS_DENOMINATOR to set your fps None of these parameters will however help if you are sending more data than the receiver can process, they only help when dealing with burst of (usually fragmented) RTP traffic. diff --git a/include/uvgrtp/util.hh b/include/uvgrtp/util.hh index b33ddb3..1cb4d62 100644 --- a/include/uvgrtp/util.hh +++ b/include/uvgrtp/util.hh @@ -257,7 +257,8 @@ enum RTP_CTX_ENABLE_FLAGS { RCE_FRAMERATE = 1 << 18, /** Paces the sending of frame fragments within frame interval (default 1/30 s) */ - RCE_FRAGMENT_PACING = 1 << 19, + RCE_PACE_FRAGMENT_SENDING = 1 << 19, + RCE_FRAGMENT_PACING = 1 << 19, // old name RCE_LAST = 1 << 20 }; // maximum is 1 << 30 for int diff --git a/src/frame_queue.cc b/src/frame_queue.cc index c724ec3..c55bff8 100644 --- a/src/frame_queue.cc +++ b/src/frame_queue.cc @@ -300,7 +300,7 @@ rtp_error_t uvgrtp::frame_queue::flush_queue() ++frames_since_sync_; } - if ((rce_flags_ & RCE_FRAGMENT_PACING) && fps_) + if ((rce_flags_ & RCE_PACE_FRAGMENT_SENDING) && fps_) { if (!(rce_flags_ & RCE_FRAMERATE)) {