stream_file: uncrustify
stream_avdevice: remove redundant dummy callback
stream: move file forward skipping to common stream implementation

stream_file.c contains some code meant for forward seeking with pipes.
This simply reads data until the seek position is reached. Move this
code to stream.c. This stops stream_file from doing strange things
(messing with stream internals), and removes the code duplication too.

We also make stream_seek_long() use the new skip code. This is shorter
and much easier to follow than the old code, which basically did strange
things.
stream: don't require streams to set s->pos in seek callback

Instead, set s->pos depending on the success of the seek callback.
stream: allow potentially faster skipping

Instead of always skipping in STREAM_BUFFER_SIZE blocks, allow an
arbitrary size. This allows - in theory - faster forward seeking in
pipes.

(Maybe not a very significant change, but it reduces the number of
things that depend on STREAM_BUFFER_SIZE for no good reason. Though
we still use that value as minimum read size.)
demux_raw: read multiple frames per packet

The rawaudio demuxer read one frame per packet, basically a few bytes,
which caused insane overhead. (I found this when I couldn't play raw
audio without dropouts when using -v, which printed a line per packet
read.)

Fix this and read 1 second of audio per packet. This is a regression
since cfa5712 (merging of demux_rawaudio and demux_rawvideo).
demux: check whether stream is selected in demux_get_next_pts()

Otherwise, this would just try to demux a good chunk of the file, even
though the operation can't succeed anyway.

This caused some pretty strange issues, where perfectly valid use cases
would print a "Too many packets in the demuxer packet queue..." message.
demux: remove unused audio_delay parameter from demux_seek()

Used to be needed by demux_avi.
ao: remove some leftovers
audio/out: do some mp_msg conversions

Use the new MP_ macros for some AOs instead of mp_msg.

Not all AOs are converted, and some only partially. In some cases, some
additional cosmetic changes are made.
cocoa_common: avoid locking calls when not needed

cocoa_common contains some locking calls to support video outputs that support
live resizing (at this moment only vo=opengl).

These should not be used unless the VO declares it is multithreaded by
registering the resize_redraw callback used for live resizing.

Fixes #200
x11/out: mp_msg conversion
Some more mp_msg conversions

Also add a note to mp_msg.h, since it might be not clear which of the
two mechanisms is preferred.
sub: add webvtt-in-webm support

The way this was added to FFmpeg is less than ideal, because it requires
text parsing in the Matroska demuxer. But in order to use the FFmpeg
webvtt-to-ass converter, we still have to mimic this in some way. We do
this by putting the parsing into sd_lavc_conv.c, before the subtitle
packet is passed to libavcodec. At least this keeps the ugliness out of
unrelated code.

There is some change that FFmpeg will fix their design eventually.

Instead of rewriting the parsing code, we simply borrow it from FFmpeg's
Matroska demuxer.
vo_vaapi: potentially fix screenshot colorspace issues

mp_image_set_params() doesn't check whether the colorspace parameters
are  consistent (e.g. setting YUV colorspaces with RGB formats), and
shouldn't need to.
video/out: don't require VOs to handle screenshot aspect specially

This affects VOs which just reuse the mp_image from draw_image() to
return screenshots. The aspect of these images is never different
from the aspect the screenshots should be, so there's no reason to
adjust the aspect in these cases.

Other VOs still need it in order to restore the original image
attributes.

This requires some changes to the video filter code to make sure that
the aspect in the passed mp_images is consistent.

The changes in mplayer.c and vd_lavc.c are (probably) not strictly
needed for this commit, but contribute to consistency.
vo_image: simplify
video: handle video output levels with mp_image_params

Until now, video output levels (obscure feature, like using TV screens
that require RGB output in limited range, similar to YUY) still required
handling of VOCTRL_SET_YUV_COLORSPACE. Simplify this, and use the new
mp_image_params code. This gets rid of some code. VOCTRL_SET_YUV_COLORSPACE
is not needed at all anymore in VOs that use the reconfig callback. The
result of VOCTRL_GET_YUV_COLORSPACE is now used only used for the
colormatrix related properties (basically, for display on OSD).  For
other VOs, VOCTRL_SET_YUV_COLORSPACE will be sent only once after config
instead of twice.
configure: fix VDA warning on systems other than OSX

CONFIG_VDA is supposed to be defined to 0 or 1. But on non-OSX systems,
the configure test isn't run at all, so CONFIG_VDA ends up undefined.
sd_lavc_conv: fix build with older ffmpeg/libav

Sigh...