diff options
author | Glenn Kasten <gkasten@google.com> | 2015-03-02 15:53:01 -0800 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2015-03-06 09:35:19 -0800 |
commit | 17c9c998afed5ed9df7495eeed5822f3ed53ebec (patch) | |
tree | 9b146046584a7093410ecb23b1265d770383c376 /services/audioflinger/FastCaptureDumpState.cpp | |
parent | 44182c206f7c5584ef2cf504da6be98fab665dbf (diff) | |
download | frameworks_av-17c9c998afed5ed9df7495eeed5822f3ed53ebec.zip frameworks_av-17c9c998afed5ed9df7495eeed5822f3ed53ebec.tar.gz frameworks_av-17c9c998afed5ed9df7495eeed5822f3ed53ebec.tar.bz2 |
Initial implementation of fast capture dump
Change-Id: I898d903e539f760ef7caa80f41ca21c223f67264
Diffstat (limited to 'services/audioflinger/FastCaptureDumpState.cpp')
-rw-r--r-- | services/audioflinger/FastCaptureDumpState.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/services/audioflinger/FastCaptureDumpState.cpp b/services/audioflinger/FastCaptureDumpState.cpp index 00f8da0..53eeba5 100644 --- a/services/audioflinger/FastCaptureDumpState.cpp +++ b/services/audioflinger/FastCaptureDumpState.cpp @@ -14,7 +14,13 @@ * limitations under the License. */ +#define LOG_TAG "FastCaptureDumpState" +//define LOG_NDEBUG 0 + +#include "Configuration.h" +#include <utils/Log.h> #include "FastCaptureDumpState.h" +#include "FastCaptureState.h" namespace android { @@ -27,4 +33,21 @@ FastCaptureDumpState::~FastCaptureDumpState() { } +void FastCaptureDumpState::dump(int fd) const +{ + if (mCommand == FastCaptureState::INITIAL) { + dprintf(fd, " FastCapture not initialized\n"); + return; + } + double measuredWarmupMs = (mMeasuredWarmupTs.tv_sec * 1000.0) + + (mMeasuredWarmupTs.tv_nsec / 1000000.0); + double periodSec = (double) mFrameCount / mSampleRate; + dprintf(fd, " FastCapture command=%s readSequence=%u framesRead=%u\n" + " readErrors=%u sampleRate=%u frameCount=%zu\n" + " measuredWarmup=%.3g ms, warmupCycles=%u period=%.2f ms\n", + FastCaptureState::commandToString(mCommand), mReadSequence, mFramesRead, + mReadErrors, mSampleRate, mFrameCount, measuredWarmupMs, mWarmupCycles, + periodSec * 1e3); +} + } // android |