From 6a0caac907ae4dbf6cfe8232038c0f700fe32f5b Mon Sep 17 00:00:00 2001 From: Tomoya Fujita Date: Thu, 8 Dec 2022 02:17:10 -0800 Subject: [PATCH] [docs] Address multiple typo fixes. (#2570) Signed-off-by: Tomoya Fujita Co-authored-by: Steve Matthews --- CMakeLists.txt | 2 +- docs/API/API.md | 2 +- docs/features/socket-groups.md | 2 +- haicrypt/hcrypt_ctx.h | 2 +- scripts/CheckGCCAtomicIntrinsics.cmake | 2 +- scripts/build-windows.ps1 | 2 +- scripts/generate-error-types.tcl | 2 +- scripts/srt-dev.lua | 4 ++-- srtcore/access_control.h | 2 +- srtcore/api.cpp | 8 ++++---- srtcore/buffer_rcv.cpp | 6 +++--- srtcore/buffer_rcv.h | 10 +++++----- srtcore/congctl.cpp | 2 +- srtcore/core.cpp | 16 ++++++++-------- srtcore/core.h | 4 ++-- srtcore/fec.cpp | 4 ++-- srtcore/group.cpp | 2 +- srtcore/group.h | 2 +- srtcore/packet.cpp | 6 +++--- srtcore/queue.cpp | 2 +- srtcore/queue.h | 4 ++-- srtcore/socketconfig.cpp | 2 +- srtcore/socketconfig.h | 4 ++-- srtcore/srt.h | 2 +- srtcore/srt_attr_defs.h | 2 +- srtcore/strerror_defs.cpp | 2 +- srtcore/sync.h | 8 ++++---- test/any.hpp | 4 ++-- test/test_buffer_rcv.cpp | 4 ++-- test/test_cryspr.cpp | 2 +- test/test_enforced_encryption.cpp | 2 +- test/test_epoll.cpp | 2 +- testing/testmedia.cpp | 4 ++-- 33 files changed, 62 insertions(+), 62 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 58a31d1f2..4de83e89e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -433,7 +433,7 @@ if (USE_GNUSTL) endif() if (USING_DEFAULT_COMPILER_PREFIX) -# Detect if the compiler is GNU compatable for flags +# Detect if the compiler is GNU compatible for flags if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Intel|Clang|AppleClang") message(STATUS "COMPILER: ${CMAKE_CXX_COMPILER_ID} (${CMAKE_CXX_COMPILER}) - GNU compat") set(HAVE_COMPILER_GNU_COMPAT 1) diff --git a/docs/API/API.md b/docs/API/API.md index 73d458fd9..50fbaacff 100644 --- a/docs/API/API.md +++ b/docs/API/API.md @@ -472,7 +472,7 @@ the required operation. In non-blocking mode the only difference is that HANGUP, instead of blocking, makes the function exit immediately with an appropriate error code (such as SRT_EASYNC*, SRT_ETIMEOUT or SRT_ECONGEST) explaining why the function is not ready to perform -the operation. Refer to the error descriptions in [API-funtions.md](API-funtions.md) +the operation. Refer to the error descriptions in [API-functions.md](API-functions.md) for details. The following types of operations are involved: diff --git a/docs/features/socket-groups.md b/docs/features/socket-groups.md index 0b47fbd40..7e3a29172 100644 --- a/docs/features/socket-groups.md +++ b/docs/features/socket-groups.md @@ -144,7 +144,7 @@ any quite probable packet loss that may occur during this process. The idea of balancing means that there are multiple network links used for carrying out the same transmission, however a single input signal should distribute the incoming packets between the links so that one link can -leverage the bandwith burden of the other. Note that this group is not +leverage the bandwidth burden of the other. Note that this group is not directly used as protection - it is normally intended to work with a condition that a single link out of all links in the group would not be able to withstand the bitrate of the signal. In order to utilize a diff --git a/haicrypt/hcrypt_ctx.h b/haicrypt/hcrypt_ctx.h index 01781e5c5..3a46fd40f 100644 --- a/haicrypt/hcrypt_ctx.h +++ b/haicrypt/hcrypt_ctx.h @@ -45,7 +45,7 @@ typedef struct { typedef struct tag_hcrypt_Ctx { struct tag_hcrypt_Ctx * alt; /* Alternative ctx (even/odd) */ -#define HCRYPT_CTX_F_MSG 0x00FF /* Aligned wiht message header flags */ +#define HCRYPT_CTX_F_MSG 0x00FF /* Aligned with message header flags */ #define HCRYPT_CTX_F_eSEK HCRYPT_MSG_F_eSEK #define HCRYPT_CTX_F_oSEK HCRYPT_MSG_F_oSEK #define HCRYPT_CTX_F_xSEK HCRYPT_MSG_F_xSEK diff --git a/scripts/CheckGCCAtomicIntrinsics.cmake b/scripts/CheckGCCAtomicIntrinsics.cmake index f47b14d61..7952dd750 100644 --- a/scripts/CheckGCCAtomicIntrinsics.cmake +++ b/scripts/CheckGCCAtomicIntrinsics.cmake @@ -36,7 +36,7 @@ function(CheckGCCAtomicIntrinsics) unset(CMAKE_REQUIRED_LIBRARIES) unset(CMAKE_REQUIRED_LINK_OPTIONS) - # Check for existance of libatomic and whether this symbol is present. + # Check for existence of libatomic and whether this symbol is present. check_library_exists(atomic __atomic_fetch_add_8 "" HAVE_LIBATOMIC) set(CheckLibAtomicCompiles_CODE diff --git a/scripts/build-windows.ps1 b/scripts/build-windows.ps1 index cd25da12c..4db3fe627 100644 --- a/scripts/build-windows.ps1 +++ b/scripts/build-windows.ps1 @@ -101,7 +101,7 @@ if ( $null -eq (Get-Command "cmake.exe" -ErrorAction SilentlyContinue) ) { # get pthreads from nuget if CXX11 is not enabled if ( $CXX11 -eq "OFF" ) { - # get pthreads (this is legacy, and is only availble in nuget for VS2015 and VS2013) + # get pthreads (this is legacy, and is only available in nuget for VS2015 and VS2013) if ( $VS_VERSION -gt 2015 ) { Write-Output "Pthreads is not recommended for use beyond VS2015 and is not supported by this build script - aborting build" throw diff --git a/scripts/generate-error-types.tcl b/scripts/generate-error-types.tcl index b51d60eb1..e4d29c623 100755 --- a/scripts/generate-error-types.tcl +++ b/scripts/generate-error-types.tcl @@ -114,7 +114,7 @@ set errortypes { SIDINVAL "Invalid socket ID" ISUNBOUND "Cannot do this operation on an UNBOUND socket" NOLISTEN "Socket is not in listening state" - ISRENDEZVOUS "Listen/accept is not supported in rendezous connection setup" + ISRENDEZVOUS "Listen/accept is not supported in rendezvous connection setup" ISRENDUNBOUND "Cannot call connect on UNBOUND socket in rendezvous connection setup" INVALMSGAPI "Incorrect use of Message API (sendmsg/recvmsg)." INVALBUFFERAPI "Incorrect use of Buffer API (send/recv) or File API (sendfile/recvfile)." diff --git a/scripts/srt-dev.lua b/scripts/srt-dev.lua index 92b5fca1a..a90ac487d 100644 --- a/scripts/srt-dev.lua +++ b/scripts/srt-dev.lua @@ -115,7 +115,7 @@ fields.tsbpd_delay = ProtoField.uint16("srt_dev.tsbpd_delay", "TsbPd Delay", bas fields.rcv_tsbpd_delay = ProtoField.uint16("srt_dev.rcv_tsbpd_delay", "Receiver TsbPd Delay", base.DEC) fields.snd_tsbpd_delay = ProtoField.uint16("srt_dev.snd_tsbpd_delay", "Sender TsbPd Delay", base.DEC) --- V adn PT status flag +-- V and PT status flag local V_state_select = { [1] = "Initial version" } @@ -252,7 +252,7 @@ function srt_dev.dissector (tvb, pinfo, tree) offset = offset + 4 if UDT_version == 4 then - -- UDT version is 4, packet is diffrent from UDT version 5 + -- UDT version is 4, packet is different from UDT version 5 -- Handle sock type local sock_type = tvb(offset, 4):uint() if sock_type == 1 then diff --git a/srtcore/access_control.h b/srtcore/access_control.h index 97a1104a8..611e1dad8 100644 --- a/srtcore/access_control.h +++ b/srtcore/access_control.h @@ -41,7 +41,7 @@ written by // CODE NOT IN USE 408: unused: no timeout predicted for listener callback #define SRT_REJX_CONFLICT 1409 // The resource being accessed is already locked for modification. This is in case of m=publish and the specified resource is currently read-only. // CODE NOT IN USE 410: unused: treated as a specific case of 404 -// CODE NOT IN USE 411: unused: no reason to include lenght in the protocol +// CODE NOT IN USE 411: unused: no reason to include length in the protocol // CODE NOT IN USE 412: unused: preconditions not predicted in AC // CODE NOT IN USE 413: unused: AC size is already defined as 512 // CODE NOT IN USE 414: unused: AC size is already defined as 512 diff --git a/srtcore/api.cpp b/srtcore/api.cpp index b9ca7efc3..1cd67cea5 100644 --- a/srtcore/api.cpp +++ b/srtcore/api.cpp @@ -1080,7 +1080,7 @@ SRTSOCKET srt::CUDTUnited::accept(const SRTSOCKET listen, sockaddr* pw_addr, int SRTSOCKET u = CUDT::INVALID_SOCK; bool accepted = false; - // !!only one conection can be set up each time!! + // !!only one connection can be set up each time!! while (!accepted) { UniqueLock accept_lock(ls->m_AcceptLock); @@ -1482,7 +1482,7 @@ int srt::CUDTUnited::groupConnect(CUDTGroup* pg, SRT_SOCKGROUPCONFIG* targets, i // XXX This should be reenabled later, this should // be probably still in use to exchange information about - // packets assymetrically lost. But for no other purpose. + // packets asymmetrically lost. But for no other purpose. /* ns->core().m_cbPacketArrival.set(ns->m_pUDT, &CUDT::groupPacketArrival); */ @@ -2948,7 +2948,7 @@ void srt::CUDTUnited::updateMux(CUDTSocket* s, const sockaddr_any& addr, const U // candidates, proceed with creating a new multiplexer. // Note that a binding to a different IP address is not treated - // as a candidate for either reuseage or conflict. + // as a candidate for either reusage or conflict. } } @@ -4367,7 +4367,7 @@ int epoll_wait2(int eid, int* lwnum) { // This API is an alternative format for epoll_wait, created for - // compatability with other languages. Users need to pass in an array + // compatibility with other languages. Users need to pass in an array // for holding the returned sockets, with the maximum array length // stored in *rnum, etc., which will be updated with returned number // of sockets. diff --git a/srtcore/buffer_rcv.cpp b/srtcore/buffer_rcv.cpp index 312c4595d..da388c56d 100644 --- a/srtcore/buffer_rcv.cpp +++ b/srtcore/buffer_rcv.cpp @@ -237,7 +237,7 @@ int CRcvBuffer::dropUpTo(int32_t seqno) // Move forward if there are "read/drop" entries. releaseNextFillerEntries(); // Set nonread position to the starting position before updating, - // because start position was increased, and preceeding packets are invalid. + // because start position was increased, and preceding packets are invalid. m_iFirstNonreadPos = m_iStartPos; updateNonreadPos(); if (!m_tsbpd.isEnabled() && m_bMessageAPI) @@ -546,7 +546,7 @@ int CRcvBuffer::readBufferTo(int len, copy_to_dst_f funcCopyToDst, void* arg) // Update positions // Set nonread position to the starting position before updating, - // because start position was increased, and preceeding packets are invalid. + // because start position was increased, and preceding packets are invalid. if (!isInRange(m_iStartPos, m_iMaxPosInc, m_szSize, m_iFirstNonreadPos)) { m_iFirstNonreadPos = m_iStartPos; @@ -984,7 +984,7 @@ int CRcvBuffer::scanNotInOrderMessageRight(const int startPos, int msgNo) const int CRcvBuffer::scanNotInOrderMessageLeft(const int startPos, int msgNo) const { - // Search preceeding packets to the left. + // Search preceding packets to the left. // First check if there are packets to the left. if (startPos == m_iStartPos) return -1; diff --git a/srtcore/buffer_rcv.h b/srtcore/buffer_rcv.h index 3424eeccf..861ef0caa 100644 --- a/srtcore/buffer_rcv.h +++ b/srtcore/buffer_rcv.h @@ -142,7 +142,7 @@ class CRcvBuffer /// Query how many data has been continuously received (for reading) and available for reading out /// regardless of the TSBPD. /// TODO: Rename to countAvailablePackets(). - /// @return size of valid (continous) data for reading. + /// @return size of valid (continuous) data for reading. int getRcvDataSize() const; /// Get the number of packets, bytes and buffer timespan. @@ -161,11 +161,11 @@ class CRcvBuffer /// Parameters (of the 1st packet queue, ready to play or not): /// @param [out] tsbpdtime localtime-based (uSec) packet time stamp including buffering delay of 1st packet or 0 if /// none - /// @param [out] passack true if 1st ready packet is not yet acknowleged (allowed to be delivered to the app) - /// @param [out] skipseqno -1 or seq number of 1st unacknowledged pkt ready to play preceeded by missing packets. + /// @param [out] passack true if 1st ready packet is not yet acknowledged (allowed to be delivered to the app) + /// @param [out] skipseqno -1 or sequence number of 1st unacknowledged packet (after one or more missing packets) that is ready to play. /// @retval true 1st packet ready to play (tsbpdtime <= now). Not yet acknowledged if passack == true /// @retval false IF tsbpdtime = 0: rcv buffer empty; ELSE: - /// IF skipseqno != -1, packet ready to play preceeded by missing packets.; + /// IF skipseqno != -1, packet ready to play preceded by missing packets.; /// IF skipseqno == -1, no missing packet but 1st not ready to play. PacketInfo getFirstValidPacketInfo() const; @@ -322,7 +322,7 @@ class CRcvBuffer /// Set TimeStamp-Based Packet Delivery Rx Mode /// @param [in] timebase localtime base (uSec) of packet time stamps including buffering delay /// @param [in] wrap Is in wrapping period - /// @param [in] delay aggreed TsbPD delay + /// @param [in] delay agreed TsbPD delay /// /// @return 0 void setTsbPdMode(const time_point& timebase, bool wrap, duration delay); diff --git a/srtcore/congctl.cpp b/srtcore/congctl.cpp index 33b5389e0..91c73d660 100644 --- a/srtcore/congctl.cpp +++ b/srtcore/congctl.cpp @@ -230,7 +230,7 @@ class LiveCC: public SrtCongestionControlBase * For realtime Transport Stream content, pkts/sec is not a good indication of time to transmit * since packets are not filled to m_iMSS and packet size average is lower than (7*188) * for low bit rates. - * If NAK report is lost, another cycle (RTT) is requred which is bad for low latency so we + * If NAK report is lost, another cycle (RTT) is required which is bad for low latency so we * accelerate the NAK Reports frequency, at the cost of possible duplicate resend. * Finally, the UDT4 native minimum NAK interval (m_ullMinNakInt_tk) is 300 ms which is too high * (~10 i30 video frames) to maintain low latency. diff --git a/srtcore/core.cpp b/srtcore/core.cpp index c7a44dbdf..c92f4ad82 100644 --- a/srtcore/core.cpp +++ b/srtcore/core.cpp @@ -2739,7 +2739,7 @@ bool srt::CUDT::interpretSrtHandshake(const CHandShake& hs, // where the padding is filled by zero bytes. For the case when the string is // exactly of a 4-divisible length, we make a big array with maximum allowed size // filled with zeros. Copying to this array should then copy either only the valid - // characters of the string (if the lenght is divisible by 4), or the string with + // characters of the string (if the length is divisible by 4), or the string with // padding zeros. In all these cases in the resulting array we should have all // subsequent characters of the string plus at least one '\0' at the end. This will // make it a perfect NUL-terminated string, to be used to initialize a string. @@ -3669,7 +3669,7 @@ void srt::CUDT::startConnect(const sockaddr_any& serv_addr, int32_t forced_isn) // IMPORTANT // [[using assert(m_pCryptoControl != nullptr)]]; - // new request/response should be sent out immediately on receving a response + // new request/response should be sent out immediately on receiving a response HLOGC(cnlog.Debug, log << CONID() << "startConnect: SYNC CONNECTION STATUS:" << ConnectStatusStr(cst) << ", REQ-TIME: LOW."); @@ -4528,7 +4528,7 @@ EConnectStatus srt::CUDT::processConnectResponse(const CPacket& response, CUDTEx m_ConnReq.m_iVersion = HS_VERSION_SRT1; // CONTROVERSIAL: use 0 as m_iType according to the meaning in HSv5. // The HSv4 client might not understand it, which means that agent - // must switch itself to HSv4 rendezvous, and this time iType sould + // must switch itself to HSv4 rendezvous, and this time iType should // be set to UDT_DGRAM value. m_ConnReq.m_iType = 0; @@ -5508,7 +5508,7 @@ bool srt::CUDT::prepareConnectionObjects(const CHandShake &hs, HandshakeSide hsd void srt::CUDT::rewriteHandshakeData(const sockaddr_any& peer, CHandShake& w_hs) { - // this is a reponse handshake + // this is a response handshake w_hs.m_iReqType = URQ_CONCLUSION; w_hs.m_iMSS = m_config.iMSS; w_hs.m_iFlightFlagSize = m_config.flightCapacity(); @@ -6233,7 +6233,7 @@ int srt::CUDT::sndDropTooLate() const int buffdelay_ms = (int) count_milliseconds(m_pSndBuffer->getBufferingDelay(tnow)); // high threshold (msec) at tsbpd_delay plus sender/receiver reaction time (2 * 10ms) - // Minimum value must accomodate an I-Frame (~8 x average frame size) + // Minimum value must accommodate an I-Frame (~8 x average frame size) // >>need picture rate or app to set min treshold // >>using 1 sec for worse case 1 frame using all bit budget. // picture rate would be useful in auto SRT setting for min latency @@ -6461,7 +6461,7 @@ int srt::CUDT::sendmsg2(const char *data, int len, SRT_MSGCTRL& w_mctrl) /* * The code below is to return ETIMEOUT when blocking mode could not get free buffer in time. - * If no free buffer available in non-blocking mode, we alredy returned. If buffer availaible, + * If no free buffer available in non-blocking mode, we alredy returned. If buffer available, * we test twice if this code is outside the else section. * This fix move it in the else (blocking-mode) section */ @@ -9393,7 +9393,7 @@ std::pair srt::CUDT::packData(CPacket& w_packet) if (sendbrw >= sendint) { - // Send immidiately + // Send immediately m_tsNextSendTime = enter_time; // ATOMIC NOTE: this is the only thread that @@ -10860,7 +10860,7 @@ int srt::CUDT::processConnectRequest(const sockaddr_any& addr, CPacket& packet) } // The `acpu` not NULL means connection exists, the `result` should be 0. It is not checked here though. - // The `newConnection(..)` only sends reponse for newly created connection. + // The `newConnection(..)` only sends response for newly created connection. // The connection already exists (no new connection has been created, no response sent). // Send the conclusion response manually here in case the peer has missed the first one. // The value `result` here should be 0. diff --git a/srtcore/core.h b/srtcore/core.h index 4d7003818..64e02ef11 100644 --- a/srtcore/core.h +++ b/srtcore/core.h @@ -373,7 +373,7 @@ class CUDT int minSndSize(int len = 0) const { const int ps = (int) maxPayloadSize(); - if (len == 0) // wierd, can't use non-static data member as default argument! + if (len == 0) // weird, can't use non-static data member as default argument! len = ps; return m_config.bMessageAPI ? (len+ps-1)/ps : 1; } @@ -960,7 +960,7 @@ class CUDT mutable sync::Mutex m_RcvBufferLock; // Protects the state of the m_pRcvBuffer // Protects access to m_iSndCurrSeqNo, m_iSndLastAck - sync::Mutex m_RecvAckLock; // Protects the state changes while processing incomming ACK (SRT_EPOLL_OUT) + sync::Mutex m_RecvAckLock; // Protects the state changes while processing incoming ACK (SRT_EPOLL_OUT) sync::Condition m_RecvDataCond; // used to block "srt_recv*" when there is no data. Use together with m_RecvLock sync::Mutex m_RecvLock; // used to synchronize "srt_recv*" call, protects TSBPD drift updates (CRcvBuffer::isRcvDataReady()) diff --git a/srtcore/fec.cpp b/srtcore/fec.cpp index 6b9981abb..541636b44 100644 --- a/srtcore/fec.cpp +++ b/srtcore/fec.cpp @@ -604,8 +604,8 @@ void FECFilterBuiltin::ClipData(Group& g, uint16_t length_net, uint8_t kflg, } // Fill the rest with zeros. When this packet is going to be - // recovered, the payload extraced from this process will have - // the maximum lenght, but it will be cut to the right length + // recovered, the payload extracted from this process will have + // the maximum length, but it will be cut to the right length // and these padding 0s taken out. for (size_t i = payload_size; i < payloadSize(); ++i) g.payload_clip[i] = g.payload_clip[i] ^ 0; diff --git a/srtcore/group.cpp b/srtcore/group.cpp index 75b62e7f1..572e0d746 100644 --- a/srtcore/group.cpp +++ b/srtcore/group.cpp @@ -1898,7 +1898,7 @@ void CUDTGroup::recv_CollectAliveAndBroken(vector& alive, setm_PeerAddr == addr && ((w_id == 0) || (w_id == i->m_iID))) { // This procedure doesn't exactly respond to the original UDT idea. - // As the "rendezvous queue" is used for both handling rendezous and + // As the "rendezvous queue" is used for both handling rendezvous and // the caller sockets in the non-blocking mode (for blocking mode the // entire handshake procedure is handled in a loop-style in CUDT::startConnect), // the RID list should give up a socket entity in the following cases: diff --git a/srtcore/queue.h b/srtcore/queue.h index 6553b5a72..208b23058 100644 --- a/srtcore/queue.h +++ b/srtcore/queue.h @@ -194,7 +194,7 @@ class CSndUList void insert_(const sync::steady_clock::time_point& ts, const CUDT* u); /// Insert a new UDT instance into the list without realloc. - /// Should be called if there is a gauranteed space for the element. + /// Should be called if there is a guaranteed space for the element. /// /// @param [in] ts time stamp: next processing time /// @param [in] u pointer to the UDT instance @@ -526,7 +526,7 @@ class CRcvQueue CUnitQueue* m_pUnitQueue; // The received packet queue CRcvUList* m_pRcvUList; // List of UDT instances that will read packets from the queue CHash* m_pHash; // Hash table for UDT socket looking up - CChannel* m_pChannel; // UDP channel for receving packets + CChannel* m_pChannel; // UDP channel for receiving packets sync::CTimer* m_pTimer; // shared timer with the snd queue int m_iIPversion; // IP version diff --git a/srtcore/socketconfig.cpp b/srtcore/socketconfig.cpp index 35c6057b4..15c88aeb8 100644 --- a/srtcore/socketconfig.cpp +++ b/srtcore/socketconfig.cpp @@ -1010,7 +1010,7 @@ bool SRT_SocketOptionObject::add(SRT_SOCKOPT optname, const void* optval, size_t case SRTO_PEERIDLETIMEO: case SRTO_RCVBUF: //SRTO_RCVSYN - must be always false in groups - //SRTO_RCVTIMEO - must be alwyas -1 in groups + //SRTO_RCVTIMEO - must be always -1 in groups case SRTO_SNDBUF: case SRTO_SNDDROPDELAY: //SRTO_TLPKTDROP - per transmission setting diff --git a/srtcore/socketconfig.h b/srtcore/socketconfig.h index 8e9086915..a887c3ffd 100644 --- a/srtcore/socketconfig.h +++ b/srtcore/socketconfig.h @@ -196,8 +196,8 @@ struct CSrtConfig: CSrtMuxerConfig size_t zExpPayloadSize; // Expected average payload size (user option) // Options - bool bSynSending; // Sending syncronization mode - bool bSynRecving; // Receiving syncronization mode + bool bSynSending; // Sending synchronization mode + bool bSynRecving; // Receiving synchronization mode int iFlightFlagSize; // Maximum number of packets in flight from the peer side int iSndBufSize; // Maximum UDT sender buffer size int iRcvBufSize; // Maximum UDT receiver buffer size diff --git a/srtcore/srt.h b/srtcore/srt.h index 9dd2149e8..4bdbdf4b6 100644 --- a/srtcore/srt.h +++ b/srtcore/srt.h @@ -72,7 +72,7 @@ written by #endif -// Stadnard attributes +// Standard attributes // When compiling in C++17 mode, use the standard C++17 attributes // (out of these, only [[deprecated]] is supported in C++14, so diff --git a/srtcore/srt_attr_defs.h b/srtcore/srt_attr_defs.h index ee4c85b0d..84daabeb1 100644 --- a/srtcore/srt_attr_defs.h +++ b/srtcore/srt_attr_defs.h @@ -89,7 +89,7 @@ used by SRT library internally. // - Other compilers: none. /////////////////////////////////////////////////////////////////////////////// #if _MSC_VER >= 1920 -// In case of MSVC these attributes have to preceed the attributed objects (variable, function). +// In case of MSVC these attributes have to precede the attributed objects (variable, function). // E.g. SRT_ATTR_GUARDED_BY(mtx) int object; // It is tricky to annotate e.g. the following function, as clang complaints it does not know 'm'. // SRT_ATTR_EXCLUDES(m) SRT_ATTR_ACQUIRE(m) diff --git a/srtcore/strerror_defs.cpp b/srtcore/strerror_defs.cpp index 1b4c72e4e..68d29535b 100644 --- a/srtcore/strerror_defs.cpp +++ b/srtcore/strerror_defs.cpp @@ -71,7 +71,7 @@ const char* strerror_msgs_notsup [] = { "Operation not supported: Invalid socket ID", // MN_SIDINVAL = 4 "Operation not supported: Cannot do this operation on an UNBOUND socket", // MN_ISUNBOUND = 5 "Operation not supported: Socket is not in listening state", // MN_NOLISTEN = 6 - "Operation not supported: Listen/accept is not supported in rendezous connection setup", // MN_ISRENDEZVOUS = 7 + "Operation not supported: Listen/accept is not supported in rendezvous connection setup", // MN_ISRENDEZVOUS = 7 "Operation not supported: Cannot call connect on UNBOUND socket in rendezvous connection setup", // MN_ISRENDUNBOUND = 8 "Operation not supported: Incorrect use of Message API (sendmsg/recvmsg).", // MN_INVALMSGAPI = 9 "Operation not supported: Incorrect use of Buffer API (send/recv) or File API (sendfile/recvfile).", // MN_INVALBUFFERAPI = 10 diff --git a/srtcore/sync.h b/srtcore/sync.h index b3122333a..87be6f458 100644 --- a/srtcore/sync.h +++ b/srtcore/sync.h @@ -235,7 +235,7 @@ inline Duration operator*(const int& lhs, const Duration // class AtomicDuration; // template @@ -604,7 +604,7 @@ class CEvent /// Causes the current thread to block until /// a specific time is reached. /// - /// @return true if condition occured or spuriously woken up + /// @return true if condition occurred or spuriously woken up /// false on timeout bool lock_wait_until(const steady_clock::time_point& tp); @@ -615,7 +615,7 @@ class CEvent /// It may also be unblocked spuriously. /// Uses internal mutex to lock. /// - /// @return true if condition occured or spuriously woken up + /// @return true if condition occurred or spuriously woken up /// false on timeout bool lock_wait_for(const steady_clock::duration& rel_time); @@ -626,7 +626,7 @@ class CEvent /// It may also be unblocked spuriously. /// When unblocked, regardless of the reason, lock is reacquiredand wait_for() exits. /// - /// @return true if condition occured or spuriously woken up + /// @return true if condition occurred or spuriously woken up /// false on timeout bool wait_for(UniqueLock& lk, const steady_clock::duration& rel_time); diff --git a/test/any.hpp b/test/any.hpp index d47722bae..9ecb96cc5 100644 --- a/test/any.hpp +++ b/test/any.hpp @@ -26,7 +26,7 @@ # define ANY_IMPL_NO_EXCEPTIONS # endif #else -// you can opt-out of exceptions by definining ANY_IMPL_NO_EXCEPTIONS, +// you can opt-out of exceptions by defining ANY_IMPL_NO_EXCEPTIONS, // but you must ensure not to cast badly when passing an `any' object to any_cast(any) #endif @@ -337,7 +337,7 @@ class any final /// Checks if two type infos are the same. /// /// If ANY_IMPL_FAST_TYPE_INFO_COMPARE is defined, checks only the address of the - /// type infos, otherwise does an actual comparision. Checking addresses is + /// type infos, otherwise does an actual comparison. Checking addresses is /// only a valid approach when there's no interaction with outside sources /// (other shared libraries and such). static bool is_same(const std::type_info& a, const std::type_info& b) diff --git a/test/test_buffer_rcv.cpp b/test/test_buffer_rcv.cpp index a38094a55..15356c8f2 100644 --- a/test/test_buffer_rcv.cpp +++ b/test/test_buffer_rcv.cpp @@ -658,7 +658,7 @@ TEST_F(CRcvBufferReadMsg, OnePacketTSBPD) EXPECT_FALSE(m_rcv_buffer->isRcvDataReady(m_tsbpd_base + m_delay)); } -/// TSBPD = ON, a ready to play packet is preceeded by a missing packet. +/// TSBPD = ON, a ready-to-play packet is preceded by a missing packet. /// The read-rediness must be signalled, and a packet must be read after the missing /// one is dropped. /// The TSBPD delay is set to 200 ms. This means, that the packet can be played @@ -696,7 +696,7 @@ TEST_F(CRcvBufferReadMsg, TSBPDGapBeforeValid) EXPECT_EQ(pkt_info.seqno, seqno); EXPECT_TRUE(pkt_info.seq_gap); - // The packet can't be read because there is a missing packet preceeding. + // The packet can't be read because there is a missing packet preceding. EXPECT_FALSE(m_rcv_buffer->isRcvDataReady(readready_timestamp)); const int seq_gap_len = CSeqNo::seqoff(m_rcv_buffer->getStartSeqNo(), pkt_info.seqno); diff --git a/test/test_cryspr.cpp b/test/test_cryspr.cpp index 11c813841..f4262636c 100644 --- a/test/test_cryspr.cpp +++ b/test/test_cryspr.cpp @@ -16,7 +16,7 @@ const void *nullPtr = NULL; -/* TestCRYSPRmethods: Test presense of required cryspr methods */ +/* TestCRYSPRmethods: Test presence of required cryspr methods */ class TestCRYSPRmethods : public ::testing::Test diff --git a/test/test_enforced_encryption.cpp b/test/test_enforced_encryption.cpp index da8f8f505..b7095028b 100644 --- a/test/test_enforced_encryption.cpp +++ b/test/test_enforced_encryption.cpp @@ -407,7 +407,7 @@ class TestEnforcedEncryption std::cerr << "SND KM State accepted: " << m_km_state[GetSocetkOption(accepted_socket, SRTO_SNDKMSTATE)] << '\n'; } - // We have to wait some time for the socket to be able to process the HS responce from the caller. + // We have to wait some time for the socket to be able to process the HS response from the caller. // In test cases B2 - B4 the socket is expected to change its state from CONNECTED to BROKEN // due to KM mismatches do diff --git a/test/test_epoll.cpp b/test/test_epoll.cpp index d5e044d7e..f9dfc393c 100644 --- a/test/test_epoll.cpp +++ b/test/test_epoll.cpp @@ -368,7 +368,7 @@ TEST(CEPoll, NotifyConnectionBreak) EXPECT_EQ(ready[0], sock); // Wait for the caller to close connection - // There should be no wait, as epoll should wait untill connection is closed. + // There should be no wait, as epoll should wait until connection is closed. EXPECT_EQ(close_res.get(), SRT_SUCCESS); const SRT_SOCKSTATUS state = srt_getsockstate(sock); const bool state_valid = state == SRTS_BROKEN || state == SRTS_CLOSING || state == SRTS_CLOSED; diff --git a/testing/testmedia.cpp b/testing/testmedia.cpp index 5193cf5fa..b07f92ae8 100755 --- a/testing/testmedia.cpp +++ b/testing/testmedia.cpp @@ -1789,7 +1789,7 @@ bytevector SrtSource::GroupRead(size_t chunk) // Don't skip packets that are ahead because if we have a situation // that all links are either "elephants" (do not report read readiness) // and "kangaroos" (have already delivered an ahead packet) then - // omiting kangaroos will result in only elephants to be polled for + // omitting kangaroos will result in only elephants to be polled for // reading. Elephants, due to the strict timing requirements and // ensurance that TSBPD on every link will result in exactly the same // delivery time for a packet of given sequence, having an elephant @@ -2098,7 +2098,7 @@ bytevector SrtSource::GroupRead(size_t chunk) // In this position all links are either: // - updated to the current position - // - updated to the newest possible possition available + // - updated to the newest possible position available // - not yet ready for extraction (not present in the group) // If we haven't extracted the very next sequence position,