mpv-player/mpv — pull request #1409 by olifre (2014-12-31 02:43:30+00:00)
Title: Add DVB-S2 and (partial) vdr-style channel-lists support

With this changeset, mpv:
* Can read VDR-style channel-lists (and, at least for DVB-S, extract all information as before).
* Uses S2API (DVB-API v. 5, since 2.6.28 the older API is deprecated) for tuning, for DVB-S tuners.

The new API allows to tune to DVB-S2 channels, and as the classic mplayer-styles "channels.conf" do not contain a "DVB-S2" flag, I added vdr-style channel-list support. With this, mpv can now tune to most FullHD-broadcasts via satellite using a vdr-style channel.conf e.g. created with w_scan.

I tried to be as non-invasive as possible:
* S2API is only used if DVB-API >= 5.x, and for DVB-S devices.
* On channel.conf reading, it is tested with a sscanf-pattern whether the line matches the VDR-style format (see http://www.vdr-wiki.de/wiki/index.php/Channels.conf , sadly german only). If not, classic parsing is done.

I also fixed a broken ifdef (which meant that ATSC should not have worked since a while) and cleaned up some debug-output. The commits are fine-grained and hopefully contain enough commentary to explain what I changed.

Disclaimer: The non-DVB-S-code paths should function as before, but I only have DVB-S(2) hardware here, and some DVB-T stick with bad reception floating around. I only tested all changes with DVB-S on old and new channel-config-files, DVB-S and DVB-S2 channels, but not on pre-2.6.28 kernels (there are many DVB-S drivers missing there...).
The VDR-style channel.confs contain a lot more information usable for non-DVB-S cards (e.g. FEC, ROLLOFF etc.). I do not parse this, since I have no hardware to test whether it works as expected, so VDR-style config files will probably not work with this hardware (but not much is missing). As a fallback to the classic config format is in, no old setup should be broken.

As this is my first (planned) contribution to mpv, feel free to RTFM me or teach me how to better agree with the coding guidelines (I mostly do C++ in real life).