Add detection of encrypted output and disable encrypted output by default
With this commit if tsdecrypt detects that the stream is still
encrypted after passing it through decryption it doesn't output it.
You can enable the output of encrypted streams using --output-enc-pass
option.
This removes tsdecrypt's error message in favour of getopt
native errors. Our message was always 'Unknown parameter'
which was not correct (most of the time) and very misleading.
Before this it was possible for pthread_join to hang waiting for
threads to finish. Also if there was no input data exiting was
delayed by a second.
After this patch the exit is instant even if there is no input data
and if a thread hangs and the main process can't stop it after two
seconds tsdecrypt exits anyway.
This patch adds two new EMM counters in the regular stats messages.
Now the counters are:
Received - How much EMMs were received from the input.
Skipped - How much EMMs were skipped because of filtering.
Sent - How much EMMs were added to the sending queue.
Processed - How much EMMs were sent to the CAMD server for processing.
Add support for IPv6 and for multiple CAMD addresses.
This patch adds support for connecting to CAMD over IPv6. Nice addition
is that now tsdecrypt tries each of the addresses returned when CAMD
hostname is resolved and connects to the one that works. Resolving
of the server address is done before each connect, which allows for
uninterupted migration of CAMD servers by just changing their DNS
record.
IPv6 functionality can be disabled by using -4/--ipv4 options or
if you fancy only IPv6 servers -6/--ipv6 can be used.
Allow camd server address to be resolved, not only set by IP address.
The limitation is that resolving the hostname is performed only
once at tsdecrypt startup. If DNS changes while tsdecrypt is running,
tsdecrypt won't notice that.