Skip to content

Commit

Permalink
[core] Removed old receiver buffer
Browse files Browse the repository at this point in the history
and ENABLE_NEW_RCVBUFFER build option.
  • Loading branch information
maxsharabayko committed Sep 29, 2022
1 parent a1c0ab3 commit 29c7c64
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 2,800 deletions.
9 changes: 0 additions & 9 deletions CMakeLists.txt
Expand Up @@ -160,7 +160,6 @@ option(USE_BUSY_WAITING "Enable more accurate sending times at a cost of potenti
option(USE_GNUSTL "Get c++ library/headers from the gnustl.pc" OFF)
option(ENABLE_SOCK_CLOEXEC "Enable setting SOCK_CLOEXEC on a socket" ON)
option(ENABLE_SHOW_PROJECT_CONFIG "Enable show Project Configuration" OFF)
option(ENABLE_NEW_RCVBUFFER "Enable new receiver buffer implementation" ON)

option(ENABLE_CLANG_TSA "Enable Clang Thread Safety Analysis" OFF)

Expand Down Expand Up @@ -533,14 +532,6 @@ if (ENABLE_SOCK_CLOEXEC)
add_definitions(-DENABLE_SOCK_CLOEXEC=1)
endif()

if (ENABLE_NEW_RCVBUFFER)
add_definitions(-DENABLE_NEW_RCVBUFFER=1)
message(STATUS "RECEIVER_BUFFER: NEW")
else()
remove_definitions(-DENABLE_NEW_RCVBUFFER)
message(STATUS "RECEIVER_BUFFER: OLD")
endif()

if (CMAKE_MAJOR_VERSION LESS 3)
set (FORCE_CXX_STANDARD_GNUONLY 1)
endif()
Expand Down
14 changes: 0 additions & 14 deletions docs/build/build-options.md
Expand Up @@ -40,7 +40,6 @@ Option details are given further below.
| [`ENABLE_INET_PTON`](#enable_inet_pton) | 1.3.2 | `BOOL` | ON | Enables usage of the `inet_pton` function used to resolve the network endpoint name into an IP address. |
| [`ENABLE_LOGGING`](#enable_logging) | 1.2.0 | `BOOL` | ON | Enables normal logging, including errors. |
| [`ENABLE_MONOTONIC_CLOCK`](#enable_monotonic_clock) | 1.4.0 | `BOOL` | ON* | Enforces the use of `clock_gettime` with a monotonic clock that is independent of the currently set time in the system. |
| [`ENABLE_NEW_RCVBUFFER`](#enable_new_rcvbuffer) | 1.5.0 | `BOOL` | ON | Enables the new implementation of the receiver buffer with behavior and code improvements. |
| [`ENABLE_PROFILE`](#enable_profile) | 1.2.0 | `BOOL` | OFF | Enables code instrumentation for profiling (only for GNU-compatible compilers). |
| [`ENABLE_RELATIVE_LIBPATH`](#enable_relative_libpath) | 1.3.2 | `BOOL` | OFF | Enables adding a relative path to a library for linking against a shared SRT library by reaching out to a sibling directory. |
| [`ENABLE_SHARED`](#enable_shared--enable_static) | 1.2.0 | `BOOL` | ON | Enables building SRT as a shared library. |
Expand Down Expand Up @@ -349,22 +348,9 @@ clock (as configured in the resources used in the operation).
However the current time of the monotonic clock can only be obtained by
the `clock_gettime` function.




[:arrow_up:   Back to List of Build Options](#list-of-build-options)



#### ENABLE_NEW_RCVBUFFER
**`--enable-new-rcvbuffer`** (default: ON)

When ON, this option enables the newest implementation of the receiver buffer
with behavior and code improvements. Note that while it is still possible to fall
back to the old receiver buffer implementation, eventually the new implementation
will be the only one available.


#### ENABLE_PROFILE
**`--enable-profile`** (default: OFF)

Expand Down
4 changes: 0 additions & 4 deletions srtcore/api.cpp
Expand Up @@ -2597,11 +2597,7 @@ void srt::CUDTUnited::checkBrokenSockets()
// NOT WHETHER THEY ARE ALSO READY TO PLAY at the time when
// this function is called (isRcvDataReady also checks if the
// available data is "ready to play").
#if ENABLE_NEW_RCVBUFFER
&& s->core().m_pRcvBuffer->hasAvailablePackets())
#else
&& s->core().m_pRcvBuffer->isRcvDataAvailable())
#endif
{
const int bc = s->core().m_iBrokenCounter.load();
if (bc > 0)
Expand Down

0 comments on commit 29c7c64

Please sign in to comment.