audioringbuffer: log a few more details (e.g. obj-name)

This commit is contained in:
Stefan Sauer 2013-02-25 18:49:56 +01:00
parent 3c78fcd6b2
commit b274ff7c21

View file

@ -1470,6 +1470,8 @@ default_commit (GstAudioRingBuffer * buf, guint64 * sample,
writeseg = *sample / sps; writeseg = *sample / sps;
sampleoff = (*sample % sps) * bpf; sampleoff = (*sample % sps) * bpf;
GST_DEBUG_OBJECT (buf, "write %d : %d", in_samples, out_samples);
/* write out all samples */ /* write out all samples */
while (*toprocess > 0) { while (*toprocess > 0) {
gint avail; gint avail;
@ -1486,14 +1488,13 @@ default_commit (GstAudioRingBuffer * buf, guint64 * sample,
/* see how far away it is from the write segment */ /* see how far away it is from the write segment */
diff = writeseg - segdone; diff = writeseg - segdone;
GST_DEBUG GST_DEBUG_OBJECT (buf,
("pointer at %d, write to %d-%d, diff %d, segtotal %d, segsize %d, base %d", "pointer at %d, write to %d-%d, diff %d, segtotal %d, segsize %d, base %d",
segdone, writeseg, sampleoff, diff, segtotal, segsize, buf->segbase); segdone, writeseg, sampleoff, diff, segtotal, segsize, buf->segbase);
/* segment too far ahead, writer too slow, we need to drop, hopefully UNLIKELY */ /* segment too far ahead, writer too slow, we need to drop, hopefully UNLIKELY */
if (G_UNLIKELY (diff < 0)) { if (G_UNLIKELY (diff < 0)) {
/* we need to drop one segment at a time, pretend we wrote a /* we need to drop one segment at a time, pretend we wrote a segment. */
* segment. */
skip = TRUE; skip = TRUE;
break; break;
} }