From 292a5868cb60c481ae9eaed7d21e67dcff41938f Mon Sep 17 00:00:00 2001 From: Harri Nieminen Date: Mon, 27 Mar 2023 23:42:17 +0300 Subject: [PATCH] various: fix typos Found by codespell --- DOCS/build-system-differences.md | 2 +- DOCS/interface-changes.rst | 2 +- DOCS/man/input.rst | 8 ++++---- DOCS/man/options.rst | 8 ++++---- filters/f_hwtransfer.c | 2 +- filters/filter.h | 2 +- filters/filter_internal.h | 2 +- libmpv/stream_cb.h | 2 +- options/m_option.c | 6 +++--- options/parse_configfile.c | 4 ++-- player/lua/osc.lua | 4 ++-- player/lua/stats.lua | 2 +- player/video.c | 2 +- test/meson.build | 2 +- video/filter/vf_d3d11vpp.c | 2 +- video/mp_image_pool.c | 2 +- video/out/d3d11/ra_d3d11.c | 2 +- video/out/gpu/context.h | 2 +- video/out/gpu/ra.h | 2 +- video/out/hwdec/hwdec_drmprime.c | 2 +- video/out/hwdec/hwdec_vaapi.c | 2 +- video/out/vo.h | 2 +- video/out/vo_direct3d.c | 2 +- video/out/vo_dmabuf_wayland.c | 2 +- video/out/vo_gpu_next.c | 2 +- video/out/vo_sixel.c | 2 +- video/out/wayland_common.c | 8 ++++---- wscript | 2 +- 28 files changed, 41 insertions(+), 41 deletions(-) diff --git a/DOCS/build-system-differences.md b/DOCS/build-system-differences.md index ba430a219d..da5b76e408 100644 --- a/DOCS/build-system-differences.md +++ b/DOCS/build-system-differences.md @@ -27,7 +27,7 @@ that you get for free. In some cases, these overlapped with custom waf options. supported in the meson build. Instead, pass the generic pkg-config values such as ``lua52``, ``lua5.2``, etc. * ``--lgpl`` was changed to ``gpl``. If ``gpl`` is false, the build is LGPL2.1+. -* ``--tests`` was removed since unit tests now explictly require meson to run +* ``--tests`` was removed since unit tests now explicitly require meson to run ### Boolean Options diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst index 919e23c412..e44697dbad 100644 --- a/DOCS/interface-changes.rst +++ b/DOCS/interface-changes.rst @@ -45,7 +45,7 @@ Interface changes - add `--video-sync=display-tempo` - the `start` option is no longer unconditionally written by watch-later. It is still written by default but you may - need to explictly add `start` depending on how you have + need to explicitly add `start` depending on how you have `--watch-later-options` configured. - add `--vd-lavc-dr=auto` and make it the default - add support for the fractional scale protocol in wayland diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst index 20c4febe4a..6424d24adb 100644 --- a/DOCS/man/input.rst +++ b/DOCS/man/input.rst @@ -186,7 +186,7 @@ character at the value. Custom quotes also take the content literally, but are more flexible than single quotes. They start with ````` (back-quote) followed by any ASCII character, -and end at the first occurance of the same pair in reverse order, e.g. +and end at the first occurrence of the same pair in reverse order, e.g. ```-foo-``` or ````bar````. The final pair sequence is not allowed at the value - in these examples ``-``` and `````` respectively. In the second example the last character of the value also can't be a back-quote. @@ -1097,7 +1097,7 @@ Input Commands that are Possibly Subject to Change Before mpv 0.18.1, you had to do manual "double buffering" when updating an overlay by replacing it with a different memory buffer. Since mpv 0.18.1, the memory is simply copied and doesn't reference any of the - memory indicated by the command's arguments after the commend returns. + memory indicated by the command's arguments after the command returns. If you want to use this command before mpv 0.18.1, reads the old docs to see how to handle this correctly. @@ -1389,7 +1389,7 @@ Input Commands that are Possibly Subject to Change This was mostly created for network streams. For local files, there may be much better methods to create excerpts and such. There are tons of - much more user-friendly Lua scripts, that will reencode parts of a file + much more user-friendly Lua scripts, that will re-encode parts of a file by spawning a separate instance of ``ffmpeg``. With network streams, this is not that easily possible, as the stream would have to be downloaded again. Even if ``--stream-record`` is used to record the @@ -2795,7 +2795,7 @@ Property list Name of the Nth entry. Available if the playlist file contains such fields and mpv's parser supports it for the given playlist format, or if the playlist entry has been opened before and a - media-title other then then filename has been aquired. + media-title other then then filename has been acquired. ``playlist/N/id`` Unique ID for this entry. This is an automatically assigned integer ID diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index 37bc63c729..df3674c832 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -260,7 +260,7 @@ Playback Control The way older versions of mpv played playlist files via ``--playlist`` was not safe against maliciously constructed files. Such files may - trigger harmful actions. This has been the case for all verions of + trigger harmful actions. This has been the case for all versions of mpv prior to 0.31.0, and all MPlayer versions, but unfortunately this fact was not well documented earlier, and some people have even misguidedly recommended the use of ``--playlist`` with untrusted @@ -1253,7 +1253,7 @@ Video :nvdec: requires ``--vo=gpu`` (Any platform CUDA is available) :nvdec-copy: copies video back to system RAM (Any platform CUDA is available) :drm: requires ``--vo=gpu`` (Linux only) - :drm-copy: copies video back to system RAM (Linux ony) + :drm-copy: copies video back to system RAM (Linux only) Other hwdecs (only use if you know you have to): @@ -3076,7 +3076,7 @@ Window :window: On top of all other windows. :system: On top of system elements like Taskbar, Menubar and Dock. - :desktop: On top of the Dekstop behind windows and Desktop icons. + :desktop: On top of the Desktop behind windows and Desktop icons. :level: A level as integer. ``--focus-on-open``, ``--no-focus-on-open`` @@ -6103,7 +6103,7 @@ them. ```` can be one of the following: - :titlebar: The standard macOS titel bar material. + :titlebar: The standard macOS title bar material. :selection: The standard macOS selection material. :menu: The standard macOS menu material. (macOS 10.11+) :popover: The standard macOS popover material. (macOS 10.11+) diff --git a/filters/f_hwtransfer.c b/filters/f_hwtransfer.c index 13a2224e95..44f13b391b 100644 --- a/filters/f_hwtransfer.c +++ b/filters/f_hwtransfer.c @@ -124,7 +124,7 @@ int mp_hwupload_find_upload_format(struct mp_hwupload *u, int imgfmt) select_format(p, imgfmt, &sw, &up); // In th case where the imgfmt is not natively supported, it must be // converted, either before or during upload. If the imgfmt is supported as - // an hw input format, then prefer that, and if the upload has to do implict + // an hw input format, then prefer that, and if the upload has to do implicit // conversion, that's fine. On the other hand, if the imgfmt is not a // supported input format, then pick the output format as the conversion // target to avoid doing two conversions (one before upload, and one during diff --git a/filters/filter.h b/filters/filter.h index 4df54b6112..35a4afac83 100644 --- a/filters/filter.h +++ b/filters/filter.h @@ -63,7 +63,7 @@ bool mp_pin_out_has_data(struct mp_pin *p); // frame is available, but to get proper data flow in filters, you should // probably follow the preferred conventions.) // If no frame is returned, a frame is automatically requested via -// mp_pin_out_request_data() (so it might be retuned in the future). +// mp_pin_out_request_data() (so it might be returned in the future). // If a frame is returned, no new frame is automatically requested (this is // usually not wanted, because it could lead to additional buffering). // This is guaranteed to return a non-NONE frame if mp_pin_out_has_data() diff --git a/filters/filter_internal.h b/filters/filter_internal.h index 02acef6254..e2e9db9ef1 100644 --- a/filters/filter_internal.h +++ b/filters/filter_internal.h @@ -98,7 +98,7 @@ struct mp_filter_info { bool (*command)(struct mp_filter *f, struct mp_filter_command *cmd); }; -// Return the mp_filter_info this filter was crated with. +// Return the mp_filter_info this filter was created with. const struct mp_filter_info *mp_filter_get_info(struct mp_filter *f); // Create a filter instance. Returns NULL on failure. diff --git a/libmpv/stream_cb.h b/libmpv/stream_cb.h index 7482203637..9d1c2cc8d3 100644 --- a/libmpv/stream_cb.h +++ b/libmpv/stream_cb.h @@ -119,7 +119,7 @@ typedef int64_t (*mpv_stream_cb_read_fn)(void *cookie, char *buf, uint64_t nbyte * * @param cookie opaque cookie identifying the stream, * returned from mpv_stream_cb_open_fn - * @param offset target absolut stream position + * @param offset target absolute stream position * @return the resulting offset of the stream * MPV_ERROR_UNSUPPORTED or MPV_ERROR_GENERIC if the seek failed */ diff --git a/options/m_option.c b/options/m_option.c index 8d926e6254..a796707219 100644 --- a/options/m_option.c +++ b/options/m_option.c @@ -1756,7 +1756,7 @@ static int parse_keyvalue_list(struct mp_log *log, const m_option_t *opt, } if (param.len) { - mp_err(log, "Unparseable garbage at end of option value: '%.*s'\n", + mp_err(log, "Unparsable garbage at end of option value: '%.*s'\n", BSTR_P(param)); r = M_OPT_INVALID; } @@ -1948,7 +1948,7 @@ const m_option_type_t m_option_type_dummy_flag = { // Read s sub-option name, or a positional sub-opt value. // termset is a string containing the set of chars that terminate an option. -// Return 0 on succes, M_OPT_ error code otherwise. +// Return 0 on success, M_OPT_ error code otherwise. // optname is for error reporting. static int read_subparam(struct mp_log *log, bstr optname, char *termset, bstr *str, bstr *out_subparam) @@ -2274,7 +2274,7 @@ void m_geometry_apply(int *xpos, int *ypos, int *widw, int *widh, *widw = *widh * asp; } // Center window after resize. If valid x:y values are passed to - // geometry, then those values will be overriden. + // geometry, then those values will be overridden. *xpos += prew / 2 - *widw / 2; *ypos += preh / 2 - *widh / 2; } diff --git a/options/parse_configfile.c b/options/parse_configfile.c index 9daa25e350..0058806fdb 100644 --- a/options/parse_configfile.c +++ b/options/parse_configfile.c @@ -69,7 +69,7 @@ int m_config_parse(m_config_t *config, const char *location, bstr data, goto error; } if (skip_ws(&line)) { - MP_ERR(config, "%s unparseable extra characters: '%.*s'\n", + MP_ERR(config, "%s unparsable extra characters: '%.*s'\n", loc, BSTR_P(line)); goto error; } @@ -120,7 +120,7 @@ int m_config_parse(m_config_t *config, const char *location, bstr data, } } if (skip_ws(&line)) { - MP_ERR(config, "%s unparseable extra characters: '%.*s'\n", + MP_ERR(config, "%s unparsable extra characters: '%.*s'\n", loc, BSTR_P(line)); goto error; } diff --git a/player/lua/osc.lua b/player/lua/osc.lua index 28688e2bdd..bf3992faa9 100644 --- a/player/lua/osc.lua +++ b/player/lua/osc.lua @@ -452,7 +452,7 @@ local elements = {} function prepare_elements() - -- remove elements without layout or invisble + -- remove elements without layout or invisible local elements2 = {} for n, element in pairs(elements) do if not (element.layout == nil) and (element.visible) then @@ -2325,7 +2325,7 @@ function render() -- init management if state.active_element then - -- mouse is held down on some element - keep ticking and igore initReq + -- mouse is held down on some element - keep ticking and ignore initReq -- till it's released, or else the mouse-up (click) will misbehave or -- get ignored. that's because osc_init() recreates the osc elements, -- but mouse handling depends on the elements staying unmodified diff --git a/player/lua/stats.lua b/player/lua/stats.lua index 215814d36d..93261b02c7 100644 --- a/player/lua/stats.lua +++ b/player/lua/stats.lua @@ -431,7 +431,7 @@ local function keyname_cells(k) end local function get_kbinfo_lines(width) - -- active keys: only highest priotity of each key, and not our (stats) keys + -- active keys: only highest priority of each key, and not our (stats) keys local bindings = mp.get_property_native("input-bindings", {}) local active = {} -- map: key-name -> bind-info for _, bind in pairs(bindings) do diff --git a/player/video.c b/player/video.c index c0b7fc109a..547f67c9de 100644 --- a/player/video.c +++ b/player/video.c @@ -598,7 +598,7 @@ static void update_avsync_before_frame(struct MPContext *mpctx) if (opts->autosync) { /* Smooth reported playback position from AO by averaging - * it with the value expected based on previus value and + * it with the value expected based on previous value and * time elapsed since then. May help smooth video timing * with audio output that have inaccurate position reporting. * This is badly implemented; the behavior of the smoothing diff --git a/test/meson.build b/test/meson.build index 1b9b40f7b1..f2ced866f1 100644 --- a/test/meson.build +++ b/test/meson.build @@ -107,7 +107,7 @@ endif # Will need to be manually updated when ffmpeg adds/removes more formats in the future. if libavutil.version().version_compare('>= 57.39.101') -# The CI can randomly fail if libavutil isn't explictly linked again here. +# The CI can randomly fail if libavutil isn't explicitly linked again here. img_format = executable('img-format', 'img_format.c', include_directories: incdir, dependencies: libavutil, link_with: [img_utils, test_utils]) test('img-format', img_format, args: [refdir, outdir], suite: 'ffmpeg') diff --git a/video/filter/vf_d3d11vpp.c b/video/filter/vf_d3d11vpp.c index 73f7d70dea..3f00c5aa4d 100644 --- a/video/filter/vf_d3d11vpp.c +++ b/video/filter/vf_d3d11vpp.c @@ -180,7 +180,7 @@ static int recreate_video_proc(struct mp_filter *vf) rindex = 0; } - // TOOD: so, how do we select which rate conversion mode the processor uses? + // TODO: so, how do we select which rate conversion mode the processor uses? hr = ID3D11VideoDevice_CreateVideoProcessor(p->video_dev, p->vp_enum, rindex, &p->video_proc); diff --git a/video/mp_image_pool.c b/video/mp_image_pool.c index 6947812079..2f0259146a 100644 --- a/video/mp_image_pool.c +++ b/video/mp_image_pool.c @@ -274,7 +274,7 @@ int mp_image_hw_download_get_sw_format(struct mp_image *src) return imgfmt; } -// Copies the contents of the HW surface src to system memory and retuns it. +// Copies the contents of the HW surface src to system memory and returns it. // If swpool is not NULL, it's used to allocate the target image. // src must be a hw surface with a AVHWFramesContext attached. // The returned image is cropped as needed. diff --git a/video/out/d3d11/ra_d3d11.c b/video/out/d3d11/ra_d3d11.c index f47513692f..7cf3686593 100644 --- a/video/out/d3d11/ra_d3d11.c +++ b/video/out/d3d11/ra_d3d11.c @@ -2021,7 +2021,7 @@ static ra_timer *timer_create(struct ra *ra) // Measuring duration in D3D11 requires three queries: start and end // timestamps, and a disjoint query containing a flag which says whether - // the timestamps are usable or if a discontinuity occured between them, + // the timestamps are usable or if a discontinuity occurred between them, // like a change in power state or clock speed. The disjoint query also // contains the timer frequency, so the timestamps are useless without it. hr = ID3D11Device_CreateQuery(p->dev, diff --git a/video/out/gpu/context.h b/video/out/gpu/context.h index 8ad77a6698..27d8462f97 100644 --- a/video/out/gpu/context.h +++ b/video/out/gpu/context.h @@ -103,5 +103,5 @@ struct ra_swapchain_fns { struct ra_ctx *ra_ctx_create(struct vo *vo, struct ra_ctx_opts opts); void ra_ctx_destroy(struct ra_ctx **ctx); -// Special case of creating a ra_ctx while specifiying a specific context by name. +// Special case of creating a ra_ctx while specifying a specific context by name. struct ra_ctx *ra_ctx_create_by_name(struct vo *vo, const char *name); diff --git a/video/out/gpu/ra.h b/video/out/gpu/ra.h index b38eba7a82..97bb9eeda2 100644 --- a/video/out/gpu/ra.h +++ b/video/out/gpu/ra.h @@ -461,7 +461,7 @@ struct ra_fns { // Copy a sub-rectangle from one texture to another. The source/dest region // is always within the texture bounds. Areas outside the dest region are - // preserved. The formats of the textures must be losely compatible. The + // preserved. The formats of the textures must be loosely compatible. The // dst texture can be a swapchain framebuffer, but src can not. Only 2D // textures are supported. // The textures must have blit_src and blit_dst set, respectively. diff --git a/video/out/hwdec/hwdec_drmprime.c b/video/out/hwdec/hwdec_drmprime.c index d74f9593ba..52ac54e30d 100644 --- a/video/out/hwdec/hwdec_drmprime.c +++ b/video/out/hwdec/hwdec_drmprime.c @@ -236,7 +236,7 @@ static int mapper_map(struct ra_hwdec_mapper *mapper) } // We can handle composed formats if the total number of planes is still - // equal the number of planes we expect. Complex formats with auxilliary + // equal the number of planes we expect. Complex formats with auxiliary // planes cannot be supported. int num_returned_planes = 0; diff --git a/video/out/hwdec/hwdec_vaapi.c b/video/out/hwdec/hwdec_vaapi.c index e5ea3b1289..72a6cce263 100644 --- a/video/out/hwdec/hwdec_vaapi.c +++ b/video/out/hwdec/hwdec_vaapi.c @@ -301,7 +301,7 @@ static int mapper_map(struct ra_hwdec_mapper *mapper) } // We can handle composed formats if the total number of planes is still - // equal the number of planes we expect. Complex formats with auxilliary + // equal the number of planes we expect. Complex formats with auxiliary // planes cannot be supported. if (p->num_planes != 0 && p->num_planes != num_returned_planes) { mp_msg(mapper->log, p_owner->probing_formats ? MSGL_DEBUG : MSGL_ERR, diff --git a/video/out/vo.h b/video/out/vo.h index 0f01a4b056..55c55df15e 100644 --- a/video/out/vo.h +++ b/video/out/vo.h @@ -132,7 +132,7 @@ enum mp_voctrl { VOCTRL_EXTERNAL_RESIZE, }; -// Helper to expose what kind of content is curently playing to the VO. +// Helper to expose what kind of content is currently playing to the VO. enum mp_content_type { MP_CONTENT_NONE, // used for force-window MP_CONTENT_IMAGE, diff --git a/video/out/vo_direct3d.c b/video/out/vo_direct3d.c index 2fe26db173..1c78cebbc6 100644 --- a/video/out/vo_direct3d.c +++ b/video/out/vo_direct3d.c @@ -570,7 +570,7 @@ static bool change_d3d_backbuffer(d3d_priv *priv) } } else { if (FAILED(IDirect3DDevice9_Reset(priv->d3d_device, &present_params))) { - MP_ERR(priv, "Reseting Direct3D device failed.\n"); + MP_ERR(priv, "Resetting Direct3D device failed.\n"); return 0; } } diff --git a/video/out/vo_dmabuf_wayland.c b/video/out/vo_dmabuf_wayland.c index 6b85bdf226..9606d1b0db 100644 --- a/video/out/vo_dmabuf_wayland.c +++ b/video/out/vo_dmabuf_wayland.c @@ -200,7 +200,7 @@ static void resize(struct vo *vo) if (wl->viewport) wp_viewport_set_destination(wl->viewport, 2 * dst.x0 + mp_rect_w(dst), 2 * dst.y0 + mp_rect_h(dst)); - //now we restore pan for video viewport caculation + //now we restore pan for video viewport calculation vo->opts->pan_x = vo_opts->pan_x; vo->opts->pan_y = vo_opts->pan_y; vo_get_src_dst_rects(vo, &src, &dst, &osd); diff --git a/video/out/vo_gpu_next.c b/video/out/vo_gpu_next.c index d66ffceb99..2539dc57e4 100644 --- a/video/out/vo_gpu_next.c +++ b/video/out/vo_gpu_next.c @@ -1141,7 +1141,7 @@ static void video_screenshot(struct vo *vo, struct voctrl_screenshot *args) status = pl_queue_update(p->queue, &mix, pl_queue_params(.pts = p->last_pts)); assert(status != PL_QUEUE_EOF); if (status == PL_QUEUE_ERR) { - MP_ERR(vo, "Unknown error occured while trying to take screenshot!\n"); + MP_ERR(vo, "Unknown error occurred while trying to take screenshot!\n"); return; } if (!mix.num_frames) { diff --git a/video/out/vo_sixel.c b/video/out/vo_sixel.c index 873c7875cc..068b47c4f5 100644 --- a/video/out/vo_sixel.c +++ b/video/out/vo_sixel.c @@ -161,7 +161,7 @@ static SIXELSTATUS prepare_dynamic_palette(struct vo *vo) SIXELSTATUS status = SIXEL_FALSE; struct priv *priv = vo->priv; - /* create histgram and construct color palette + /* create histogram and construct color palette * with median cut algorithm. */ status = sixel_dither_initialize(priv->testdither, priv->buffer, priv->width, priv->height, diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index b5bfb8b917..40d344ffb6 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -276,7 +276,7 @@ static void pointer_handle_button(void *data, struct wl_pointer *wl_pointer, } else { window_move(wl, serial); } - // Explictly send an UP event after the client finishes a move/resize + // Explicitly send an UP event after the client finishes a move/resize mp_input_put_key(wl->vo->input_ctx, button | MP_KEY_STATE_UP); } } @@ -1073,7 +1073,7 @@ static void feedback_presented(void *data, struct wp_presentation_feedback *fbac // Notes: // - tv_sec_lo + tv_sec_hi is the equivalent of oml's ust // - seq_lo + seq_hi is the equivalent of oml's msc - // - these values are updated everytime the compositor receives feedback. + // - these values are updated every time the compositor receives feedback. int64_t sec = (uint64_t) tv_sec_lo + ((uint64_t) tv_sec_hi << 32); int64_t ust = sec * 1000000LL + (uint64_t) tv_nsec / 1000; @@ -1443,7 +1443,7 @@ static int create_xdg_surface(struct vo_wayland_state *wl) xdg_toplevel_add_listener(wl->xdg_toplevel, &xdg_toplevel_listener, wl); if (!wl->xdg_surface || !wl->xdg_toplevel) { - MP_ERR(wl, "failled to create xdg_surface and xdg_toplevel!\n"); + MP_ERR(wl, "failed to create xdg_surface and xdg_toplevel!\n"); return 1; } return 0; @@ -2414,7 +2414,7 @@ void vo_wayland_wait_frame(struct vo_wayland_state *wl) /* We need some vblank interval to use for the timeout in * this function. The order of preference of values to use is: * 1. vsync duration from presentation time - * 2. refresh inteval reported by presentation time + * 2. refresh interval reported by presentation time * 3. refresh rate of the output reported by the compositor * 4. make up crap if vblank_time is still <= 0 (better than nothing) */ diff --git a/wscript b/wscript index e55c60d5a5..7000fc60b1 100644 --- a/wscript +++ b/wscript @@ -405,7 +405,7 @@ iconv support use --disable-iconv.", 'func': check_pkg_config('rubberband >= 3.0.0'), }, { 'name': 'zimg-st428', - 'desc': 'ZIMG suport for ZIMG_TRANSFER_ST428', + 'desc': 'ZIMG support for ZIMG_TRANSFER_ST428', 'func': check_pkg_config('zimg', '>= 3.0.5'), } ]