README: mention minimum FFmpeg/Libav versions
video: remove use of deprecated AVFrame fields on Libav

qscale export has been completely removed from Libav 10, and FFmpeg has
an alternative API, so this code does nothing and only causes
deprecation warnings on Libav.
audio: wake up the core when audio buffer is running low

And also add a function ao_need_data(), which AO drivers can call if
their audio buffer runs low.

This change intends to make it easier for the playback thread: instead
of making the playback thread calculate a timeout at which the audio
buffer should be refilled, make the push.c audio thread wakeup the core
instead.

ao_need_data() is going to be used by ao_pulse, and we need to
workaround a stupid situation with pulseaudio causing a deadlock because
its callback still holds the internal pulseaudio lock.

For AOs that don't call ao_need_data(), the deadline is calculated by
the buffer fill status and latency, as before.
ao_pulse: use ao_need_data()

I'm not quite sure why ao_pulse needs this. It was broken when a thread
to fill audio buffers was added to AO - the pulseaudio callback was
waking up the playback thread, not the audio thread. But nobody noticed,
so it can't be very important. In any case, this change makes it wake up
the audio thread instead (which in turn wakes up the playback thread if
needed).
audio: wake up the core when audio buffer is running low (2)

Same change as in e2184fcb, but this time for pull based AOs. This is
slightly controversial, because it will make a fast syscall from e.g.
ao_jack. And according to JackAudio developers, syscalls are evil and
will destroy realtime operation. But I don't think this is an issue at
all.

Still avoid locking a mutex. I'm not sure what jackaudio does in the
worst case - but if they set the jackaudio thread (and only this thread)
to realtime, we might run into deadlock situations due to priority
inversion and such. I'm not quite sure whether this can happen, but I'll
readily follow the cargo cult if it makes hack happy.
player: remove audio waiting

The audio subsystem now wakes up the playback thread explicitly, and we
don't need this anymore.

It still could cause dropouts and such if there are bugs in the recently
introduced audio changes, so this is a thing to watch out for.
input: deal with playback thread wakeup on windows

The recent change of waking up the playback thread using a wakeup pipe
doesn't work on windows, because windows is horrible. So use a condition
variable instead to wake up the thread. To make things worse, jackaudio
is also horrible and "disallows" the use of mutexes, so all we can do is
implementing a half-solution that is not race condition free.

It would probably better to give up on this lock-free crap in the pull-
API audio path.

Mostly untested.
af_lavcac3enc: detach on any passthrough format, not just ac3
wayland/shm: Use subsurfaces for OSD
wayland: unset input regions for osd

Set a zero sized input region for the osd surfaces in order to avoid getting
input for the subsurfaces which might dissapear any time.
ao: remove redundant get_delay check

It did nothing; the real check is in push.c.
stream_dvd: fix seeking regression

This was accidentally completely destroyed with commit 24f1878e. I
didn't notice it when testing, because forward seeking still worked
mostly.

The issue was that dvd_seek_to_time() actually called stream_seek(),
which was supposed to call the byte-level seek function dvd_seek(). So
we have to restore this function, and replace all generic stream calls
with stream_dvd.c internal ones. This also affects stream->pos (now a
random number as far as stream_dvd.c is concerned) and stream_skip().
stream_dvdnav: print more debugging info
msg: correct ringbuffer log level comparison
player: add a --dump-stats option

This collects statistics and other things. The option dumps raw data
into a file. A script to visualize this data is included too.

Litter some of the player code with calls that generate these
statistics.

In general, this will be helpful to debug timing dependent issues, such
as A/V sync problems. Normally, one could argue that this is the task of
a real profiler, but then we'd have a hard time to include extra
information like audio/video PTS differences. We could also just
hardcode all statistics collection and processing in the player code,
but then we'd end up with something like mplayer's status line, which
was cluttered and required a centralized approach (i.e. getting the data
to the status line; so it was all in mplayer.c). Some players can
visualize such statistics on OSD, but that sounds even more complicated.
So the approach added with this commit sounds sensible.

The stats-conv.py script is rather primitive at the moment and its
output is semi-ugly. It uses matplotlib, so it could probably be
extended to do a lot, so it's not a dead-end.
vo_opengl: make spline36 default with --vo=opengl-hq
ao_null: add simulated device latency, simulate EOF problems

This EOF problems happen at least with PulseAudio, but since it's hard
to reproduce, let ao_null optionally simulate it.
audio: explicitly document audio EOF condition

This should probably be an AO function, but since the playloop still has
some strange stuff (using the buffered_audio variable instead of calling
ao_get_delay() directly), just leave it and make it more explicit.
audio: add hack against broken pulseaudio EOF condition

This was reported with PulseAudio 2.1. Apparently it still has problems
with reporting the correct delay. Since ao_pulse.c still has our custom
get_delay implementation, there's a possibility that this is our fault,
but this seems unlikely, because it's full of workarounds for issues
like this. It's also possible that this problem doesn't exist on
PulseAudio 5.0 anymore (I didn't explicitly retest it).

The check is general and works for all push based AOs. For pull based
AOs, this can't happen as pull.c implements all the logic correctly.
w32_common: use ToUnicode to translate key input

This replaces translate_key_input with a solution that gives mpv more
control over how keyboard input is converted to unicode. As a result:

- Key up/down events are generated the same way for all keys.
- Dead keys generate their base character instead of being combined with
  the following character.
- Many Ctrl and Ctrl+Alt key combinations that were previously broken
  are fixed, since it's possible to discover the base keys.
- AltGr doesn't produce special characters when mp_input_use_alt_gr is
  false.

This also fixes some logic to do with detecting AltGr and adds proper
UTF-16 decoding.