michael@0: diff --git a/dom/camera/GonkCameraSource.cpp b/dom/camera/GonkCameraSource.cpp michael@0: --- a/dom/camera/GonkCameraSource.cpp michael@0: +++ b/dom/camera/GonkCameraSource.cpp michael@0: @@ -492,21 +492,17 @@ status_t GonkCameraSource::init( michael@0: mMeta = new MetaData; michael@0: mMeta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_VIDEO_RAW); michael@0: mMeta->setInt32(kKeyColorFormat, mColorFormat); michael@0: mMeta->setInt32(kKeyWidth, mVideoSize.width); michael@0: mMeta->setInt32(kKeyHeight, mVideoSize.height); michael@0: mMeta->setInt32(kKeyStride, mVideoSize.width); michael@0: mMeta->setInt32(kKeySliceHeight, mVideoSize.height); michael@0: mMeta->setInt32(kKeyFrameRate, mVideoFrameRate); michael@0: - mMeta->setInt32(kKeyHFR, hfr); michael@0: michael@0: - if (want3D) { michael@0: - mMeta->setInt32(kKey3D, !0); michael@0: - } michael@0: return OK; michael@0: } michael@0: michael@0: GonkCameraSource::~GonkCameraSource() { michael@0: if (mStarted) { michael@0: stop(); michael@0: } else if (mInitCheck == OK) { michael@0: // Camera is initialized but because start() is never called, michael@0: diff --git a/dom/camera/GonkRecorder.cpp b/dom/camera/GonkRecorder.cpp michael@0: --- a/dom/camera/GonkRecorder.cpp michael@0: +++ b/dom/camera/GonkRecorder.cpp michael@0: @@ -716,56 +716,16 @@ status_t GonkRecorder::start() { michael@0: mStarted = true; michael@0: } michael@0: michael@0: return status; michael@0: } michael@0: michael@0: sp GonkRecorder::createAudioSource() { michael@0: michael@0: - bool tunneledSource = false; michael@0: - const char *tunnelMime; michael@0: - { michael@0: - AudioParameter param; michael@0: - String8 key("tunneled-input-formats"); michael@0: - param.add( key, String8("get") ); michael@0: - String8 valueStr = AudioSystem::getParameters( 0, param.toString()); michael@0: - AudioParameter result(valueStr); michael@0: - int value; michael@0: - if ( mAudioEncoder == AUDIO_ENCODER_AMR_NB && michael@0: - result.getInt(String8("AMR"),value) == NO_ERROR ) { michael@0: - tunneledSource = true; michael@0: - tunnelMime = MEDIA_MIMETYPE_AUDIO_AMR_NB; michael@0: - } michael@0: - else if ( mAudioEncoder == AUDIO_ENCODER_QCELP && michael@0: - result.getInt(String8("QCELP"),value) == NO_ERROR ) { michael@0: - tunneledSource = true; michael@0: - tunnelMime = MEDIA_MIMETYPE_AUDIO_QCELP; michael@0: - } michael@0: - else if ( mAudioEncoder == AUDIO_ENCODER_EVRC && michael@0: - result.getInt(String8("EVRC"),value) == NO_ERROR ) { michael@0: - tunneledSource = true; michael@0: - tunnelMime = MEDIA_MIMETYPE_AUDIO_EVRC; michael@0: - } michael@0: - } michael@0: - michael@0: - if ( tunneledSource ) { michael@0: - sp audioSource = NULL; michael@0: - sp meta = new MetaData; michael@0: - meta->setInt32(kKeyChannelCount, mAudioChannels); michael@0: - meta->setInt32(kKeySampleRate, mSampleRate); michael@0: - meta->setInt32(kKeyBitRate, mAudioBitRate); michael@0: - if (mAudioTimeScale > 0) { michael@0: - meta->setInt32(kKeyTimeScale, mAudioTimeScale); michael@0: - } michael@0: - meta->setCString( kKeyMIMEType, tunnelMime ); michael@0: - audioSource = new AudioSource( mAudioSource, meta); michael@0: - return audioSource->initCheck( ) == OK ? audioSource : NULL; michael@0: - } michael@0: - michael@0: sp audioSource = michael@0: new AudioSource( michael@0: mAudioSource, michael@0: mSampleRate, michael@0: mAudioChannels); michael@0: michael@0: status_t err = audioSource->initCheck(); michael@0: michael@0: @@ -1226,56 +1186,33 @@ status_t GonkRecorder::setupVideoEncoder michael@0: michael@0: default: michael@0: CHECK(!"Should not be here, unsupported video encoding."); michael@0: break; michael@0: } michael@0: michael@0: sp meta = cameraSource->getFormat(); michael@0: michael@0: - int32_t width, height, stride, sliceHeight, colorFormat, hfr, is3D; michael@0: + int32_t width, height, stride, sliceHeight, colorFormat; michael@0: CHECK(meta->findInt32(kKeyWidth, &width)); michael@0: CHECK(meta->findInt32(kKeyHeight, &height)); michael@0: CHECK(meta->findInt32(kKeyStride, &stride)); michael@0: CHECK(meta->findInt32(kKeySliceHeight, &sliceHeight)); michael@0: CHECK(meta->findInt32(kKeyColorFormat, &colorFormat)); michael@0: - CHECK(meta->findInt32(kKeyHFR, &hfr)); michael@0: - michael@0: - if(hfr) { michael@0: - mMaxFileDurationUs = mMaxFileDurationUs * (hfr/mFrameRate); michael@0: - } michael@0: - michael@0: michael@0: enc_meta->setInt32(kKeyWidth, width); michael@0: enc_meta->setInt32(kKeyHeight, height); michael@0: enc_meta->setInt32(kKeyIFramesInterval, mIFramesIntervalSec); michael@0: enc_meta->setInt32(kKeyStride, stride); michael@0: enc_meta->setInt32(kKeySliceHeight, sliceHeight); michael@0: enc_meta->setInt32(kKeyColorFormat, colorFormat); michael@0: - enc_meta->setInt32(kKeyHFR, hfr); michael@0: if (mVideoTimeScale > 0) { michael@0: enc_meta->setInt32(kKeyTimeScale, mVideoTimeScale); michael@0: } michael@0: michael@0: - char mDeviceName[100]; michael@0: - property_get("ro.board.platform",mDeviceName,"0"); michael@0: - if(!strncmp(mDeviceName, "msm7627a", 8)) { michael@0: - if(hfr && (width * height > 432*240)) { michael@0: - LOGE("HFR mode is supported only upto WQVGA resolution"); michael@0: - return INVALID_OPERATION; michael@0: - } michael@0: - } michael@0: - else { michael@0: - if(hfr && ((mVideoEncoder != VIDEO_ENCODER_H264) || (width * height > 800*480))) { michael@0: - LOGE("HFR mode is supported only upto WVGA and H264 codec."); michael@0: - return INVALID_OPERATION; michael@0: - } michael@0: - } michael@0: - michael@0: - michael@0: /* michael@0: * can set profile from the app as a parameter. michael@0: * For the mean time, set from shell michael@0: */ michael@0: michael@0: char value[PROPERTY_VALUE_MAX]; michael@0: bool customProfile = false; michael@0: michael@0: @@ -1322,19 +1259,16 @@ status_t GonkRecorder::setupVideoEncoder michael@0: } michael@0: michael@0: if (mVideoEncoderProfile != -1) { michael@0: enc_meta->setInt32(kKeyVideoProfile, mVideoEncoderProfile); michael@0: } michael@0: if (mVideoEncoderLevel != -1) { michael@0: enc_meta->setInt32(kKeyVideoLevel, mVideoEncoderLevel); michael@0: } michael@0: - if (meta->findInt32(kKey3D, &is3D)) { michael@0: - enc_meta->setInt32(kKey3D, is3D); michael@0: - } michael@0: michael@0: uint32_t encoder_flags = 0; michael@0: if (mIsMetaDataStoredInVideoBuffers) { michael@0: LOGW("Camera source supports metadata mode, create OMXCodec for metadata"); michael@0: encoder_flags |= OMXCodec::kHardwareCodecsOnly; michael@0: encoder_flags |= OMXCodec::kStoreMetaDataInVideoBuffers; michael@0: encoder_flags |= OMXCodec::kOnlySubmitOneInputBufferAtOneTime; michael@0: }