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 @@
1−specifying 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
13041304
13051305 Play a path from Samba share. (Requires FFmpeg support.)
13061306
1307−``bd://[title]`` ``--bluray-device=PATH``
1307+``bd://[title][/device]`` ``--bluray-device=PATH``
13081308
13091309 Play a Blu-ray disc. Since libbluray 1.0.1, you can read from ISO files
13101310 by passing them to ``--bluray-device``.
@@ -1316,7 +1316,7 @@ PROTOCOLS · 5 unmodified lines
13161316
13171317 ``bluray://`` is an alias.
13181318
1319−``dvd://[title]`` ``--dvd-device=PATH``
1319+``dvd://[title][/device]`` ``--dvd-device=PATH``
13201320
13211321 Play a DVD. DVD menus are not supported. If no title is given, the longest
13221322 title is auto-selected. Without ``--dvd-device``, it will probably try
@@ -1344,7 +1344,7 @@ PROTOCOLS · 21 unmodified lines
13441344 ``image-2.jpg`` and ``image-10.jpg``, provided that there are no big gaps
13451345 between the files.
13461346
1347−``cdda://`` ``--cdda-device=PATH``
1347+``cdda://[device]`` ``--cdrom-device=PATH`` ``--cdda-...``
13481348
13491349 Play CD. You can select a specific range of tracks to play by using the
13501350 ``--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
414414 char *device = NULL;
415415 /* find the requested device */
416416 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");
419417 device = b->cfg_device;
420418 } else if (b->opts->bluray_device && b->opts->bluray_device[0]) {
421419 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
252252 int last_track;
253253
254254 if (st->path[0]) {
255− MP_WARN(st, "Setting the device after the schema is deprecated. "
256− "Use --cdda-device instead.\n");
257255 p->device = talloc_strdup(priv, st->path);
258256 } else if (p->cdda_device && p->cdda_device[0]) {
259257 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
582582
583583 p->opts = mp_get_config_group(stream, stream->global, &dvd_conf);
584584
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");
585+ if (p->device && p->device[0])
588586 filename = p->device;
589− } else if (p->opts->device && p->opts->device[0]) {
587+ else if (p->opts->device && p->opts->device[0])
590588 filename = p->opts->device;
591− } else {
589+ else
592590 filename = DEFAULT_OPTICAL_DEVICE;
593− };
594591 if (!new_dvdnav_stream(stream, filename)) {
595592 MP_ERR(stream, "Couldn't open DVD device: %s\n",
596593 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