Skip to content

Commit

Permalink
Remove optical disc fancification layers
Browse files Browse the repository at this point in the history
This removes anything related to DVD/BD/CD that negatively affected the
core code. It includes trying to rewrite timestamps (since DVDs and
Blurays do not set packet stream timestamps to playback time, and can
even have resets mid-stream), export of chapters, stream languages,
export of title/track lists, and all that.

Only basic seeking is supported. It is very much possible that seeking
completely fails on some discs (on some parts of the timeline), because
timestamp rewriting was removed.

Note that I don't give a shit about optical media. If you want to watch
them, rip them. Keeping some bare support for DVD/BD is the most I'm
going to do to appease the type of lazy, obnoxious users who will care.
There are other players which are better at optical discs.
  • Loading branch information
wm4 committed Sep 13, 2019
1 parent cf36e3d commit a9d83ea
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 968 deletions.
2 changes: 2 additions & 0 deletions DOCS/interface-changes.rst
Expand Up @@ -80,6 +80,8 @@ Interface changes
and `--macos-title-bar-appearance`.
- The default for `--vulkan-async-compute` has changed to `yes` from `no`
with the move to libplacebo as the back-end for vulkan rendering.
- Remove "disc-titles", "disc-title", "disc-title-list", and "angle"
properties. dvd:// does not support title ranges anymore.
--- mpv 0.29.0 ---
- drop --opensles-sample-rate, as --audio-samplerate should be used if desired
- drop deprecated --videotoolbox-format, --ff-aid, --ff-vid, --ff-sid,
Expand Down
39 changes: 0 additions & 39 deletions DOCS/man/input.rst
Expand Up @@ -1182,8 +1182,6 @@ Property list
``media-title``
If the currently played file has a ``title`` tag, use that.

Otherwise, if the media type is DVD, return the volume ID of DVD.

Otherwise, return the ``filename`` property.

``file-format``
Expand Down Expand Up @@ -1296,40 +1294,6 @@ Property list
Current MKV edition number. Setting this property to a different value will
restart playback. The number of the first edition is 0.

``disc-titles``
Number of BD/DVD titles.

This has a number of sub-properties. Replace ``N`` with the 0-based edition
index.

``disc-titles/count``
Number of titles.

``disc-titles/id``
Title ID as integer. Currently, this is the same as the title index.

``disc-titles/length``
Length in seconds. Can be unavailable in a number of cases (currently
it works for libdvdnav only).

When querying the property with the client API using ``MPV_FORMAT_NODE``,
or with Lua ``mp.get_property_native``, this will return a mpv_node with
the following contents:

::

MPV_FORMAT_NODE_ARRAY
MPV_FORMAT_NODE_MAP (for each edition)
"id" MPV_FORMAT_INT64
"length" MPV_FORMAT_DOUBLE

``disc-title-list``
List of BD/DVD titles.

``disc-title`` (RW)
Current BD/DVD title number. Writing works only for ``dvdnav://`` and
``bd://`` (and aliases for these).

``chapters``
Number of chapters.

Expand Down Expand Up @@ -1369,9 +1333,6 @@ Property list
"title" MPV_FORMAT_STRING
"default" MPV_FORMAT_FLAG

``angle`` (RW)
Current DVD angle.

``metadata``
Metadata key/value pairs.

Expand Down
3 changes: 0 additions & 3 deletions demux/demux.c
Expand Up @@ -57,7 +57,6 @@ extern const demuxer_desc_t demuxer_desc_mf;
extern const demuxer_desc_t demuxer_desc_matroska;
extern const demuxer_desc_t demuxer_desc_lavf;
extern const demuxer_desc_t demuxer_desc_playlist;
extern const demuxer_desc_t demuxer_desc_disc;
extern const demuxer_desc_t demuxer_desc_rar;
extern const demuxer_desc_t demuxer_desc_libarchive;
extern const demuxer_desc_t demuxer_desc_null;
Expand All @@ -68,7 +67,6 @@ extern const demuxer_desc_t demuxer_desc_timeline;
* libraries and demuxers requiring binary support. */

const demuxer_desc_t *const demuxer_list[] = {
&demuxer_desc_disc,
&demuxer_desc_edl,
&demuxer_desc_cue,
&demuxer_desc_rawaudio,
Expand Down Expand Up @@ -2357,7 +2355,6 @@ static struct demuxer *open_given_type(struct mpv_global *global,
.access_references = opts->access_references,
.events = DEMUX_EVENT_ALL,
.duration = -1,
.extended_ctrls = stream->extended_ctrls,
};
demuxer->seekable = stream->seekable;

Expand Down
1 change: 0 additions & 1 deletion demux/demux.h
Expand Up @@ -32,7 +32,6 @@

enum demux_ctrl {
DEMUXER_CTRL_SWITCHED_TRACKS = 1,
DEMUXER_CTRL_RESYNC,
DEMUXER_CTRL_IDENTIFY_PROGRAM,
DEMUXER_CTRL_STREAM_CTRL,
DEMUXER_CTRL_GET_READER_STATE,
Expand Down

0 comments on commit a9d83ea

Please sign in to comment.