old mode 100755new mode 100644.. | .. |
---|
164 | 164 | const int kDefaultNumStillBuffer = 2; |
---|
165 | 165 | const int kDefaultOrientation = 0; // suitable for natural landscape displays like tablet/TV |
---|
166 | 166 | // For phone devices 270 is better |
---|
| 167 | + const int kDefaultJpegOrientation = 0; |
---|
167 | 168 | } // anonymous namespace |
---|
168 | 169 | |
---|
169 | 170 | const char* ExternalCameraConfig::kDefaultCfgPath = "/vendor/etc/external_camera_config.xml"; |
---|
.. | .. |
---|
284 | 285 | ret.orientation = orientation->IntAttribute("degree", /*Default*/kDefaultOrientation); |
---|
285 | 286 | } |
---|
286 | 287 | |
---|
| 288 | + XMLElement *jpegOrientation = deviceCfg->FirstChildElement("JpegOrientation"); |
---|
| 289 | + if (jpegOrientation == nullptr) { |
---|
| 290 | + ALOGI("%s: no jpeg orientation specified", __FUNCTION__); |
---|
| 291 | + } else { |
---|
| 292 | + ret.jpegOrientation = jpegOrientation->IntAttribute("degree", |
---|
| 293 | + /*Default*/kDefaultJpegOrientation); |
---|
| 294 | + } |
---|
| 295 | + |
---|
287 | 296 | ALOGI("%s: external camera cfg loaded: maxJpgBufSize %d," |
---|
288 | | - " num video buffers %d, num still buffers %d, orientation %d", |
---|
| 297 | + " num video buffers %d, num still buffers %d, orientation %d jpeg orientation %d", |
---|
289 | 298 | __FUNCTION__, ret.maxJpegBufSize, |
---|
290 | | - ret.numVideoBuffers, ret.numStillBuffers, ret.orientation); |
---|
| 299 | + ret.numVideoBuffers, ret.numStillBuffers, |
---|
| 300 | + ret.orientation, ret.jpegOrientation); |
---|
291 | 301 | for (const auto& limit : ret.fpsLimits) { |
---|
292 | 302 | ALOGI("%s: fpsLimitList: %dx%d@%f", __FUNCTION__, |
---|
293 | 303 | limit.size.width, limit.size.height, limit.fpsUpperBound); |
---|