DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (31ec81b5d7bb)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163
diff --git a/dom/camera/GonkCameraSource.cpp b/dom/camera/GonkCameraSource.cpp
--- a/dom/camera/GonkCameraSource.cpp
+++ b/dom/camera/GonkCameraSource.cpp
@@ -492,21 +492,17 @@ status_t GonkCameraSource::init(
     mMeta = new MetaData;
     mMeta->setCString(kKeyMIMEType,  MEDIA_MIMETYPE_VIDEO_RAW);
     mMeta->setInt32(kKeyColorFormat, mColorFormat);
     mMeta->setInt32(kKeyWidth,       mVideoSize.width);
     mMeta->setInt32(kKeyHeight,      mVideoSize.height);
     mMeta->setInt32(kKeyStride,      mVideoSize.width);
     mMeta->setInt32(kKeySliceHeight, mVideoSize.height);
     mMeta->setInt32(kKeyFrameRate,   mVideoFrameRate);
-    mMeta->setInt32(kKeyHFR, hfr);
 
-    if (want3D) {
-        mMeta->setInt32(kKey3D, !0);
-    }
     return OK;
 }
 
 GonkCameraSource::~GonkCameraSource() {
     if (mStarted) {
         stop();
     } else if (mInitCheck == OK) {
         // Camera is initialized but because start() is never called,
diff --git a/dom/camera/GonkRecorder.cpp b/dom/camera/GonkRecorder.cpp
--- a/dom/camera/GonkRecorder.cpp
+++ b/dom/camera/GonkRecorder.cpp
@@ -716,56 +716,16 @@ status_t GonkRecorder::start() {
         mStarted = true;
     }
 
     return status;
 }
 
 sp<MediaSource> GonkRecorder::createAudioSource() {
 
-    bool tunneledSource = false;
-    const char *tunnelMime;
-    {
-        AudioParameter param;
-        String8 key("tunneled-input-formats");
-        param.add( key, String8("get") );
-        String8 valueStr = AudioSystem::getParameters( 0, param.toString());
-        AudioParameter result(valueStr);
-        int value;
-        if ( mAudioEncoder == AUDIO_ENCODER_AMR_NB &&
-            result.getInt(String8("AMR"),value) == NO_ERROR ) {
-            tunneledSource = true;
-            tunnelMime = MEDIA_MIMETYPE_AUDIO_AMR_NB;
-        }
-        else if ( mAudioEncoder == AUDIO_ENCODER_QCELP &&
-            result.getInt(String8("QCELP"),value) == NO_ERROR ) {
-            tunneledSource = true;
-            tunnelMime = MEDIA_MIMETYPE_AUDIO_QCELP;
-        }
-        else if ( mAudioEncoder == AUDIO_ENCODER_EVRC &&
-            result.getInt(String8("EVRC"),value) == NO_ERROR ) {
-            tunneledSource = true;
-            tunnelMime = MEDIA_MIMETYPE_AUDIO_EVRC;
-        }
-    }
-
-    if ( tunneledSource ) {
-        sp<AudioSource> audioSource = NULL;
-        sp<MetaData> meta = new MetaData;
-        meta->setInt32(kKeyChannelCount, mAudioChannels);
-        meta->setInt32(kKeySampleRate, mSampleRate);
-        meta->setInt32(kKeyBitRate, mAudioBitRate);
-        if (mAudioTimeScale > 0) {
-            meta->setInt32(kKeyTimeScale, mAudioTimeScale);
-        }
-        meta->setCString( kKeyMIMEType, tunnelMime );
-        audioSource = new AudioSource( mAudioSource, meta);
-        return audioSource->initCheck( ) == OK ? audioSource : NULL;
-    }
-
     sp<AudioSource> audioSource =
         new AudioSource(
                 mAudioSource,
                 mSampleRate,
                 mAudioChannels);
 
     status_t err = audioSource->initCheck();
 
@@ -1226,56 +1186,33 @@ status_t GonkRecorder::setupVideoEncoder
 
         default:
             CHECK(!"Should not be here, unsupported video encoding.");
             break;
     }
 
     sp<MetaData> meta = cameraSource->getFormat();
 
-    int32_t width, height, stride, sliceHeight, colorFormat, hfr, is3D;
+    int32_t width, height, stride, sliceHeight, colorFormat;
     CHECK(meta->findInt32(kKeyWidth, &width));
     CHECK(meta->findInt32(kKeyHeight, &height));
     CHECK(meta->findInt32(kKeyStride, &stride));
     CHECK(meta->findInt32(kKeySliceHeight, &sliceHeight));
     CHECK(meta->findInt32(kKeyColorFormat, &colorFormat));
-    CHECK(meta->findInt32(kKeyHFR, &hfr));
-
-    if(hfr) {
-      mMaxFileDurationUs = mMaxFileDurationUs * (hfr/mFrameRate);
-    }
-
 
     enc_meta->setInt32(kKeyWidth, width);
     enc_meta->setInt32(kKeyHeight, height);
     enc_meta->setInt32(kKeyIFramesInterval, mIFramesIntervalSec);
     enc_meta->setInt32(kKeyStride, stride);
     enc_meta->setInt32(kKeySliceHeight, sliceHeight);
     enc_meta->setInt32(kKeyColorFormat, colorFormat);
-    enc_meta->setInt32(kKeyHFR, hfr);
     if (mVideoTimeScale > 0) {
         enc_meta->setInt32(kKeyTimeScale, mVideoTimeScale);
     }
 
-    char mDeviceName[100];
-    property_get("ro.board.platform",mDeviceName,"0");
-    if(!strncmp(mDeviceName, "msm7627a", 8)) {
-      if(hfr && (width * height > 432*240)) {
-        LOGE("HFR mode is supported only upto WQVGA resolution");
-        return INVALID_OPERATION;
-      }
-    }
-    else {
-      if(hfr && ((mVideoEncoder != VIDEO_ENCODER_H264) || (width * height > 800*480))) {
-        LOGE("HFR mode is supported only upto WVGA and H264 codec.");
-        return INVALID_OPERATION;
-      }
-    }
-
-
     /*
      * can set profile from the app as a parameter.
      * For the mean time, set from shell
      */
 
     char value[PROPERTY_VALUE_MAX];
     bool customProfile = false;
 
@@ -1322,19 +1259,16 @@ status_t GonkRecorder::setupVideoEncoder
     }
 
     if (mVideoEncoderProfile != -1) {
         enc_meta->setInt32(kKeyVideoProfile, mVideoEncoderProfile);
     }
     if (mVideoEncoderLevel != -1) {
         enc_meta->setInt32(kKeyVideoLevel, mVideoEncoderLevel);
     }
-    if (meta->findInt32(kKey3D, &is3D)) {
-        enc_meta->setInt32(kKey3D, is3D);
-    }
 
     uint32_t encoder_flags = 0;
     if (mIsMetaDataStoredInVideoBuffers) {
         LOGW("Camera source supports metadata mode, create OMXCodec for metadata");
         encoder_flags |= OMXCodec::kHardwareCodecsOnly;
         encoder_flags |= OMXCodec::kStoreMetaDataInVideoBuffers;
         encoder_flags |= OMXCodec::kOnlySubmitOneInputBufferAtOneTime;
     }