mirror of https://gerrit.osmocom.org/gapk
Print some useful information while putting together the procqueue
This commit is contained in:
parent
495c694781
commit
bd42eba35d
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue