dxva2: fix copying surfaces with different stride
audio: add command/function to reload audio output

Anticipated use: simple solution for dealing with audio APIs which
request configuration changes via events.
command: add audio-device property

Meant for changing the --audio-device at runtime.
dxva2: use gpu_memcpy with unmatched strides

Like memcpy_pic, this checks if the strides match first.
x11: fix display FPS detection for interlaced modes

In interlaced modes, we output fields, not complete frames, so the
framerate doubles.

The method to calculate this was borrowed from xrandr code.

Hopefully fixes #1224.
command: try 'icy-title' metadata for media-title as well
libmpv: cocoa: add basic menu
libmpv: cocoa: fix view leak on uninit

The code was lacking a -removeFromSuperview call which resulted in a leak on
our part if the parent view in the client was not released.
cocoa: fix small leak
player: don't spam video-reconfig event

Without --force-window, this is called on every iteration or so, and
calling uninit_video_out() sends the video-reconfig event. Avoid sending
redundant events.

Fixes #1225 (using an alternative patch).
command: play the correct entry with loadfile ... append-play

The playlist may be non-empty even if the player is idle. Instead of playing the
first entry, play the entry that was just added.
manpage: clarify loadfile append-play mode

Documents the behavior introduced with the previous commit.
coreaudio: only list output devices
client API: clarify statement about thread-safety

The only reason for mpv_wait_event() not being thread-safe is that it
returns a pointer to a mpv_event struct member in the mpv_handle
context, which in turn is done for ABI-safety (user doesn't allocate or
manage the struct), and to avoid the need additional memory management.

Some users were interpreting this incorrectly.
demux: seek to position 0 when loading, instead of restoring it

This was originally done for DVD/BD/DVB, where the start position could
be something different from 0, and seeking back to 0 would mess it up
completely.

Since we're not quite sure that these streams are unseekable, we can
simplify this somewhat, and also make sure we also start at 0 for normal
files. Helps a little bit with the following edition reloading commit.
player: handle edition reloading slightly differently

Use the codepath that is normally used for DVD/BD title switching and
DVB channel switching. Removes some extra artifacts from the client API:
now MPV_EVENT_END_FILE will never be called on reloads (and neither is
MPV_EVENT_START_FILE).
client API: add an enum for mpv_event_end_file.reason

Using magic integer values was an attempt to keep the API less verbose.
But it was probably not a good idea.

Reason 1 (restart) is not made explicit, because it is not used anymore
starting with the previous commit. For ABI compatibility, the value is
left as a hole in the enum.
client API: better error reporting

Give somewhat more information on playback failure.
player: handle DVB demuxer reloading correctly

This was probably done incorrectly in cases when the currently selected
channel had no data. I'm not sure if this codepath is functional at all,
though. Maybe not.

Untested due to lack of DVB hardware.
player: add an option to abort playback on partial init failures

This is probably what libmpv users want; and it also improves error
reporting (or we'd have to add a way to communicate such mid-playback
failures as events).