Add multi-lingual support to the EPG. Fixes #227.
Added support for XMLTV sub-title. Fixes #237.
Set locale at program start to ensure its properly used throughout. Fixes #620.
cosmetics
Started new transcoding branch derived from current master with multipe output muxers, rebasing causes way to many colitions

Squashed commit of the following:

commit 18007d8fce4ee800e9533bd9087e7b4287a6f3df
Merge: 0ff051f 7b5cf6b
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Tue Aug 21 17:12:50 2012 +0200

    merge with upstream

commit 0ff051fff484ee155194b684f8f96fe6c3411253
Merge: ed1396a abc0945
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Mon Aug 20 10:42:33 2012 +0200

    Merge remote-tracking branch 'upstream/master' into transcode_v2

commit ed1396a7030f9a1fe841cc83b4bc374b3e1af202
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sun Aug 19 15:23:46 2012 +0200

    use h264_mp4toannexb bitstram filter when muxing h264 with mpeg-ts

commit 22901d265f3cba50bd23dbc39631515f693d7cdc
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sun Aug 19 15:20:00 2012 +0200

    mpegt-ts muxer doesn't support mpeg4video, skip those streams

commit c4794af4cb16c73d8b783cbf009d3a9d54310fe2
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sat Aug 18 14:48:42 2012 +0200

    some codecs tweaking

commit 1befa71a5469ea36e9aff88597e85d8066f1197b
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sat Aug 18 14:25:09 2012 +0200

    support for ffmpeg-0.11

commit 4949901855c4f9dd843dc8723caa73960e41f430
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sat Aug 18 13:44:51 2012 +0200

    cosmetics

commit dbf60d16e3c2224c39dd712a6a5f2b320493c364
Merge: 9cc4282 0f3c6f7
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sat Aug 18 08:47:51 2012 +0200

    Merge remote-tracking branch 'upstream/master' into transcode_v2

commit 9cc42828159e0e582c449052c70b9269d851722d
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sat Aug 18 08:35:24 2012 +0200

    added libav to new configure script

commit b273d16df0aad00c6d3b6870e46c30e42317ee0a
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sat Aug 18 08:16:32 2012 +0200

    added container muxing sources

commit f803c10565187b2fcaa40b28eb34a4e8747487e8
Merge: 2d44370 00576fd
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Fri Aug 17 19:30:03 2012 +0200

    Merge remote-tracking branch 'upstream/master' into transcode_v2

    Conflicts:
    	Makefile
    	configure
    	support/configure.inc

commit 2d443708f85a635f65a35875947e4b508bd14711
Merge: 2e642a8 e9db038
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Wed Aug 15 23:49:56 2012 +0200

    Merge remote-tracking branch 'origin/multiple_output_muxers' into transcode_v2

    Conflicts:
    	configure
    	src/main.c
    	src/muxer.c
    	src/webui/webui.c
    	support/configure.inc

commit 2e642a8bafb14f923244aa0a01e3dc0fdd7c6837
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Wed Aug 15 23:26:37 2012 +0200

    fix typo for excluding libav support

commit e9db038bc319e35ec67969c1eab524e6f582dc0a
Merge: b8f884e d530f9e
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Wed Aug 15 14:08:10 2012 +0200

    Merge remote-tracking branch 'upstream/master' into multiple_output_muxers

commit b8f884eb059af8999198fcd82906472b28999d19
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sun Aug 12 22:33:04 2012 +0200

    The file suffix may depend on the stream content. audio only matroska files should end with mka, not mkv

commit b7ca413222f103522ceb06a1e0c18260d4a49240
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sun Aug 12 22:33:04 2012 +0200

    The file suffix may depend on the stream content. audio only matroska files should end with mka, not mkv

commit ebcac829d5ef389ca0a5b65093c297d29dcb0efd
Merge: 1a70033 5159505
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sat Aug 11 19:08:27 2012 +0200

    Merge remote-tracking branch 'upstream/master' into multiple_output_muxers

