various: fix typos

This commit is contained in:
Cœur 2022-04-25 19:27:18 +08:00 committed by Leo Izen
parent 6407095871
commit bb5b4b1ba6
34 changed files with 51 additions and 51 deletions

View File

@ -1198,7 +1198,7 @@ Video
When testing, you should start by using ``hwdec=auto-safe`` as it will
limit itself to choosing from hwdecs that are actively supported by the
development team. If that doesn't result in working hardare decoding,
development team. If that doesn't result in working hardware decoding,
you can try ``hwdec=auto`` to have it attempt to load every possible
hwdec, but if ``auto-safe`` didn't work, you will probably need to know
exactly which hwdec matches your hardware and read up on that entry

View File

@ -648,7 +648,7 @@ Available video output drivers are:
(default: display resolution)
``--drm-vrr-enabled=<no|yes|auto>``
Toggle use of Variable Refresh Rate (VRR), aka Freesync or Adapative Sync
Toggle use of Variable Refresh Rate (VRR), aka Freesync or Adaptive Sync
on compatible systems. VRR allows for the display to be refreshed at any
rate within a range (usually ~40Hz-60Hz for 60Hz displays). This can help
with playback of 24/25/50fps content. Support depends on the use of a

View File

@ -377,7 +377,7 @@ without causing conflicts with other library users in the same process. To any
piece of code, a "safe" library's API can simply be used, without having to
worry about other API users that may be around somewhere.
Libraries are often not library safe, because they they use global mutable state
Libraries are often not library safe, because they use global mutable state
or other "global" resources. Typical examples include use of signals, simple
global variables (like hsearch() in libc), or internal caches not protected by
locks.
@ -481,7 +481,7 @@ VOs, AOs, demuxers, and more. The frontend usually calls "down" the usage
hierarchy: mpctx almost on top, then things like vo/ao, and utility code on the
very bottom.
"Callback hell" is when when components call both up and down the hierarchy,
"Callback hell" is when components call both up and down the hierarchy,
which for example leads to accidentally recursion, reentrancy problems, or
locking nightmares. This is avoided by (mostly) calling only down the hierarchy.
Basically the call graph forms a DAG. The other direction is handled by event

View File

