diff --git a/src/main.c b/src/main.c index 3fba6cd4..a057ed6b 100644 --- a/src/main.c +++ b/src/main.c @@ -685,3 +685,17 @@ sri_to_rate(int sri) { return sample_rates[sri & 0xf]; } + + +/** + * + */ +void +hexdump(const char *pfx, const uint8_t *data, int len) +{ + int i; + printf("%s: ", pfx); + for(i = 0; i < len; i++) + printf("%02x.", data[i]); + printf("\n"); +} diff --git a/src/tvhead.h b/src/tvhead.h index edff3426..71a166f2 100644 --- a/src/tvhead.h +++ b/src/tvhead.h @@ -837,4 +837,6 @@ int tvh_open(const char *pathname, int flags, mode_t mode); int tvh_socket(int domain, int type, int protocol); +void hexdump(const char *pfx, const uint8_t *data, int len); + #endif /* TV_HEAD_H */