commit df67a6a0254dbbfe1dac325f10968d0341764b06
Merge: 4edf58a 5159505
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sat Aug 11 19:07:28 2012 +0200

    Merge remote-tracking branch 'upstream/master' into transcode_v2

commit 4edf58acc3452b8e0c709e77d1749ac8d7d5efdf
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sat Aug 11 19:06:26 2012 +0200

    fix compilation error in ubuntu 12.04

commit 0770e8eac296eab1b6cda125726048bc8edfe41b
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Fri Aug 10 23:10:16 2012 +0200

    use dvd profile for mpegps muxing in order to support ac3

commit 592a68ed6d34c6ec5fdc367e9fc8334a61b47a66
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Fri Aug 10 22:22:16 2012 +0200

    'merged' transcoding and libav muxing code with multiple_output_muxers

commit 305569507a751f768ffebe8e51bc2257a6cd733e
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Fri Aug 10 16:37:20 2012 +0200

    cosmetics

commit 1a70033ae74dc722b400a7bb259020b347067265
Merge: 14308f0 3157a5c
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Wed Aug 8 14:23:57 2012 +0200

    Merge remote-tracking branch 'upstream/master' into multiple_output_muxers

commit 14308f0d9fa5bf7b81deac2900e34e555ae90a59
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Mon Aug 6 20:13:44 2012 +0200

    If a pkt is successfully muxed, free the memory. If there is an error, allow the source to free it

commit b78b90e1bfd9e2b887bc0570239d08d4978ecb04
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Mon Aug 6 19:14:24 2012 +0200

    send correct mime for audio only matroska streams

commit 081959183ffe495920850b3dd5389ad0bcda1c42
Merge: 4580830 2c4874f
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Mon Aug 6 17:44:08 2012 +0200

    Merge branch 'multiple_output_muxers' of github.com:john-tornblom/tvheadend into multiple_output_muxers

commit 45808300693e627ea7a4098685909cd2d8fd3672
Author: Adam Sutton <dev@adamsutton.me.uk>
Date:   Mon Aug 6 14:50:24 2012 +0100

    Delay generation of filename and use m_container for pass thru. Bit nasty.

commit 7730520cadcbc975ecc2faaee453287a364dda4e
Author: Adam Sutton <dev@adamsutton.me.uk>
Date:   Mon Aug 6 14:40:40 2012 +0100

    Ensure container format is saved/restored.

commit 2c4874f211ad93259b031ef90c2cd10601870781
Merge: 5b8898b 9cf3b81
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Mon Aug 6 14:11:13 2012 +0200

    Merge remote-tracking branch 'upstream/master' into multiple_output_muxers

commit 5b8898bd2fadd68219e57c2bc4cdc656660f82d2
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Mon Aug 6 13:34:59 2012 +0200

    added basic contaier settings in the dvr config

commit a713813e93363702c4d8b8eb76ebd4b08e16408a
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Mon Aug 6 11:52:53 2012 +0200

    for http streaming, defualt to the dvr muxer

commit aca32e4b653c1cab4b2f390f8cb1212fbd3c9b54
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Mon Aug 6 11:52:05 2012 +0200

    fixed pesky copy&paste bug

commit 5bfe22e84146356a5190b55833a88e5e34844f6f
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Mon Aug 6 11:41:13 2012 +0200

    not sure how to deal with packets from a v4l source just yet.

commit a8a3c890adfb51b3f02977bec2d9d109f0a0383d
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Mon Aug 6 11:38:50 2012 +0200

    cleaning up unused changed

commit 1d0ca2b135695fc5a48bbbe351e4f425346e22a5
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Mon Aug 6 00:20:59 2012 +0200

    Minor changes to the API, allowing the muxers to access service_t data members

commit b2b4e0c0b020bb008fe885dfc1a34f9a5c56b2f8
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sun Aug 5 11:37:26 2012 +0200

    cosmetics

commit 8ed6d44520416ab9447df6ac9f10af4d02addb04
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sun Aug 5 11:10:32 2012 +0200

    plug memory leak in passthrought muxer