@ -76,7 +76,7 @@ Compiling with full features requires development files for several
external libraries. One of the two build systems supported by mpv is required:
[meson](https://mesonbuild.com/index.html) or [waf](https://waf.io/). Meson
can be obtained from your distro or PyPI. Waf can be downloaded by using the
`./bootstrap.py` script. It will get the lastest version of waf that was tested
`./bootstrap.py` script. It will get the latest version of waf that was tested
with mpv. Some documentation about the differences between the build systems are
located in [build-system-differences][build-system-differences].

View File

@ -2,7 +2,7 @@
-- filter including key bindings for adjusting parameters.
--
-- See https://ffmpeg.org/ffmpeg-filters.html#acompressor for explanation
-- of the parameteres.
-- of the parameters.
local mp = require 'mp'
local options = require 'mp.options'

View File

@ -16,7 +16,7 @@
*/
/*
* Abstractions on the CoreAudio API to make property setting/getting suck les
* Abstractions on the CoreAudio API to make property setting/getting suck less
*/
#include "audio/out/ao_coreaudio_properties.h"

View File

@ -1685,7 +1685,7 @@ static void attempt_range_joining(struct demux_internal *in)
// Try to find a join point, where packets obviously overlap. (It would be
// better and faster to do this incrementally, but probably too complex.)
// The current range can overlap arbitrarily with the next one, not only by
// by the seek overlap, but for arbitrary packet readahead as well.
// the seek overlap, but for arbitrary packet readahead as well.
// We also drop the overlapping packets (if joining fails, we discard the
// entire next range anyway, so this does no harm).
for (int n = 0; n < in->num_streams; n++) {

View File

@ -10,7 +10,7 @@ struct mp_filter *mp_compute_frame_duration_create(struct mp_filter *parent);
// Given the filters[0..num_filters] array, connect in with the input of the
// first filter, connect the output of the first filter to the input to the
// second filter, etc., until out. All filters are assumed to be bidrectional,
// second filter, etc., until out. All filters are assumed to be bidirectional,
// with input on pin 0 and output on pin 1. NULL entries are skipped.
void mp_chain_filters(struct mp_pin *in, struct mp_pin *out,
struct mp_filter **filters, int num_filters);
@ -68,10 +68,10 @@ void mp_subfilter_destroy(struct mp_subfilter *sub);
// The filter is destroyed with talloc_free(sub->filter).
bool mp_subfilter_drain_destroy(struct mp_subfilter *sub);
// A bidrectional filter which passes through all data.
// A bidirectional filter which passes through all data.
struct mp_filter *mp_bidir_nop_filter_create(struct mp_filter *parent);
// A bidrectional filter which does not connect its pins. Instead, the user is,
// A bidirectional filter which does not connect its pins. Instead, the user is,
// by convention, allowed to access the filter's private pins, and use them
// freely. (This is sometimes convenient, such as when you need to pass a single
// filter instance to other code, and you don't need a full "proper" filter.)

View File

@ -400,7 +400,7 @@ static void init_connection(struct mp_pin *p)
if (out->manual_connection)
assert(out->manual_connection->in->runner == runner);
// Logicaly, the ends are always manual connections. A pin chain without
// Logically, the ends are always manual connections. A pin chain without
// manual connections at the ends is still disconnected (or if this
// attempted to extend an existing connection, becomes dangling and gets
// disconnected).

View File

@ -179,7 +179,7 @@ static bstr read_file(struct mp_log *log, const char *filename)
MP_ASSERT_UNREACHABLE();
}
// Load options and profiles from from a config file.
// Load options and profiles from a config file.
// conffile: path to the config file
// initial_section: default section where to add normal options
// flags: M_SETOPT_* bits

View File

@ -75,8 +75,8 @@ class LibmpvHelper {
-> UnsafeMutableRawPointer? in
let symbol: CFString = CFStringCreateWithCString(
kCFAllocatorDefault, name, kCFStringEncodingASCII)
let indentifier = CFBundleGetBundleWithIdentifier("com.apple.opengl" as CFString)
let addr = CFBundleGetFunctionPointerForName(indentifier, symbol)
let identifier = CFBundleGetBundleWithIdentifier("com.apple.opengl" as CFString)
let addr = CFBundleGetFunctionPointerForName(identifier, symbol)
if symbol as String == "glFlush" {
return unsafeBitCast(glDummy, to: UnsafeMutableRawPointer.self)

View File

@ -18,7 +18,7 @@
#ifndef MPV_MACOSX_MENU
#define MPV_MACOSX_MENU
// Menu Keys identifing menu items
// Menu Keys identifying menu items
typedef enum {
MPM_H_SIZE,
MPM_N_SIZE,

View File

@ -106,7 +106,7 @@ struct observe_property {
};
struct mpv_handle {
// -- immmutable
// -- immutable
char name[MAX_CLIENT_NAME];
struct mp_log *log;
struct MPContext *mpctx;

View File

@ -128,17 +128,17 @@ static void mp_lua_optarg(lua_State *L, int arg)
// autofree lua C function: same as lua_CFunction but with these differences:
// - It accepts an additional void* argument - a pre-initialized talloc context
// which it can use, and which is freed with its children once the function
// completes - regardless if a lua error occured or not. If a lua error did
// completes - regardless if a lua error occurred or not. If a lua error did
// occur then it's re-thrown after the ctx is freed.
// The stack/arguments/upvalues/return are the same as with lua_CFunction.
// - It's inserted into the lua VM using af_pushc{function,closure} instead of
// lua_pushc{function,closure}, which takes care of wrapping it with the
// automatic talloc alocation + lua-error-handling + talloc release.
// automatic talloc allocation + lua-error-handling + talloc release.
// This requires using AF_ENTRY instead of FN_ENTRY at struct fn_entry.
// - The autofree overhead per call is roughly two additional plain lua calls.
// Typically that's up to 20% slower than plain new+free without "auto",
// and at most about twice slower - compared to bare new+free lua_CFunction.
// - The overhead of af_push* is one aditional lua-c-closure with two upvalues.
// - The overhead of af_push* is one additional lua-c-closure with two upvalues.
typedef int (*af_CFunction)(lua_State *L, void *ctx);
static void af_pushcclosure(lua_State *L, af_CFunction fn, int n);
@ -249,7 +249,7 @@ static void load_file(lua_State *L, const char *fname)
struct script_ctx *ctx = get_ctx(L);
MP_DBG(ctx, "loading file %s\n", fname);
void *tmp = talloc_new(ctx);
// according to Lua manaual chunkname should be '@' plus the filename
// according to Lua manual chunkname should be '@' plus the filename
char *dispname = talloc_asprintf(tmp, "@%s", fname);
struct bstr s = stream_read_file(fname, tmp, ctx->mpctx->global, 100000000);
if (!s.start)

View File

@ -251,7 +251,7 @@ function next_utf8(str, pos)
return pos
end
-- As above, but finds the previous UTF-8 charcter in 'str' before 'pos'
-- As above, but finds the previous UTF-8 character in 'str' before 'pos'
function prev_utf8(str, pos)
if pos <= 1 then return pos end
repeat

View File

@ -34,7 +34,7 @@ local user_opts = {
seekbarstyle = "bar", -- bar, diamond or knob
seekbarhandlesize = 0.6, -- size ratio of the diamond and knob handle
seekrangestyle = "inverted",-- bar, line, slider, inverted or none
seekrangeseparate = true, -- wether the seekranges overlay on the bar-style seekbar
seekrangeseparate = true, -- whether the seekranges overlay on the bar-style seekbar
seekrangealpha = 200, -- transparency of seekranges
seekbarkeyframes = true, -- use keyframes when dragging the seekbar
title = "${media-title}", -- string compatible with property-expansion
@ -2834,7 +2834,7 @@ function visibility_mode(mode, no_osd)
end
-- Reset the input state on a mode change. The input state will be
-- recalcuated on the next render cycle, except in 'never' mode where it
-- recalculated on the next render cycle, except in 'never' mode where it
-- will just stay disabled.
mp.disable_key_bindings("input")
mp.disable_key_bindings("window-controls")

View File

@ -145,8 +145,8 @@ local function no_ASS(t)
-- mp.set_osd_ass doesn't support ass-escape. roll our own.
-- similar to mpv's sub/osd_libass.c:mangle_ass(...), excluding
-- space after newlines because no_ASS is not used with multi-line.
-- space at the begining is replaced with "\\h" because it matters
-- at the begining of a line, and we can't know where our output
-- space at the beginning is replaced with "\\h" because it matters
-- at the beginning of a line, and we can't know where our output
-- ends up. no issue if it ends up at the middle of a line.
return tostring(t)
:gsub("\\", ESC_BACKSLASH)

View File

@ -460,7 +460,7 @@ static void sadd_osd_status(char **buffer, struct MPContext *mpctx, int level)
}
}
// OSD messages initated by seeking commands are added lazily with this
// OSD messages initiated by seeking commands are added lazily with this
// function, because multiple successive seek commands can be coalesced.
static void add_seek_osd_messages(struct MPContext *mpctx)
{

View File

@ -219,7 +219,7 @@ static bool skip_bracketed(struct sd_filter *sd, char **rpp, struct buffer *buf)
return true;
}
// check for paranthesed text, like (SOUND)
// check for parenthesized text, like (SOUND)
// and skip it while preserving ass tags
// normal subtitles may include mixed case text in parentheses so
// only upper case is accepted and lower case l which for some
@ -233,9 +233,9 @@ static bool skip_bracketed(struct sd_filter *sd, char **rpp, struct buffer *buf)
// scan in source string
// the first character in source string must be the starting '('
// and copy ass tags to destination string but
// skipping paranthesed text if it looks like SDH
// skipping parenthesized text if it looks like SDH
//
// return true if paranthesed text was removed.
// return true if parenthesized text was removed.
// if not valid SDH read pointer and write buffer position will be unchanged
// otherwise they point to next position after text and next write position
static bool skip_parenthesed(struct sd_filter *sd, char **rpp, struct buffer *buf)
@ -413,7 +413,7 @@ static char *filter_SDH(struct sd_filter *sd, char *data, int length, ptrdiff_t
}
}
}
// if no normal text i last line - remove last line
// if no normal text in last line - remove last line
// by moving write pointer to start of last line
if (!line_with_text) {
buf->pos = wp_line_end;

View File

@ -17,7 +17,7 @@ static void run(struct test_ctx *ctx)
x = gl_video_scale_ambient_lux(16.0, 64.0, 2.40, 1.961, 0.0);
assert_float_equal(x, 2.40f, FLT_EPSILON);
// 32 corresponds to the the midpoint after converting lux to the log10 scale
// 32 corresponds to the midpoint after converting lux to the log10 scale
x = gl_video_scale_ambient_lux(16.0, 64.0, 2.40, 1.961, 32.0);
float mid_gamma = (2.40 - 1.961) / 2 + 1.961;
assert_float_equal(x, mid_gamma, FLT_EPSILON);

View File

@ -262,7 +262,7 @@ static int hwdec_compare(const void *p1, const void *p2)
// List non-copying entries first, so --hwdec=auto takes them.
if (h1->copying != h2->copying)
return h1->copying ? 1 : -1;
// Order by autoprobe preferrence order.
// Order by autoprobe preference order.
if (h1->auto_pos != h2->auto_pos)
return h1->auto_pos > h2->auto_pos ? 1 : -1;
// Fallback sort order to make sorting stable.

View File

@ -80,7 +80,7 @@ struct vo_cocoa_state {
bool window_is_dragged;
id event_monitor_mouseup;
bool embedded; // wether we are embedding in another GUI
bool embedded; // whether we are embedding in another GUI
IOPMAssertionID power_mgmt_assertion;
io_connect_t light_sensor;
@ -185,7 +185,7 @@ static void set_application_icon(NSApplication *app)
static int lmuvalue_to_lux(uint64_t v)
{
// the polinomial approximation for apple lmu value -> lux was empirically
// the polynomial approximation for apple lmu value -> lux was empirically
// derived by firefox developers (Apple provides no documentation).
// https://bugzilla.mozilla.org/show_bug.cgi?id=793728
double power_c4 = 1/pow((double)10,27);

View File

@ -458,7 +458,7 @@ static void d3d11_uninit(struct ra_ctx *ctx)
vo_w32_uninit(ctx->vo);
SAFE_RELEASE(p->device);
// Destory the RA last to prevent objects we hold from showing up in D3D's
// Destroy the RA last to prevent objects we hold from showing up in D3D's
// leak checker
if (ctx->ra)
ctx->ra->fns->destroy(ctx->ra);

View File

@ -382,7 +382,7 @@ const struct filter_kernel mp_filter_kernels[] = {
{{"ewa_lanczossoft", 3.2383154841662362, jinc, .blur = 1.015,
.resizable = true}, .polar = true, .window = "jinc"},
// Very soft (blurred) hanning-windowed jinc; removes almost all aliasing.
// Blur paramater picked to match orthogonal and diagonal contributions
// Blur parameter picked to match orthogonal and diagonal contributions
{{"haasnsoft", 3.2383154841662362, jinc, .blur = 1.11, .resizable = true},
.polar = true, .window = "hanning"},
// Cubic filters

View File

@ -82,7 +82,7 @@ struct ra_hwdec_mapper_driver {
void (*uninit)(struct ra_hwdec_mapper *mapper);
// Map mapper->src as texture, and set mapper->frame to textures using it.
// It is expected that that the textures remain valid until the next unmap
// It is expected that the textures remain valid until the next unmap
// or uninit call.
// The function is allowed to unref mapper->src if it's not needed (i.e.
// this function creates a copy).

View File

@ -3246,7 +3246,7 @@ static void gl_video_interpolate_frame(struct gl_video *p, struct vo_frame *t,
}
if (oversample) {
// Oversample uses the frame area as mix ratio, not the the vsync
// Oversample uses the frame area as mix ratio, not the vsync
// position itself
double vsync_dist = t->vsync_interval / t->ideal_frame_duration,
threshold = tscale->conf.kernel.params[0];

View File

@ -392,7 +392,7 @@ void pass_linearize(struct gl_shader_cache *sc, enum mp_csp_trc trc)
" / (vec3(%f) - vec3(%f) * color.rgb);\n",
PQ_C1, PQ_C2, PQ_C3);
GLSLF("color.rgb = pow(color.rgb, vec3(%f));\n", 1.0 / PQ_M1);
// PQ's output range is 0-10000, but we need it to be relative to to
// PQ's output range is 0-10000, but we need it to be relative to
// MP_REF_WHITE instead, so rescale
GLSLF("color.rgb *= vec3(%f);\n", 10000 / MP_REF_WHITE);
break;

View File

@ -152,7 +152,7 @@ class Common: NSObject {
}
func uninitCommon() {
setCursorVisiblility(true)
setCursorVisibility(true)
stopDisplaylink()
uninitLightSensor()
removeDisplayReconfigureObserver()
@ -388,10 +388,10 @@ class Common: NSObject {
}
func updateCursorVisibility() {
setCursorVisiblility(cursorVisibilityWanted)
setCursorVisibility(cursorVisibilityWanted)
}
func setCursorVisiblility(_ visible: Bool) {
func setCursorVisibility(_ visible: Bool) {
NSCursor.setHiddenUntilMouseMoves(!visible && (view?.canHideCursor() ?? false))
}
@ -593,7 +593,7 @@ class Common: NSObject {
let cursorVisibility = data.assumingMemoryBound(to: CBool.self)
cursorVisibilityWanted = cursorVisibility.pointee
DispatchQueue.main.async {
self.setCursorVisiblility(self.cursorVisibilityWanted)
self.setCursorVisibility(self.cursorVisibilityWanted)
}
return VO_TRUE
case VOCTRL_GET_ICC_PROFILE:

View File

@ -65,7 +65,7 @@ class View: NSView {
}
func isURL(_ str: String) -> Bool {
// force unwrapping is fine here, regex is guarnteed to be valid
// force unwrapping is fine here, regex is guaranteed to be valid
let regex = try! NSRegularExpression(pattern: "^(https?|ftp)://[^\\s/$.?#].[^\\s]*$",
options: .caseInsensitive)
let isURL = regex.numberOfMatches(in: str,
@ -127,7 +127,7 @@ class View: NSView {
cocoa_put_key_with_modifiers(SWIFT_KEY_MOUSE_LEAVE, 0)
}
common.titleBar?.hide()
common.setCursorVisiblility(true)
common.setCursorVisibility(true)
}
override func mouseMoved(with event: NSEvent) {

View File

@ -554,7 +554,7 @@ class Window: NSWindow, NSWindowDelegate {
}
func windowDidResignKey(_ notification: Notification) {
common.setCursorVisiblility(true)
common.setCursorVisibility(true)
}
func windowDidBecomeKey(_ notification: Notification) {

View File

@ -133,7 +133,7 @@ static const char *gbm_format_to_string(uint32_t format)
// Allow falling back to an ARGB EGLConfig when we have an XRGB framebuffer.
// Also allow falling back to an XRGB EGLConfig for ARGB framebuffers, since
// this seems neccessary to work with broken Mali drivers that don't report
// this seems necessary to work with broken Mali drivers that don't report
// their EGLConfigs as supporting alpha properly.
static uint32_t fallback_format_for(uint32_t format)
{

View File

@ -98,7 +98,7 @@ typedef struct d3d_priv {
RECT fs_panscan_rect; /**< PanScan source surface cropping in
fullscreen */
int src_width; /**< Source (movie) width */
int src_height; /**< Source (movie) heigth */
int src_height; /**< Source (movie) height */
struct mp_osd_res osd_res;
int image_format; /**< mplayer image format */
struct mp_image_params params;

View File

@ -346,7 +346,7 @@ static int win_x11_init_vdpau_flip_queue(struct vo *vo)
"vdp_presentation_queue_target_create_x11");
}
/* Emperically this seems to be the first call which fails when we
/* Empirically this seems to be the first call which fails when we
* try to reinit after preemption while the user is still switched
* from X to a virtual terminal (creating the vdp_device initially
* succeeds, as does creating the flip_target above). This is

View File

@ -99,7 +99,7 @@ struct vo_w32_state {
bool focused;
// whether the window position and size were intialized
// whether the window position and size were initialized
bool window_bounds_initialized;
bool current_fs;