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 @@
1remove `player` argument form `--media-controls`, it's handled internally now.
DOCS/man/options.rst+2−4
@@ -7646,12 +7646,10 @@ Miscellaneous · 7645 unmodified lines
7646 7646
7647 .. warning:: Using realtime priority can cause system lockup.7647 .. warning:: Using realtime priority can cause system lockup.
7648 7648
7649``--media-controls=<yes|player|no>``7649``--media-controls=<yes|no>``
7650 (Windows only)7650 (Windows only)
7651 Enable integration of media control interface SystemMediaTransportControls.7651 Enable integration of media control interface SystemMediaTransportControls.
7652 If set to ``player``, only the player will use the controls. Setting it to7652 Default: yes (except for libmpv)
7653 ``yes`` will also enable the controls for libmpv integrations.
7654 (default: ``player``)
7655 7653
7656``--force-media-title=<string>``7654``--force-media-title=<string>``
7657 Force the contents of the ``media-title`` property to this value. Useful7655 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
28input-vo-keyboard=no28input-vo-keyboard=no
29# macOS global input hooks29# macOS global input hooks
30input-media-keys=no30input-media-keys=no
31media-controls=no
31 32
32[encoding]33[encoding]
33vo=lavc34vo=lavc
options/options.c+2−3
@@ -517,8 +517,7 @@ static const m_option_t mp_opts[] = { · 516 unmodified lines
517 {"idle", IDLE_PRIORITY_CLASS}),517 {"idle", IDLE_PRIORITY_CLASS}),
518 .flags = UPDATE_PRIORITY},518 .flags = UPDATE_PRIORITY},
519#endif519#endif
520 {"media-controls", OPT_CHOICE(media_controls,520 {"media-controls", OPT_BOOL(media_controls)},
521 {"no", 0}, {"player", 1}, {"yes", 2})},
522 {"config", OPT_BOOL(load_config), .flags = M_OPT_PRE_PARSE},521 {"config", OPT_BOOL(load_config), .flags = M_OPT_PRE_PARSE},
523 {"config-dir", OPT_STRING(force_configdir),522 {"config-dir", OPT_STRING(force_configdir),
524 .flags = M_OPT_NOCFG | M_OPT_PRE_PARSE | M_OPT_FILE},523 .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
1026 .osd_bar_visible = true,1025 .osd_bar_visible = true,
1027 .screenshot_template = "mpv-shot%n",1026 .screenshot_template = "mpv-shot%n",
1028 .play_dir = 1,1027 .play_dir = 1,
1029 .media_controls = 1,1028 .media_controls = true,
1030 .video_exts = (char *[]){1029 .video_exts = (char *[]){
1031 "3g2", "3gp", "avi", "flv", "m2ts", "m4v", "mj2", "mkv", "mov", "mp4",1030 "3g2", "3gp", "avi", "flv", "m2ts", "m4v", "mj2", "mkv", "mov", "mp4",
1032 "mpeg", "mpg", "ogv", "rmvb", "ts", "webm", "wmv", "y4m", NULL1031 "mpeg", "mpg", "ogv", "rmvb", "ts", "webm", "wmv", "y4m", NULL
options/options.h+1−1
@@ -337,7 +337,7 @@ typedef struct MPOpts { · 336 unmodified lines
337 bool osd_bar_visible;337 bool osd_bar_visible;
338 338
339 int w32_priority;339 int w32_priority;
340 int media_controls;340 bool media_controls;
341 341
342 struct bluray_opts *stream_bluray_opts;342 struct bluray_opts *stream_bluray_opts;
343 struct cdda_opts *stream_cdda_opts;343 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
406#endif406#endif
407 407
408#if HAVE_WIN32_SMTC408#if HAVE_WIN32_SMTC
409 if (opts->media_controls == 2 || (mpctx->is_cli && opts->media_controls == 1))409 if (opts->media_controls)
410 mp_smtc_init(mp_new_client(mpctx->clients, "SystemMediaTransportControls"));410 mp_smtc_init(mp_new_client(mpctx->clients, "SystemMediaTransportControls"));
411#endif411#endif
412 412

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