diff options
author | nanahi <130121847+na-na-hi@users.noreply.github.com> | 2024-04-15 22:47:20 -0400 |
---|---|---|
committer | Kacper Michajłow <kasper93@gmail.com> | 2024-04-18 16:28:21 +0200 |
commit | 96e1f1dfa587a4f21e8a7264ab9e28fad7e5739b (patch) | |
tree | 15e6ea8dfc5214e006775454c2a7ac967d6f4fb4 /player/command.c | |
parent | d5ec0698291692eda03f9204e3201fd739ece207 (diff) | |
download | mpv-96e1f1dfa587a4f21e8a7264ab9e28fad7e5739b.tar.bz2 mpv-96e1f1dfa587a4f21e8a7264ab9e28fad7e5739b.tar.xz |
video/out/gpu/context: convert --gpu-context to use obj_settings_list
Since the list of available GPU contexts is a compile time constant,
use obj_settings_list instead of opt_string_validate for GPU contexts.
This has several advantages:
- Aligns with the existing usage of vo, ao, and filter lists.
- Allows custom probing order.
- Allows list option suffixes. (--gpu-context-append, etc.)
- Allows autocomplete in console.lua.
- Uses the standard obj_settings_list help printing, so the custom
help printing function is no longer needed.
This also deduplicates some context creation code for ra_ctx_create
and ra_ctx_create_by_name.
Diffstat (limited to 'player/command.c')
-rw-r--r-- | player/command.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/player/command.c b/player/command.c index 190b1fc025..b7130814d8 100644 --- a/player/command.c +++ b/player/command.c @@ -7306,7 +7306,7 @@ void mp_option_change_callback(void *ctx, struct m_config_option *co, int flags, } if (opt_ptr == &opts->vo->video_driver_list || - opt_ptr == &opts->ra_ctx_opts->context_name || + opt_ptr == &opts->ra_ctx_opts->context_list || opt_ptr == &opts->ra_ctx_opts->context_type) { struct track *track = mpctx->current_track[0][STREAM_VIDEO]; uninit_video_out(mpctx); |