Bug 726903 - Remove force_stereo_mode pref hack. r=roc

--HG--
extra : rebase_source : 513b926ace8904035111ddc21aa237fd1c28090c
This commit is contained in:
Matthew Gregan 2012-05-24 14:40:09 +12:00
Родитель 4935a407ea
Коммит 0ff37546d0
2 изменённых файлов: 1 добавлений и 37 удалений

Просмотреть файл

@ -11,7 +11,6 @@
#include "nsWebMBufferedParser.h"
#include "VideoUtils.h"
#include "nsTimeRanges.h"
#include "mozilla/Preferences.h"
#define VPX_DONT_DEFINE_STDINT_TYPES
#include "vpx/vp8dx.h"
@ -108,17 +107,10 @@ nsWebMReader::nsWebMReader(nsBuiltinDecoder* aDecoder)
mAudioTrack(0),
mAudioStartUsec(-1),
mAudioFrames(0),
mForceStereoMode(0),
mHasVideo(false),
mHasAudio(false),
mStereoModeForced(false)
mHasAudio(false)
{
MOZ_COUNT_CTOR(nsWebMReader);
mStereoModeForced =
NS_SUCCEEDED(Preferences::GetInt(
"media.webm.force_stereo_mode",
&mForceStereoMode));
}
nsWebMReader::~nsWebMReader()
@ -284,26 +276,6 @@ nsresult nsWebMReader::ReadMetadata(nsVideoInfo* aInfo)
mInfo.mStereoMode = STEREO_MODE_RIGHT_LEFT;
break;
}
// Switch only when stereo mode is explicitly set.
if (mStereoModeForced) {
switch (mForceStereoMode) {
case 1:
mInfo.mStereoMode = STEREO_MODE_LEFT_RIGHT;
break;
case 2:
mInfo.mStereoMode = STEREO_MODE_RIGHT_LEFT;
break;
case 3:
mInfo.mStereoMode = STEREO_MODE_TOP_BOTTOM;
break;
case 4:
mInfo.mStereoMode = STEREO_MODE_BOTTOM_TOP;
break;
default:
mInfo.mStereoMode = STEREO_MODE_MONO;
}
}
}
else if (!mHasAudio && type == NESTEGG_TRACK_AUDIO) {
nestegg_audio_params params;

Просмотреть файл

@ -207,17 +207,9 @@ private:
// Picture region, as relative to the initial frame size.
nsIntRect mPicture;
// Value of the "media.webm.force_stereo_mode" pref, which we need off the
// main thread.
PRInt32 mForceStereoMode;
// Booleans to indicate if we have audio and/or video data
bool mHasVideo;
bool mHasAudio;
// Boolean which is set to true when the "media.webm.force_stereo_mode"
// pref is explicitly set.
bool mStereoModeForced;
};
#endif