commit 8b46127cb23c5e7e4461d5cfa72722eb84af9724
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sun Aug 5 11:09:37 2012 +0200

    cosmetics

commit 054f58f244508e67ffe7ea0015bb633ab7df3ca5
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sun Aug 5 11:08:34 2012 +0200

    cosmetics

commit 80bd501f75c33ff6051de48012f7fb8692e15c4a
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sun Aug 5 11:07:54 2012 +0200

    store errno since since writing to fd can be deffered and in order to know why something goes wrong later on, the errno is needed.

commit 4efcfe1e9ea1c44013b2ae27491f20fbb229e736
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sun Aug 5 02:51:59 2012 +0200

    count errors rather than refering to errno.

commit d44e0c14d44677455983f89a0a24ce5b11824486
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sun Aug 5 02:51:38 2012 +0200

    supress error log when write to file fails. It might confuse ppl when the file descriptor is a socket.

commit 4ad2907bcb25e92fd8f9d02f52dd3f3597dab4b3
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sun Aug 5 02:47:05 2012 +0200

    cosmetics

commit aa8bb4cda1eb8681490a77adaa54608983de1e2c
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sun Aug 5 02:39:45 2012 +0200

    if muxer parameter via http stream is incorrct, default http to matroska

commit 4ec930c18a9731f0bd63f3d968f4fe1ecc0b0866
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sun Aug 5 01:32:06 2012 +0200

    removed webm as container since it needs a transcoder in oder to make scence.

commit bdf16b87befe55073da33aa4d530256706125bdd
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sun Aug 5 00:57:30 2012 +0200

    fix merge conflict with master

commit 02ea0b1d04c521355304b6f71fa6b45f49c778e7
Merge: c97e085 78cfe1b
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sun Aug 5 00:50:18 2012 +0200

    Merge remote-tracking branch 'upstream/master' into multiple_output_muxers

    Conflicts:
    	src/webui/webui.c

commit c97e08502f4d119e55d94f56e27085ebc41cc3a3
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sun Aug 5 00:33:52 2012 +0200

    fixed mkv recording

commit 332ee9b567d780cfc78115ab45087c206c9ea489
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sat Aug 4 23:47:00 2012 +0200

    default to mkv

commit 20bf6bb30fb108caade1315cf65bd6f9ed5df32a
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sat Aug 4 23:46:53 2012 +0200

    try to write some tags to muxer

commit 10939f81907c98085f488b7a0b8de03b153cc750
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sat Aug 4 23:27:45 2012 +0200

    try to figure out the mime type earlier

commit 21eaaf6cdaa2c79d5d67bb87286d98eb4f2eb421
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sat Aug 4 22:38:17 2012 +0200

    cosmetics

commit 211ccc0d66f9698a41ab1a8f9684e6bff27fc45a
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sat Aug 4 22:38:09 2012 +0200

    removed libav for now

commit f4ad857a1d6866ed7b036bde266a1d41c999437b
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sat Aug 4 22:15:40 2012 +0200

    disable libav by default

commit 67c02acd1d4b9e02f4ba4d77d29997007d12d088
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sat Aug 4 22:13:27 2012 +0200

    cosmetics

commit 4477ce447d70cba9f3dfa9bf6d34bc4e9b924ec0
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sat Aug 4 22:13:08 2012 +0200

    added temp solution for ts file recording

commit 9ecb9338306e6a66ac86edebc99ef618361cd007
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sat Aug 4 21:32:49 2012 +0200

    cosmetics

commit 4cb1f24560116099e26f47572249eb157da302a8
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sat Aug 4 20:43:24 2012 +0200

    cosmetics

commit 3528766cab34c5bbc72adf8f02bf1f271ddb74c7
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sat Aug 4 20:41:34 2012 +0200

    Fixed mkv streaming and recordings via new plugin-like system

commit 40068090d832ac8fded61477a2a812020a1dddcc
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sat Aug 4 20:39:33 2012 +0200

    Added the type of the source (si_type) to source_info_t

