History

Revert "stream_{bluray,cdda,dvdnav}: deprecate setting device after schema"

This reverts part of PR #15899 (commit dd6e3a0ece22b351c8815cf57d18c2d90f1360ee). "Why is this even useful?": It's very useful for multi-disc playlists. Compare: `mpv bd:///DISC{1..4}` `mpv -\{ bd:// --bluray-device=DISC1 -\} -\{ bd:// --bluray-device=DISC2 -\} -\{ bd:// --bluray-device=DISC3 -\} -\{ bd:// --bluray-device=DISC4 -\}`

Yozora80 committed 1 year ago

Commit 13197381 parent 41f2bab5 files · +6 −14Browse files

Unified · Split

5 files
  1. DOCS/interface-changes/optical-device.txt +0 −1
  2. DOCS/man/mpv.rst +3 −3
  3. stream/stream_bluray.c +0 −2
  4. stream/stream_cdda.c +0 −2
  5. stream/stream_dvdnav.c +3 −6
DOCS/interface-changes/optical-device.txt+0−1
@@ -1 +0,0 @@
1specifying an optical device after the schema for the `cdda://`, `dvd://` and `bd://` protocols is deprecated, use the appropriate option (`--cdda-device`) instead
DOCS/man/mpv.rst+3−3
@@ -1304,7 +1304,7 @@ PROTOCOLS · 1303 unmodified lines
1304 1304
1305 Play a path from Samba share. (Requires FFmpeg support.)1305 Play a path from Samba share. (Requires FFmpeg support.)
1306 1306
1307``bd://[title]`` ``--bluray-device=PATH``1307``bd://[title][/device]`` ``--bluray-device=PATH``
1308 1308
1309 Play a Blu-ray disc. Since libbluray 1.0.1, you can read from ISO files1309 Play a Blu-ray disc. Since libbluray 1.0.1, you can read from ISO files
1310 by passing them to ``--bluray-device``.1310 by passing them to ``--bluray-device``.
@@ -1316,7 +1316,7 @@ PROTOCOLS · 5 unmodified lines
1316 1316
1317 ``bluray://`` is an alias.1317 ``bluray://`` is an alias.
1318 1318
1319``dvd://[title]`` ``--dvd-device=PATH``1319``dvd://[title][/device]`` ``--dvd-device=PATH``
1320 1320
1321 Play a DVD. DVD menus are not supported. If no title is given, the longest1321 Play a DVD. DVD menus are not supported. If no title is given, the longest
1322 title is auto-selected. Without ``--dvd-device``, it will probably try1322 title is auto-selected. Without ``--dvd-device``, it will probably try
@@ -1344,7 +1344,7 @@ PROTOCOLS · 21 unmodified lines
1344 ``image-2.jpg`` and ``image-10.jpg``, provided that there are no big gaps1344 ``image-2.jpg`` and ``image-10.jpg``, provided that there are no big gaps
1345 between the files.1345 between the files.
1346 1346
1347``cdda://`` ``--cdda-device=PATH``1347``cdda://[device]`` ``--cdrom-device=PATH`` ``--cdda-...``
1348 1348
1349 Play CD. You can select a specific range of tracks to play by using the1349 Play CD. You can select a specific range of tracks to play by using the
1350 ``--start`` and ``--end`` options and specifying chapters. Navigating1350 ``--start`` and ``--end`` options and specifying chapters. Navigating
stream/stream_bluray.c+0−2
@@ -414,8 +414,6 @@ static int bluray_stream_open_internal(stream_t *s) · 413 unmodified lines
414 char *device = NULL;414 char *device = NULL;
415 /* find the requested device */415 /* find the requested device */
416 if (b->cfg_device && b->cfg_device[0]) {416 if (b->cfg_device && b->cfg_device[0]) {
417 MP_WARN(s, "Setting the device after the schema is deprecated. "
418 "Use --bluray-device instead.\n");
419 device = b->cfg_device;417 device = b->cfg_device;
420 } else if (b->opts->bluray_device && b->opts->bluray_device[0]) {418 } else if (b->opts->bluray_device && b->opts->bluray_device[0]) {
421 device = b->opts->bluray_device;419 device = b->opts->bluray_device;
stream/stream_cdda.c+0−2
@@ -252,8 +252,6 @@ static int open_cdda(stream_t *st) · 251 unmodified lines
252 int last_track;252 int last_track;
253 253
254 if (st->path[0]) {254 if (st->path[0]) {
255 MP_WARN(st, "Setting the device after the schema is deprecated. "
256 "Use --cdda-device instead.\n");
257 p->device = talloc_strdup(priv, st->path);255 p->device = talloc_strdup(priv, st->path);
258 } else if (p->cdda_device && p->cdda_device[0]) {256 } else if (p->cdda_device && p->cdda_device[0]) {
259 p->device = mp_get_user_path(priv, st->global, p->cdda_device);257 p->device = mp_get_user_path(priv, st->global, p->cdda_device);
stream/stream_dvdnav.c+3−6
@@ -582,15 +582,12 @@ static int open_s_internal(stream_t *stream) · 581 unmodified lines
582 582
583 p->opts = mp_get_config_group(stream, stream->global, &dvd_conf);583 p->opts = mp_get_config_group(stream, stream->global, &dvd_conf);
584 584
585 if (p->device && p->device[0]) {585 if (p->device && p->device[0])
586 MP_WARN(stream, "Setting the device after the schema is deprecated. "
587 "Use --dvd-device instead.\n");
588 filename = p->device;586 filename = p->device;
589 } else if (p->opts->device && p->opts->device[0]) {587 else if (p->opts->device && p->opts->device[0])
590 filename = p->opts->device;588 filename = p->opts->device;
591 } else {589 else
592 filename = DEFAULT_OPTICAL_DEVICE;590 filename = DEFAULT_OPTICAL_DEVICE;
593 };
594 if (!new_dvdnav_stream(stream, filename)) {591 if (!new_dvdnav_stream(stream, filename)) {
595 MP_ERR(stream, "Couldn't open DVD device: %s\n",592 MP_ERR(stream, "Couldn't open DVD device: %s\n",
596 filename);593 filename);

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