History

options: remove the `player` argument from `--media-controls`

It is now handled internally by the libmpv profile. Since `player` was the default option, the impact should be minimal, as it is uncommon to override the default option with the same value. yes/no args will function the same way as before this commit.

Kacper Michajłow committed 1 year ago

Commit 96da0cb1 parent 50d7d336 files · +8 −9Browse files

Unified · Split

6 files
  1. DOCS/interface-changes/media-controls-player.txt +1 −0
  2. DOCS/man/options.rst +2 −4
  3. etc/builtin.conf +1 −0
  4. options/options.c +2 −3
  5. options/options.h +1 −1
  6. player/main.c +1 −1
DOCS/interface-changes/media-controls-player.txt+1−0
@@ -0,0 +1 @@
1+remove `player` argument form `--media-controls`, it's handled internally now.
DOCS/man/options.rst+2−4
@@ -7646,12 +7646,10 @@ Miscellaneous · 7645 unmodified lines
76467646
76477647 .. warning:: Using realtime priority can cause system lockup.
76487648
7649−``--media-controls=<yes|player|no>``
7649+``--media-controls=<yes|no>``
76507650 (Windows only)
76517651 Enable integration of media control interface SystemMediaTransportControls.
7652− If set to ``player``, only the player will use the controls. Setting it to
7653− ``yes`` will also enable the controls for libmpv integrations.
7654− (default: ``player``)
7652+ Default: yes (except for libmpv)
76557653
76567654 ``--force-media-title=<string>``
76577655 Force the contents of the ``media-title`` property to this value. Useful
etc/builtin.conf+1−0
@@ -28,6 +28,7 @@ input-default-bindings=no · 27 unmodified lines
2828 input-vo-keyboard=no
2929 # macOS global input hooks
3030 input-media-keys=no
31+media-controls=no
3132
3233 [encoding]
3334 vo=lavc
options/options.c+2−3
@@ -517,8 +517,7 @@ static const m_option_t mp_opts[] = { · 516 unmodified lines
517517 {"idle", IDLE_PRIORITY_CLASS}),
518518 .flags = UPDATE_PRIORITY},
519519 #endif
520− {"media-controls", OPT_CHOICE(media_controls,
521− {"no", 0}, {"player", 1}, {"yes", 2})},
520+ {"media-controls", OPT_BOOL(media_controls)},
522521 {"config", OPT_BOOL(load_config), .flags = M_OPT_PRE_PARSE},
523522 {"config-dir", OPT_STRING(force_configdir),
524523 .flags = M_OPT_NOCFG | M_OPT_PRE_PARSE | M_OPT_FILE},
@@ -1026,7 +1025,7 @@ static const struct MPOpts mp_default_opts = { · 501 unmodified lines
10261025 .osd_bar_visible = true,
10271026 .screenshot_template = "mpv-shot%n",
10281027 .play_dir = 1,
1029− .media_controls = 1,
1028+ .media_controls = true,
10301029 .video_exts = (char *[]){
10311030 "3g2", "3gp", "avi", "flv", "m2ts", "m4v", "mj2", "mkv", "mov", "mp4",
10321031 "mpeg", "mpg", "ogv", "rmvb", "ts", "webm", "wmv", "y4m", NULL
options/options.h+1−1
@@ -337,7 +337,7 @@ typedef struct MPOpts { · 336 unmodified lines
337337 bool osd_bar_visible;
338338
339339 int w32_priority;
340− int media_controls;
340+ bool media_controls;
341341
342342 struct bluray_opts *stream_bluray_opts;
343343 struct cdda_opts *stream_cdda_opts;
player/main.c+1−1
@@ -406,7 +406,7 @@ int mp_initialize(struct MPContext *mpctx, char **options) · 405 unmodified lines
406406 #endif
407407
408408 #if HAVE_WIN32_SMTC
409− if (opts->media_controls == 2 || (mpctx->is_cli && opts->media_controls == 1))
409+ if (opts->media_controls)
410410 mp_smtc_init(mp_new_client(mpctx->clients, "SystemMediaTransportControls"));
411411 #endif
412412

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t