Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 04333cdc authored by Glenn Kasten's avatar Glenn Kasten
Browse files

Pull out FastCaptureDumpState and FastMixerDumpState

Change-Id: I8e44dbfe02338622eb69193b234743b50f0dd79f
parent 658fc18d
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -77,8 +77,10 @@ LOCAL_32_BIT_ONLY := true
LOCAL_SRC_FILES += \
LOCAL_SRC_FILES += \
    AudioWatchdog.cpp        \
    AudioWatchdog.cpp        \
    FastCapture.cpp          \
    FastCapture.cpp          \
    FastCaptureDumpState.cpp \
    FastCaptureState.cpp     \
    FastCaptureState.cpp     \
    FastMixer.cpp            \
    FastMixer.cpp            \
    FastMixerDumpState.cpp   \
    FastMixerState.cpp       \
    FastMixerState.cpp       \
    FastThread.cpp           \
    FastThread.cpp           \
    FastThreadDumpState.cpp  \
    FastThreadDumpState.cpp  \
+0 −9
Original line number Original line Diff line number Diff line
@@ -210,13 +210,4 @@ void FastCapture::onWork()
    }
    }
}
}


FastCaptureDumpState::FastCaptureDumpState() : FastThreadDumpState(),
    mReadSequence(0), mFramesRead(0), mReadErrors(0), mSampleRate(0), mFrameCount(0)
{
}

FastCaptureDumpState::~FastCaptureDumpState()
{
}

}   // namespace android
}   // namespace android
+1 −13
Original line number Original line Diff line number Diff line
@@ -20,24 +20,12 @@
#include "FastThread.h"
#include "FastThread.h"
#include "StateQueue.h"
#include "StateQueue.h"
#include "FastCaptureState.h"
#include "FastCaptureState.h"
#include "FastThreadDumpState.h"
#include "FastCaptureDumpState.h"


namespace android {
namespace android {


typedef StateQueue<FastCaptureState> FastCaptureStateQueue;
typedef StateQueue<FastCaptureState> FastCaptureStateQueue;


struct FastCaptureDumpState : FastThreadDumpState {
    FastCaptureDumpState();
    /*virtual*/ ~FastCaptureDumpState();

    // FIXME by renaming, could pull up many of these to FastThreadDumpState
    uint32_t mReadSequence;     // incremented before and after each read()
    uint32_t mFramesRead;       // total number of frames read successfully
    uint32_t mReadErrors;       // total number of read() errors
    uint32_t mSampleRate;
    size_t   mFrameCount;
};

class FastCapture : public FastThread {
class FastCapture : public FastThread {


public:
public:
+30 −0
Original line number Original line Diff line number Diff line
/*
 * Copyright (C) 2014 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include "FastCaptureDumpState.h"

namespace android {

FastCaptureDumpState::FastCaptureDumpState() : FastThreadDumpState(),
    mReadSequence(0), mFramesRead(0), mReadErrors(0), mSampleRate(0), mFrameCount(0)
{
}

FastCaptureDumpState::~FastCaptureDumpState()
{
}

}   // android
+40 −0
Original line number Original line Diff line number Diff line
/*
 * Copyright (C) 2014 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef ANDROID_AUDIO_FAST_CAPTURE_DUMP_STATE_H
#define ANDROID_AUDIO_FAST_CAPTURE_DUMP_STATE_H

#include <stdint.h>
#include "Configuration.h"
#include "FastThreadDumpState.h"

namespace android {

struct FastCaptureDumpState : FastThreadDumpState {
    FastCaptureDumpState();
    /*virtual*/ ~FastCaptureDumpState();

    // FIXME by renaming, could pull up many of these to FastThreadDumpState
    uint32_t mReadSequence;     // incremented before and after each read()
    uint32_t mFramesRead;       // total number of frames read successfully
    uint32_t mReadErrors;       // total number of read() errors
    uint32_t mSampleRate;
    size_t   mFrameCount;
};

}   // android

#endif  // ANDROID_AUDIO_FAST_CAPTURE_DUMP_STATE_H
Loading