summaryrefslogtreecommitdiff
path: root/src/lib/audio_decoder_stream.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-06-25 09:38:02 +0100
committerCarl Hetherington <cth@carlh.net>2015-06-25 09:38:02 +0100
commita1201ace8a1d5d3e0a9eca769cb9e0a12bf32693 (patch)
tree342cd771a02c0de09338a9da2950439f612d29d6 /src/lib/audio_decoder_stream.cc
parent11f927d8f8709d4ee3e1e8efd37e053e1e1a3821 (diff)
Add DEBUG_DECODE and some basic debugging of the decoding process.
Diffstat (limited to 'src/lib/audio_decoder_stream.cc')
-rw-r--r--src/lib/audio_decoder_stream.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/audio_decoder_stream.cc b/src/lib/audio_decoder_stream.cc
index 8c521f94d..fdcebbc9f 100644
--- a/src/lib/audio_decoder_stream.cc
+++ b/src/lib/audio_decoder_stream.cc
@@ -23,6 +23,8 @@
#include "audio_decoder.h"
#include "resampler.h"
#include "util.h"
+#include "film.h"
+#include "log.h"
#include <iostream>
#include "i18n.h"
@@ -58,6 +60,8 @@ AudioDecoderStream::get (Frame frame, Frame length, bool accurate)
{
shared_ptr<ContentAudio> dec;
+ _content->film()->log()->log (String::compose ("ADS has request for %1 %2", frame, length), Log::TYPE_DEBUG_DECODE);
+
Frame const end = frame + length - 1;
if (frame < _decoded.frame || end > (_decoded.frame + length * 4)) {
@@ -130,6 +134,8 @@ AudioDecoderStream::get (Frame frame, Frame length, bool accurate)
void
AudioDecoderStream::audio (shared_ptr<const AudioBuffers> data, ContentTime time)
{
+ _content->film()->log()->log (String::compose ("ADS receives %1 %2", time, data->frames ()), Log::TYPE_DEBUG_DECODE);
+
if (_resampler) {
data = _resampler->run (data);
}