commit da29b015f03768e85a030f8d02bbe60e156b3fa9
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sat Aug 4 16:56:53 2012 +0200

    testing some stuff with http/file muxing. won't compile with libav and streaming, recording is temporarly broken.

commit 84da3bf11ff77af59f1638ff6afc75c09daf1eaa
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Sat Aug 4 11:10:55 2012 +0200

    renamed and moved muxer sources

commit 438f6de979c1259105bb6a5804ae30a23f0e9699
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Fri Aug 3 22:20:36 2012 +0200

    sanity check for null-pointer

commit a8ad35cc491c7b96c8391f12bb7b8336a1e6368f
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Fri Aug 3 22:19:49 2012 +0200

    fix gcc-4.6 warning

commit d263f5687f8f34409821226c54b23151ecee4336
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Fri Aug 3 19:56:19 2012 +0200

    fixed passthrough http streaming

commit 53268f99812a527ccecd1b50f4cb527b70789e6e
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Fri Aug 3 19:55:09 2012 +0200

    added mpegps mimetypes for v4l sources

commit 2b9048c38370a0a7dd1d8bfdb77f0cb3c5d383e7
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Fri Aug 3 18:16:13 2012 +0200

    aded initial passthrough muxer

commit 816663c2d4ec6a7758098ac8bf336305c01a4347
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Fri Aug 3 18:14:15 2012 +0200

    cosmetics

commit fe4f6b4064d6ea411b90a983a88a70925a76f4de
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Fri Aug 3 18:11:50 2012 +0200

    cleaning and cosmetics

commit 0cd0279741467619191732e7e59478cd826f7a33
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Fri Aug 3 13:07:11 2012 +0200

    Reworked playlist generation. Now also includes tags.

commit dd5ab55f6078aa87b17fe9ee210243bfb0d8b6b6
Merge: a228c7f fc1bd22
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Fri Aug 3 01:51:49 2012 +0200

    Merge branch 'lav_http_muxing' of github.com:john-tornblom/tvheadend into lav_http_muxing

    Conflicts:
    	src/webui/lav_muxer.c

commit a228c7fef16804443aeb9d762e4b868937f707ce
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Fri Aug 3 01:50:40 2012 +0200

    Added some meta data to lav muxer

commit fc1bd221174382358501585dd470da213fb0ada3
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Fri Aug 3 01:24:02 2012 +0200

    cosmetics

commit 6aea3039b9ac433149ad1a322650ddf6319aab40
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Fri Aug 3 00:27:27 2012 +0200

    cosmetics

commit 5ad13fdcb26e1b60d73c90ce261d007f8d975606
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Fri Aug 3 00:14:27 2012 +0200

    added compile-time option to use builtin mkv muxer

commit a843aefad9f8d2f3f894154f2d62671136d8ad19
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Fri Aug 3 00:13:33 2012 +0200

    cosmetics

commit 1ccc65a18c641826d78e4af923a414149e1ffbfb
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Thu Aug 2 23:45:36 2012 +0200

    use av_free for output context. Not sure if this is correct, but fixes random segfaults

commit 892ed1aa07da859dd3c1fdadb85e1a643332d9ef
Merge: 57bf4aa b71f496
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Thu Aug 2 23:18:57 2012 +0200

    Merge branch 'lav_http_muxing' of github.com:john-tornblom/tvheadend into lav_http_muxing

commit 57bf4aa2ef8a43c3f2c9cd3d39d215b8ba6f490e
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Thu Aug 2 23:15:18 2012 +0200

    Created a little plugin system for the muxer

commit b71f496b8f1f5e8408e438657eabc2072d33b10e
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Thu Aug 2 20:57:25 2012 +0200

    load all codecs, formats and so on for libav

commit ab8d294a9ab96c1b53a41bab14fd5ed6f74be096
Author: John Törnblom <john.tornblom@gmail.com>
Date:   Thu Aug 2 20:42:08 2012 +0200

    Added libavformat muxer for http streaming (matroska and mpegts)
Merge branch 'transcode' into transcode_v2