add stats class for displaying bitrates and other statistics #gklst

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
stats: optionally return packet statistics if passed a pointer to do so #gklst

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
parse: use stats class to calulate pid & tei

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
parse: partially revert previous patch - dont use pkt_stats.tei yet

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
stats: separate packet header parsing into a separate function

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
parse: use stats.parse function

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

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
stats: include TEI count in statistics

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
stats: report percentage of payload (per sec) that were bad due to TEI

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
stats: count all TEI's towards pid 0xffff when calculating bitrates

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
stat: display discontinuities per pid & line up statistics display

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
parse: print SYNC LOSS to stderr if we have to hunt for the sync byte

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