diff options
author | Avi Halachmi (:avih) <avihpit@yahoo.com> | 2021-07-23 19:11:23 +0300 |
---|---|---|
committer | avih <avih@users.noreply.github.com> | 2021-08-05 21:32:22 +0300 |
commit | 7c264950c0bff588f6852c461c26b37a550a5abb (patch) | |
tree | e76d7b54f82e17d709b82c264429069b011cb5dc /options | |
parent | d82a0730690f52f35b14da591564855edd361e34 (diff) | |
download | mpv-7c264950c0bff588f6852c461c26b37a550a5abb.tar.bz2 mpv-7c264950c0bff588f6852c461c26b37a550a5abb.tar.xz |
sub: new: --sub-filter-jsre (js regex)
Pretty much identical to filter-regex but with JS expressions and
requires only JS support. Shares the filter-regex-* control options.
The target audience is Windows users - where filter-regex doesn't
work due to missing APIs, but mujs builds cleanly on Windows, and JS
is usually enabled in 3rd party Windows mpv builds.
Lua could have been used with similar effort, however, the JS regex
syntax is more extensive and also much more similar to POSIX.
Diffstat (limited to 'options')
-rw-r--r-- | options/options.c | 1 | ||||
-rw-r--r-- | options/options.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/options/options.c b/options/options.c index fac31a2bb9..465ac9a35f 100644 --- a/options/options.c +++ b/options/options.c @@ -219,6 +219,7 @@ const struct m_sub_options mp_sub_filter_opts = { {"sub-filter-sdh-harder", OPT_FLAG(sub_filter_SDH_harder)}, {"sub-filter-regex-enable", OPT_FLAG(rf_enable)}, {"sub-filter-regex", OPT_STRINGLIST(rf_items)}, + {"sub-filter-jsre", OPT_STRINGLIST(jsre_items)}, {"sub-filter-regex-warn", OPT_FLAG(rf_warn)}, {0} }, diff --git a/options/options.h b/options/options.h index 41aa88abb9..7963d6bd28 100644 --- a/options/options.h +++ b/options/options.h @@ -115,6 +115,7 @@ struct mp_sub_filter_opts { int sub_filter_SDH_harder; int rf_enable; char **rf_items; + char **jsre_items; int rf_warn; }; |