From b1ffa8a6c5a3f616a88f25f8b978c5a2d36bceff Mon Sep 17 00:00:00 2001 From: Casey Korver Date: Mon, 3 Jul 2023 15:13:13 -0500 Subject: [PATCH] Correct typos in comments --- src/platform/common.h | 4 ++-- src/platform/linux/cuda.cpp | 2 +- src/platform/linux/cuda.cu | 8 ++++---- src/platform/linux/graphics.cpp | 2 +- src/platform/linux/kmsgrab.cpp | 6 +++--- src/platform/linux/publish.cpp | 6 +++--- src/platform/macos/nv12_zero_device.cpp | 2 +- src/platform/macos/publish.cpp | 6 +++--- src/platform/windows/display_vram.cpp | 2 +- src/platform/windows/misc.cpp | 2 +- src/thread_safe.h | 8 ++++---- src/video.cpp | 2 +- third-party/nvfbc/NvFBC.h | 8 ++++---- 13 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/platform/common.h b/src/platform/common.h index b291c707..91fced16 100644 --- a/src/platform/common.h +++ b/src/platform/common.h @@ -298,7 +298,7 @@ namespace platf { * from the pool. If backend uses multiple threads, calls to this * callback must be synchronized. Calls to this callback and * push_captured_image_cb must be synchronized as well. - * bool *cursor --> A pointer to the flag that indicates wether the cursor should be captured as well + * bool *cursor --> A pointer to the flag that indicates whether the cursor should be captured as well * * Returns either: * capture_e::ok when stopping @@ -383,7 +383,7 @@ namespace platf { /** * display_name --> The name of the monitor that SHOULD be displayed * If display_name is empty --> Use the first monitor that's compatible you can find - * If you require to use this parameter in a seperate thread --> make a copy of it. + * If you require to use this parameter in a separate thread --> make a copy of it. * * config --> Stream configuration * diff --git a/src/platform/linux/cuda.cpp b/src/platform/linux/cuda.cpp index c2a2e0fd..63012dc1 100644 --- a/src/platform/linux/cuda.cpp +++ b/src/platform/linux/cuda.cpp @@ -183,7 +183,7 @@ namespace cuda { int width, height; - // When heigth and width don't change, it's not necessary to use linear interpolation + // When height and width don't change, it's not necessary to use linear interpolation bool linear_interpolation; sws_t sws; diff --git a/src/platform/linux/cuda.cu b/src/platform/linux/cuda.cu index 107075d9..e1dd8160 100644 --- a/src/platform/linux/cuda.cu +++ b/src/platform/linux/cuda.cu @@ -198,10 +198,10 @@ __global__ void RGBA_to_NV12( dstUV[0] = uv.x; dstUV[1] = uv.y; - dstY0[0] = calcY(rgb_lt, color_matrix) * 245.0f; // 245.0f is a magic number to ensure slight changes in luminosity are more visisble - dstY0[1] = calcY(rgb_rt, color_matrix) * 245.0f; // 245.0f is a magic number to ensure slight changes in luminosity are more visisble - dstY1[0] = calcY(rgb_lb, color_matrix) * 245.0f; // 245.0f is a magic number to ensure slight changes in luminosity are more visisble - dstY1[1] = calcY(rgb_rb, color_matrix) * 245.0f; // 245.0f is a magic number to ensure slight changes in luminosity are more visisble + dstY0[0] = calcY(rgb_lt, color_matrix) * 245.0f; // 245.0f is a magic number to ensure slight changes in luminosity are more visible + dstY0[1] = calcY(rgb_rt, color_matrix) * 245.0f; // 245.0f is a magic number to ensure slight changes in luminosity are more visible + dstY1[0] = calcY(rgb_lb, color_matrix) * 245.0f; // 245.0f is a magic number to ensure slight changes in luminosity are more visible + dstY1[1] = calcY(rgb_rb, color_matrix) * 245.0f; // 245.0f is a magic number to ensure slight changes in luminosity are more visible } int tex_t::copy(std::uint8_t *src, int height, int pitch) { diff --git a/src/platform/linux/graphics.cpp b/src/platform/linux/graphics.cpp index fcb7ab23..a0506554 100644 --- a/src/platform/linux/graphics.cpp +++ b/src/platform/linux/graphics.cpp @@ -193,7 +193,7 @@ namespace gl { ctx.AttachShader(program.handle(), frag.handle()); // p_handle stores a copy of the program handle, since program will be moved before - // the fail guard funcion is called. + // the fail guard function is called. auto fg = util::fail_guard([p_handle = program.handle(), &vert, &frag]() { ctx.DetachShader(p_handle, vert.handle()); ctx.DetachShader(p_handle, frag.handle()); diff --git a/src/platform/linux/kmsgrab.cpp b/src/platform/linux/kmsgrab.cpp index 094aee5f..867d9bf0 100644 --- a/src/platform/linux/kmsgrab.cpp +++ b/src/platform/linux/kmsgrab.cpp @@ -550,7 +550,7 @@ namespace platf { }); if (pos == std::end(card_descriptors)) { - // This code path shouldn't happend, but it's there just in case. + // This code path shouldn't happen, but it's there just in case. // card_descriptors is part of the guesswork after all. BOOST_LOG(error) << "Couldn't find ["sv << entry.path() << "]: This shouldn't have happened :/"sv; return -1; @@ -592,7 +592,7 @@ namespace platf { offset_y = viewport.offset_y; } - // This code path shouldn't happend, but it's there just in case. + // This code path shouldn't happen, but it's there just in case. // crtc_to_monitor is part of the guesswork after all. else { BOOST_LOG(warning) << "Couldn't find crtc_id, this shouldn't have happened :\\"sv; @@ -1023,7 +1023,7 @@ namespace platf { // Try to convert names in the format: // {type}-{index} - // {index} is n'th occurence of {type} + // {index} is n'th occurrence of {type} auto index_begin = name.find_last_of('-'); std::uint32_t index; diff --git a/src/platform/linux/publish.cpp b/src/platform/linux/publish.cpp index 367c7aa3..e83bfb70 100644 --- a/src/platform/linux/publish.cpp +++ b/src/platform/linux/publish.cpp @@ -55,10 +55,10 @@ namespace avahi { ERR_NOT_FOUND = -30, /**< Not found */ ERR_INVALID_CONFIG = -31, /**< Configuration error */ - ERR_VERSION_MISMATCH = -32, /**< Verson mismatch */ + ERR_VERSION_MISMATCH = -32, /**< Version mismatch */ ERR_INVALID_SERVICE_SUBTYPE = -33, /**< Invalid service subtype */ ERR_INVALID_PACKET = -34, /**< Invalid packet */ - ERR_INVALID_DNS_ERROR = -35, /**< Invlaid DNS return code */ + ERR_INVALID_DNS_ERROR = -35, /**< Invalid DNS return code */ ERR_DNS_FORMERR = -36, /**< DNS Error: Form error */ ERR_DNS_SERVFAIL = -37, /**< DNS Error: Server Failure */ ERR_DNS_NXDOMAIN = -38, /**< DNS Error: No such domain */ @@ -107,7 +107,7 @@ namespace avahi { }; enum EntryGroupState { - ENTRY_GROUP_UNCOMMITED, /**< The group has not yet been commited, the user must still call avahi_entry_group_commit() */ + ENTRY_GROUP_UNCOMMITED, /**< The group has not yet been committed, the user must still call avahi_entry_group_commit() */ ENTRY_GROUP_REGISTERING, /**< The entries of the group are currently being registered */ ENTRY_GROUP_ESTABLISHED, /**< The entries have successfully been established */ ENTRY_GROUP_COLLISION, /**< A name collision for one of the entries in the group has been detected, the entries have been withdrawn */ diff --git a/src/platform/macos/nv12_zero_device.cpp b/src/platform/macos/nv12_zero_device.cpp index 21046be3..5c4effd1 100644 --- a/src/platform/macos/nv12_zero_device.cpp +++ b/src/platform/macos/nv12_zero_device.cpp @@ -82,7 +82,7 @@ namespace platf { this->resolution_fn = resolution_fn; // we never use this pointer but it's existence is checked/used - // by the platform independed code + // by the platform independent code data = this; return 0; diff --git a/src/platform/macos/publish.cpp b/src/platform/macos/publish.cpp index 4cb80b8d..8fca07b8 100644 --- a/src/platform/macos/publish.cpp +++ b/src/platform/macos/publish.cpp @@ -55,10 +55,10 @@ namespace avahi { ERR_NOT_FOUND = -30, /**< Not found */ ERR_INVALID_CONFIG = -31, /**< Configuration error */ - ERR_VERSION_MISMATCH = -32, /**< Verson mismatch */ + ERR_VERSION_MISMATCH = -32, /**< Version mismatch */ ERR_INVALID_SERVICE_SUBTYPE = -33, /**< Invalid service subtype */ ERR_INVALID_PACKET = -34, /**< Invalid packet */ - ERR_INVALID_DNS_ERROR = -35, /**< Invlaid DNS return code */ + ERR_INVALID_DNS_ERROR = -35, /**< Invalid DNS return code */ ERR_DNS_FORMERR = -36, /**< DNS Error: Form error */ ERR_DNS_SERVFAIL = -37, /**< DNS Error: Server Failure */ ERR_DNS_NXDOMAIN = -38, /**< DNS Error: No such domain */ @@ -107,7 +107,7 @@ namespace avahi { }; enum EntryGroupState { - ENTRY_GROUP_UNCOMMITED, /**< The group has not yet been commited, the user must still call avahi_entry_group_commit() */ + ENTRY_GROUP_UNCOMMITED, /**< The group has not yet been committed, the user must still call avahi_entry_group_commit() */ ENTRY_GROUP_REGISTERING, /**< The entries of the group are currently being registered */ ENTRY_GROUP_ESTABLISHED, /**< The entries have successfully been established */ ENTRY_GROUP_COLLISION, /**< A name collision for one of the entries in the group has been detected, the entries have been withdrawn */ diff --git a/src/platform/windows/display_vram.cpp b/src/platform/windows/display_vram.cpp index 376a5852..4519243a 100644 --- a/src/platform/windows/display_vram.cpp +++ b/src/platform/windows/display_vram.cpp @@ -1070,7 +1070,7 @@ namespace platf::dxgi { auto d3d_img = std::static_pointer_cast(img); // Finish creating the image (if it hasn't happened already), - // also creates synchonization primitives for shared access from multiple direct3d devices. + // also creates synchronization primitives for shared access from multiple direct3d devices. if (complete_img(d3d_img.get(), dummy)) return { nullptr, nullptr }; // This image is shared between capture direct3d device and encoders direct3d devices, diff --git a/src/platform/windows/misc.cpp b/src/platform/windows/misc.cpp index d16c1d6b..c5bdc4fc 100644 --- a/src/platform/windows/misc.cpp +++ b/src/platform/windows/misc.cpp @@ -751,7 +751,7 @@ namespace platf { for (DWORD i = 0; i < wlan_interface_list->dwNumberOfItems; i++) { if (wlan_interface_list->InterfaceInfo[i].isState == wlan_interface_state_connected) { // Enable media streaming mode for 802.11 wireless interfaces to reduce latency and - // unneccessary background scanning operations that cause packet loss and jitter. + // unnecessary background scanning operations that cause packet loss and jitter. // // https://docs.microsoft.com/en-us/windows-hardware/drivers/network/oid-wdi-set-connection-quality // https://docs.microsoft.com/en-us/previous-versions/windows/hardware/wireless/native-802-11-media-streaming diff --git a/src/thread_safe.h b/src/thread_safe.h index d745bf08..f4713bcf 100644 --- a/src/thread_safe.h +++ b/src/thread_safe.h @@ -38,7 +38,7 @@ namespace safe { _cv.notify_all(); } - // pop and view shoud not be used interchangeably + // pop and view should not be used interchangeably status_t pop() { std::unique_lock ul { _lock }; @@ -60,7 +60,7 @@ namespace safe { return val; } - // pop and view shoud not be used interchangeably + // pop and view should not be used interchangeably template status_t pop(std::chrono::duration delay) { @@ -81,7 +81,7 @@ namespace safe { return val; } - // pop and view shoud not be used interchangeably + // pop and view should not be used interchangeably const status_t & view() { std::unique_lock ul { _lock }; @@ -101,7 +101,7 @@ namespace safe { return _status; } - // pop and view shoud not be used interchangeably + // pop and view should not be used interchangeably template status_t view(std::chrono::duration delay) { diff --git a/src/video.cpp b/src/video.cpp index 545e2fbd..33649c18 100644 --- a/src/video.cpp +++ b/src/video.cpp @@ -1971,7 +1971,7 @@ namespace video { /** * This is called once at startup and each time a stream is launched to - * ensure the best encoder is selected. Encoder availablility can change + * ensure the best encoder is selected. Encoder availability can change * at runtime due to all sorts of things from driver updates to eGPUs. * * This is only safe to call when there is no client actively streaming. diff --git a/third-party/nvfbc/NvFBC.h b/third-party/nvfbc/NvFBC.h index 42d0d04b..e2305553 100644 --- a/third-party/nvfbc/NvFBC.h +++ b/third-party/nvfbc/NvFBC.h @@ -654,7 +654,7 @@ typedef struct _NVFBC_CREATE_HANDLE_PARAMS { /*! * [in] Whether NvFBC should not create and manage its own graphics context * - * NvFBC internally uses OpenGL to perfom graphics operations on the + * NvFBC internally uses OpenGL to perform graphics operations on the * captured frames. By default, NvFBC will create and manage (e.g., make * current, detect new threads, etc.) its own OpenGL context. * @@ -866,7 +866,7 @@ typedef struct _NVFBC_CREATE_CAPTURE_SESSION_PARAMS { /*! * [in] Whether NvFBC should not attempt to recover from modesets. * - * NvFBC is able to detect when a modeset event occured and can automatically + * NvFBC is able to detect when a modeset event occurred and can automatically * re-create a capture session with the same settings as before, then resume * its frame capture session transparently. * @@ -1562,7 +1562,7 @@ NvFBCCreateHandle(NVFBC_SESSION_HANDLE *pSessionHandle, NVFBC_CREATE_HANDLE_PARA * * This function implicitly calls NvFBCReleaseContext(). * - * After this fucntion returns, it is not possible to use this session handle + * After this function returns, it is not possible to use this session handle * for any further API call. * * \param [in] sessionHandle @@ -1643,7 +1643,7 @@ NvFBCBindContext(const NVFBC_SESSION_HANDLE sessionHandle, NVFBC_BIND_CONTEXT_PA * If the FBC context is bound to a different thread, ::NVFBC_ERR_CONTEXT is * returned. * - * If the FBC context is already released, this functino has no effects. + * If the FBC context is already released, this function has no effects. * * \param [in] sessionHandle * FBC session handle.