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...
vo_corevideo: fix regression in colormatrix handling

Regression since 18b6c01d92. That commit changed the colorspace handling to
always reinit the video output. Since the CVPixelBuffers are lazily created,
VOCTRL_SET_YUV_COLORSPACE was always called when the CVPixelBufferRef was NULL.

Since CoreVideo functions do not complain when called on NULL, no one noticed
that CVBufferSetAttachment, which stored the color matrix meta data was called
on NULL.
configure: fix help for macosx-bundle from autodetected to disabled

The help and configure result wrongly showed this feature was autodetected,
while it is infact disabled by default.
vo_corevideo: don't set colormatrix on direct rendering path

The current code uses GL_YCBCR_422_APPLE texture format. This allows to handle
transparently the conversion to RGB but always use BT.601 colormatrix [1].

Hopefully I can adapt gl_video to take CVPixelBuffers soon so that `vo=opengl`
can be used instead of `vo=corevideo` with `hwdec=vda`

 [1]: http://www.opengl.org/registry/specs/APPLE/ycbcr_422.txt
      http://www.opengl.org/registry/specs/APPLE/rgb_422.txt
vo_corevideo: convert to use reconfig instead of config
vo_corevideo: use dwidth/dheight for window dimensions

In the previous commit I wrongly used params->d_h/d_w which happened to work
by chance.
wayland/egl: rework resizing (again)

Moves a good chunk of the resizing code to wayland_common.c. This makes it
possible to share it with future video drivers.

It doesn't resizit it immediatly, it calcutlates the new position and size and
then shedules a resizing event. This removes the ugly callback and void pointer
from the wayland data structure.
wayland: remove shm listener for the backend

The obtained information from the shm listener isn't used by anything and is
also wrong now in wayland git master branch because of new shm formats which
need a different way of saving the supported formats.
wayland: shm based software rendering

A wayland output based on shared memory. This video output is useful for x11
free systems, because the current libGL in mesa provides GLX symbols. It is also
useful for embedded systems where the wayland backend for EGL is not
implemented like the raspberry pi.

At the moment only rgb formats are supported, because there is still no
compositor which supports planar formats like yuv420p. The most used compositor
at the moment, weston, supports only BGR0, BGRA and BGR16 (565).

The BGR16 format is the fastest to convert and render without any noticeable
differences to the BGR32 formats. For this reason the current (very basic)
auto-detection code will prefer the BGR16 format. Also the weston source code
indicates that the preferred format is BGR16 (RGB565).

There are 2 options:
    * default-format (yes|no)  Which uses the BGR32 format
    * alpha (yes|no)    For outputting images and videos with transparencies