Skip to content

Commit

Permalink
[docs] Address multiple typo fixes. (#2570)
Browse files Browse the repository at this point in the history
Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Co-authored-by: Steve Matthews <smatthews@haivision.com>
  • Loading branch information
fujitatomoya and stevomatthews authored Dec 8, 2022
1 parent 78dd987 commit 6a0caac
Show file tree
Hide file tree
Showing 33 changed files with 62 additions and 62 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion docs/API/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion docs/features/socket-groups.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion haicrypt/hcrypt_ctx.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/CheckGCCAtomicIntrinsics.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/build-windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate-error-types.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -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)."
Expand Down
4 changes: 2 additions & 2 deletions scripts/srt-dev.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion srtcore/access_control.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions srtcore/api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
*/
Expand Down Expand Up @@ -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.
}
}

Expand Down Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions srtcore/buffer_rcv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions srtcore/buffer_rcv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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;

Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion srtcore/congctl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
16 changes: 8 additions & 8 deletions srtcore/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.");
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
*/
Expand Down Expand Up @@ -9393,7 +9393,7 @@ std::pair<bool, steady_clock::time_point> 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
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions srtcore/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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())
Expand Down
4 changes: 2 additions & 2 deletions srtcore/fec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion srtcore/group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1898,7 +1898,7 @@ void CUDTGroup::recv_CollectAliveAndBroken(vector<CUDTSocket*>& alive, set<CUDTS
// 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. 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 and kangaroo in
Expand Down
2 changes: 1 addition & 1 deletion srtcore/group.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ class CUDTGroup
/// @param[in] pktseq Packet sequence number currently tried to be sent
/// @param[out] w_u CUDT unit of the current member (to allow calling overrideSndSeqNo)
/// @param[out] w_curseq Group's current sequence number (either -1 or the value used already for other links)
/// @param[out] w_final_stat w_final_stat = send_status if sending succeded.
/// @param[out] w_final_stat w_final_stat = send_status if sending succeeded.
///
/// @returns true if the sending operation result (submitted in stat) is a success, false otherwise.
bool sendBackup_CheckSendStatus(const time_point& currtime,
Expand Down
6 changes: 3 additions & 3 deletions srtcore/packet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,11 @@ modified by
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//
// Loss List Field Coding:
// For any consectutive lost seqeunce numbers that the differnece between
// For any consecutive lost seqeunce numbers that the differnece between
// the last and first is more than 1, only record the first (a) and the
// the last (b) sequence numbers in the loss list field, and modify the
// the first bit of a to 1.
// For any single loss or consectutive loss less than 2 packets, use
// For any single loss or consecutive loss less than 2 packets, use
// the original sequence numbers in the field.

#include "platform_sys.h"
Expand Down Expand Up @@ -553,7 +553,7 @@ void CPacket::setMsgCryptoFlags(EncryptionKeySpec spec)

uint32_t CPacket::getMsgTimeStamp() const
{
// SRT_DEBUG_TSBPD_WRAP may enable smaller timestamp for faster wraparoud handling tests
// SRT_DEBUG_TSBPD_WRAP used to enable smaller timestamps for faster testing of how wraparounds are handled
return (uint32_t)m_nHeader[SRT_PH_TIMESTAMP] & TIMESTAMP_MASK;
}

Expand Down
Loading

0 comments on commit 6a0caac

Please sign in to comment.