audio/out: add sndio support

Based on an earlier patch for mplayer by Alexandre Ratchov <alex@caoua.org>
ao_coreaudio: clear output buffer on buffer underrun

Output silence to the output buffer during underruns. This removes small
occasional glitches that happen before the AUHAL is actually paused from the
`audio_pause` call.

Fixes #269
gl_x11: fail gracefully if selected FBconfig has no X visual

glXGetVisualFromFBConfig() specifies specifies that it can return NULL
if there is no associated X visual. Instead of crashing, let
initialization fail. I'm not sure if this is actually supposed to work
with a fallback visual (passing a NULL visual to vo_x11_config_vo_window
would just do this), but let's play safe for now.

Apparently this can happen when trying to use vo_opengl over a remote
X display.
mplayer: don't keep previous video frame with --force-window

When for example switching off the video stream, and --force-window is
used, forcefully reconfigure the VO. This will reset the size, and will
clear the window with black.

Needed some effort, because you don't always want to clear the window
on "discontinuity" points like going to a next file: this would
introduce some flicker.
cocoa_common: add OS X 10.7 compatibility hacks includes

I forgot these when I split the code. They will hopefully fix compilation on
10.7.
mplayer: fix cleanup if VO initialization fails

Just specifying a VO that doesn't exist would make it crash.
Regression caused by commit 6a0408b.
mplayer: fix some issues with playlist_prev command

You couldn't jump to the first entry in the playlist, if that entry was
marked as "too short". But this is usually fine, because it doesn't get
into the way of the user. (This feature is meant to allow being able to
jump backwards through the playlist even if a file immediately stops
playback right after initialization, not to prevent playing these files
at all.)

Also, apply the skip logic when wrapping around the playlist when going
backwards. This happens with --loop, because looping pretends the
playlist is infinitely repeated forwards and backwards (as long as the
playlist_prev/next commands are concerned).

Also add some comments.
command: add properties for retrieving OSD dimensions
command: add commands for displaying overlays

Requested by github issue #255.

Does not work where mmap is not available (i.e. Windows).
ao_sndio: add documentation
mplayer: don't resume playlist if --no-resume-playback is used
vo_x11, vo_xv: fix OSD redrawing with --force-window

The window wasn't cleared in this mode before doing the redrawing.
ad_mpeg123: support in-stream format changes

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@36461 b3059339-0415-0410-9bf9-f77b7e298cf2

Fixes playback of http://mpg123.org/test/44and22.mp3

Cherry-picked from MPlayer SVN rev. #36461, a patch by
Thomas Orgis, committed by by Reimar Döffinger.
osc: Add another scale option for forced windows.

If the OSC is rendered on a forced window (by --force-window), the scale can be configured with scaleForcedWindow.
osc: Display cache fill status

The OSC will now display cache fill status between the timecodes, but only if it's below 48% to not clutter the interface with erratically changing values.

By default, the displayed value is multiplied by 2 to not confuse users who are unfamillar with the inner workings of the caching system. This can be disabled using the iAmAProgrammer=true setting.
osc: Okay, don't multiply the cache value

As expected, this is not liked.
command: sub_seek: avoid getting stuck

First, don't try to seek if the result is 0 (i.e. nothing found, or
subtitle event happens to be exactly on spot).

Second, since we never can make sure that we actually seek to the exact
subtitle PTS (seeking "snaps" to video PTS), offset the seek by 10ms.
Since most subtitle events are longer than 10ms, this should work fine.
demux_raw: set a default video size
matroska: store segment/edition uids in a single structure

To support edition references in matroska chapters, editions need to be
remembered for each chapter and source. To facilitate easier management
of these now-paired uids, a single structure is used.
matroska: parse the requested edition for the segment reference