summaryrefslogtreecommitdiffstats
path: root/ext/flac
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim.muller@collabora.co.uk>2009-06-02 00:48:00 +0100
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2009-06-02 00:48:00 +0100
commit552793473f3a59a56f31699cb74b114081198413 (patch)
tree9ea8b385ae8b86813e047f23deaeefee5590a6ca /ext/flac
parent53be1d33caa5278b61101f06db6c23c982219a1e (diff)
flacenc: some more logging - dump header packets
Also, the final fixing up of the headers is expected and not something we should warn about.
Diffstat (limited to 'ext/flac')
-rw-r--r--ext/flac/gstflacenc.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/ext/flac/gstflacenc.c b/ext/flac/gstflacenc.c
index 6eab536d..1adcdb0b 100644
--- a/ext/flac/gstflacenc.c
+++ b/ext/flac/gstflacenc.c
@@ -864,7 +864,10 @@ push_headers:
buf = GST_BUFFER (l->data);
gst_buffer_set_caps (buf, caps);
- GST_LOG ("Pushing header buffer, size %u bytes", GST_BUFFER_SIZE (buf));
+ GST_LOG_OBJECT (enc, "Pushing header buffer, size %u bytes",
+ GST_BUFFER_SIZE (buf));
+ GST_MEMDUMP_OBJECT (enc, "header buffer", GST_BUFFER_DATA (buf),
+ GST_BUFFER_SIZE (buf));
(void) gst_pad_push (enc->srcpad, buf);
l->data = NULL;
}
@@ -930,13 +933,16 @@ gst_flac_enc_write_callback (const FLAC__StreamEncoder * encoder,
flacenc->got_headers = TRUE;
}
} else if (flacenc->got_headers && samples == 0) {
- GST_WARNING_OBJECT (flacenc, "Got header packet after data packets");
+ GST_DEBUG_OBJECT (flacenc, "Fixing up headers at pos=%" G_GUINT64_FORMAT
+ ", size=%u", flacenc->offset, (guint) bytes);
+ GST_MEMDUMP_OBJECT (flacenc, "Presumed header fragment",
+ GST_BUFFER_DATA (outbuf), GST_BUFFER_SIZE (outbuf));
+ } else {
+ GST_LOG ("Pushing buffer: ts=%" GST_TIME_FORMAT ", samples=%u, size=%u, "
+ "pos=%" G_GUINT64_FORMAT, GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (outbuf)),
+ samples, (guint) bytes, flacenc->offset);
}
- GST_LOG ("Pushing buffer: ts=%" GST_TIME_FORMAT ", samples=%u, size=%u, "
- "pos=%" G_GUINT64_FORMAT, GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (outbuf)),
- samples, (guint) bytes, flacenc->offset);
-
gst_buffer_set_caps (outbuf, GST_PAD_CAPS (flacenc->srcpad));
ret = gst_pad_push (flacenc->srcpad, outbuf);