aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-05-28 12:53:44 +0200
committerHarald Welte <laforge@gnumonks.org>2017-05-28 14:30:05 +0200
commitbd42eba35dca8ae23013ad0825d007a0a5f69091 (patch)
treef3e4bb28c0e4789ec179c753d34254c6f752797d
parent495c694781d21c66acbdd7fb8726c7058d62de86 (diff)
Print some useful information while putting together the procqueue
-rw-r--r--src/pq_alsa.c2
-rw-r--r--src/pq_codec.c3
-rw-r--r--src/pq_file.c2
-rw-r--r--src/pq_format.c4
-rw-r--r--src/pq_rtp.c2
5 files changed, 13 insertions, 0 deletions
diff --git a/src/pq_alsa.c b/src/pq_alsa.c
index 563452e..26a3ba9 100644
--- a/src/pq_alsa.c
+++ b/src/pq_alsa.c
@@ -148,6 +148,7 @@ out_close:
int
pq_queue_alsa_input(struct pq *pq, const char *hwdev, unsigned int blk_len)
{
+ printf("PQ: Adding ALSA input (dev='%s', blk_len=%u)\n", hwdev, blk_len);
return pq_queue_alsa_op(pq, hwdev, blk_len, 1);
}
@@ -160,6 +161,7 @@ pq_queue_alsa_input(struct pq *pq, const char *hwdev, unsigned int blk_len)
int
pq_queue_alsa_output(struct pq *pq, const char *hwdev, unsigned int blk_len)
{
+ printf("PQ: Adding ALSA output (dev='%s', blk_len=%u)\n", hwdev, blk_len);
return pq_queue_alsa_op(pq, hwdev, blk_len, 0);
}
diff --git a/src/pq_codec.c b/src/pq_codec.c
index 42baf23..5abff53 100644
--- a/src/pq_codec.c
+++ b/src/pq_codec.c
@@ -69,6 +69,9 @@ pq_queue_codec(struct pq *pq, const struct codec_desc *codec, int enc_dec_n)
item->exit = codec->codec_exit;
+ printf("PQ: Adding Codec %s, %s format %s\n", codec->name,
+ enc_dec_n ? "encoding to" : "decoding from", fmt->name);
+
if (!item->proc)
return -ENOTSUP;
diff --git a/src/pq_file.c b/src/pq_file.c
index dd82697..e868e1b 100644
--- a/src/pq_file.c
+++ b/src/pq_file.c
@@ -97,6 +97,7 @@ pq_queue_file_op(struct pq *pq, FILE *fh, unsigned int blk_len, int in_out_n)
int
pq_queue_file_input(struct pq *pq, FILE *src, unsigned int blk_len)
{
+ printf("PQ: Adding file input (blk_len=%u)\n", blk_len);
return pq_queue_file_op(pq, src, blk_len, 1);
}
@@ -109,5 +110,6 @@ pq_queue_file_input(struct pq *pq, FILE *src, unsigned int blk_len)
int
pq_queue_file_output(struct pq *pq, FILE *dst, unsigned int blk_len)
{
+ printf("PQ: Adding file output (blk_len=%u)\n", blk_len);
return pq_queue_file_op(pq, dst, blk_len, 0);
}
diff --git a/src/pq_format.c b/src/pq_format.c
index 590dfd8..b385c52 100644
--- a/src/pq_format.c
+++ b/src/pq_format.c
@@ -45,16 +45,20 @@ pq_queue_fmt_convert(struct pq *pq, const struct format_desc *fmt, int to_from_n
if (!codec) {
fprintf(stderr, "Cannot determine codec from format %s\n", fmt->name);
return -EINVAL;
+ }
+
item = pq_add_item(pq);
if (!item)
return -ENOMEM;
if (to_from_n) {
+ printf("PQ: Adding conversion from canon to %s (for codec %s)\n", fmt->name, codec->name);
item->len_in = codec->canon_frame_len;
item->len_out = fmt->frame_len;
item->state = fmt->conv_from_canon;
} else {
+ printf("PQ: Adding conversion from %s to canon (for codec %s)\n", fmt->name, codec->name);
item->len_in = fmt->frame_len;
item->len_out = codec->canon_frame_len;
item->state = fmt->conv_to_canon;
diff --git a/src/pq_rtp.c b/src/pq_rtp.c
index 99e77bc..d200770 100644
--- a/src/pq_rtp.c
+++ b/src/pq_rtp.c
@@ -240,6 +240,7 @@ pq_queue_rtp_op(struct pq *pq, int udp_fd, unsigned int blk_len, int in_out_n)
int
pq_queue_rtp_input(struct pq *pq, int udp_fd, unsigned int blk_len)
{
+ printf("PQ: Adding RTP input (blk_len=%u)\n", blk_len);
return pq_queue_rtp_op(pq, udp_fd, blk_len, 1);
}
@@ -251,5 +252,6 @@ pq_queue_rtp_input(struct pq *pq, int udp_fd, unsigned int blk_len)
int
pq_queue_rtp_output(struct pq *pq, int udp_fd, unsigned int blk_len)
{
+ printf("PQ: Adding RTP output (blk_len=%u)\n", blk_len);
return pq_queue_rtp_op(pq, udp_fd, blk_len, 0);
}