output_stream: store pidlist subscriptions to aid in demuxing flexibility #gklst

With this changeset, one can now tune to a single transponder and send
each service and all of its associated elementary streams to separate
targets. For example, executing the following via the telnet CLI:

tune=33.1
stream=192.168.1.100:33001
tune=33.2
stream=192.168.1.101:33002

...will send each service to each respective target.

Please note: tuner / transponder / "multirec" management is not yet
robust enough to use this in a production environment.  This is just
a step in the right direction.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
output: return target id after successful add()

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
serve: attempt to find an available tuner before stopping this tuner if we need to change the channel

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
serve: attempt to find a tuner already tuned to the desired physical channel before searching for an available tuner #gklst

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
serve: clean up handling of tune command when multiple tuners are present

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
serve: display output stream target id in CLI

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
output: add function reset_pids()

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
output: protect against adding the same output target multiple times

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
serve: trying to improve handling of multiple tuners

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
serve: only notify on tuner change if tuner was actually changed

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Merge branch 'master' into multirec
serve: keep track of requested services and pass them in when calling parser.add_output()

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
serve: list tuners & feeders during CLI command 'check'

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
serve_client: add function list_clients() for use in the CLI

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
serve: safely reclaim server & tuner recources during check()

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
serve: dont call cli_print() from check()

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
output: conditionalize tuner resource sharing (multirec)

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
parse: treat out_pids as type PES (fixes multirec bug)

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
serve: for now, wait 5 sec for psip before streaming (FIXME!)

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
parse: get rid of typedef std::map<uint16_t, uint16_t> map_eit_pids; /* pid, eit-x */

(use map_pidtype instead)

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>