FastCaptureDumpState.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Copyright (C) 2014 The Android Open Source Project
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #ifndef ANDROID_AUDIO_FAST_CAPTURE_DUMP_STATE_H
  17. #define ANDROID_AUDIO_FAST_CAPTURE_DUMP_STATE_H
  18. #include <stdint.h>
  19. #include "Configuration.h"
  20. #include "FastThreadDumpState.h"
  21. namespace android {
  22. struct FastCaptureDumpState : FastThreadDumpState {
  23. FastCaptureDumpState();
  24. /*virtual*/ ~FastCaptureDumpState();
  25. void dump(int fd) const; // should only be called on a stable copy, not the original
  26. // FIXME by renaming, could pull up many of these to FastThreadDumpState
  27. uint32_t mReadSequence; // incremented before and after each read()
  28. uint32_t mFramesRead; // total number of frames read successfully
  29. uint32_t mReadErrors; // total number of read() errors
  30. uint32_t mSampleRate;
  31. size_t mFrameCount;
  32. };
  33. } // android
  34. #endif // ANDROID_AUDIO_FAST_CAPTURE_DUMP_STATE_H