Bug 1073003 - Fix -Wreorder warnings. r=ehsan
--- a/dom/media/omx/AudioOffloadPlayer.cpp
+++ b/dom/media/omx/AudioOffloadPlayer.cpp
@@ -50,28 +50,28 @@ PRLogModuleInfo* gAudioOffloadPlayerLog;
#define AUDIO_OFFLOAD_LOG(type, msg)
#endif
// maximum time in paused state when offloading audio decompression.
// When elapsed, the AudioSink is destroyed to allow the audio DSP to power down.
static const uint64_t OFFLOAD_PAUSE_MAX_MSECS = 60000ll;
AudioOffloadPlayer::AudioOffloadPlayer(MediaOmxCommonDecoder* aObserver) :
- mObserver(aObserver),
- mInputBuffer(nullptr),
- mSampleRate(0),
- mSeeking(false),
- mSeekDuringPause(false),
- mReachedEOS(false),
- mSeekTimeUs(0),
- mStartPosUs(0),
- mPositionTimeMediaUs(-1),
mStarted(false),
mPlaying(false),
- mIsElementVisible(true)
+ mSeeking(false),
+ mReachedEOS(false),
+ mSeekDuringPause(false),
+ mIsElementVisible(true),
+ mSampleRate(0),
+ mStartPosUs(0),
+ mSeekTimeUs(0),
+ mPositionTimeMediaUs(-1),
+ mInputBuffer(nullptr),
+ mObserver(aObserver)
{
MOZ_ASSERT(NS_IsMainThread());
#ifdef PR_LOGGING
if (!gAudioOffloadPlayerLog) {
gAudioOffloadPlayerLog = PR_NewLogModule("AudioOffloadPlayer");
}
#endif
--- a/dom/media/omx/AudioOutput.cpp
+++ b/dom/media/omx/AudioOutput.cpp
@@ -28,21 +28,21 @@ extern PRLogModuleInfo* gAudioOffloadPla
PR_LOG(gAudioOffloadPlayerLog, type, msg)
#else
#define AUDIO_OFFLOAD_LOG(type, msg)
#endif
using namespace android;
AudioOutput::AudioOutput(int aSessionId, int aUid) :
+ mCallbackCookie(nullptr),
mCallback(nullptr),
- mCallbackCookie(nullptr),
mCallbackData(nullptr),
- mSessionId(aSessionId),
- mUid(aUid)
+ mUid(aUid),
+ mSessionId(aSessionId)
{
#ifdef PR_LOGGING
if (!gAudioOffloadPlayerLog) {
gAudioOffloadPlayerLog = PR_NewLogModule("AudioOffloadPlayer");
}
#endif
}
--- a/dom/media/omx/MediaOmxReader.cpp
+++ b/dom/media/omx/MediaOmxReader.cpp
@@ -133,25 +133,25 @@ void MediaOmxReader::CancelProcessCached
MOZ_ASSERT(NS_IsMainThread());
MutexAutoLock lock(mMutex);
mIsShutdown = true;
}
MediaOmxReader::MediaOmxReader(AbstractMediaDecoder *aDecoder)
: MediaOmxCommonReader(aDecoder)
, mMutex("MediaOmxReader.Data")
- , mMP3FrameParser(-1)
, mHasVideo(false)
, mHasAudio(false)
, mVideoSeekTimeUs(-1)
, mAudioSeekTimeUs(-1)
+ , mLastParserDuration(-1)
, mSkipCount(0)
, mUseParserDuration(false)
- , mLastParserDuration(-1)
, mIsShutdown(false)
+ , mMP3FrameParser(-1)
, mIsWaitingResources(false)
{
#ifdef PR_LOGGING
if (!gMediaDecoderLog) {
gMediaDecoderLog = PR_NewLogModule("MediaDecoder");
}
#endif
--- a/dom/media/omx/OMXCodecProxy.cpp
+++ b/dom/media/omx/OMXCodecProxy.cpp
@@ -50,21 +50,21 @@ OMXCodecProxy::OMXCodecProxy(
const sp<MetaData> &meta,
bool createEncoder,
const sp<MediaSource> &source,
const char *matchComponentName,
uint32_t flags,
const sp<ANativeWindow> &nativeWindow)
: mOMX(omx),
mSrcMeta(meta),
+ mComponentName(nullptr),
mIsEncoder(createEncoder),
- mSource(source),
- mComponentName(nullptr),
mFlags(flags),
mNativeWindow(nativeWindow),
+ mSource(source),
mState(MediaResourceManagerClient::CLIENT_STATE_WAIT_FOR_RESOURCE)
{
}
OMXCodecProxy::~OMXCodecProxy()
{
mState = MediaResourceManagerClient::CLIENT_STATE_SHUTDOWN;
--- a/dom/media/omx/OMXCodecWrapper.cpp
+++ b/dom/media/omx/OMXCodecWrapper.cpp
@@ -587,18 +587,18 @@ public:
InputBufferHelper(sp<MediaCodec>& aCodec, Vector<sp<ABuffer> >& aBuffers,
OMXAudioEncoder& aEncoder, int aInputFlags)
: mCodec(aCodec)
, mBuffers(aBuffers)
, mOMXAEncoder(aEncoder)
, mInputFlags(aInputFlags)
, mIndex(0)
, mData(nullptr)
+ , mCapicity(0)
, mOffset(0)
- , mCapicity(0)
{}
~InputBufferHelper()
{
// Unflushed data in buffer.
MOZ_ASSERT(!mData);
}
--- a/dom/media/omx/OmxDecoder.cpp
+++ b/dom/media/omx/OmxDecoder.cpp
@@ -60,23 +60,23 @@ OmxDecoder::OmxDecoder(MediaResource *aR
mVideoHeight(0),
mVideoColorFormat(0),
mVideoStride(0),
mVideoSliceHeight(0),
mVideoRotation(0),
mAudioChannels(-1),
mAudioSampleRate(-1),
mDurationUs(-1),
+ mVideoLastFrameTime(-1),
mVideoBuffer(nullptr),
mAudioBuffer(nullptr),
mIsVideoSeeking(false),
mAudioMetadataRead(false),
mAudioPaused(false),
- mVideoPaused(false),
- mVideoLastFrameTime(-1)
+ mVideoPaused(false)
{
mLooper = new ALooper;
mLooper->setName("OmxDecoder");
mReflector = new AHandlerReflector<OmxDecoder>(this);
// Register AMessage handler to ALooper.
mLooper->registerHandler(mReflector);
// Start ALooper thread.