Loading camera/ndk/include/camera/NdkCameraMetadataTags.h +47 −43 Original line number Diff line number Diff line Loading @@ -2257,7 +2257,7 @@ typedef enum acamera_metadata_tag { * from the main sensor along the +X axis (to the right from the user's perspective) will * report <code>(0.03, 0, 0)</code>.</p> * <p>To transform a pixel coordinates between two cameras facing the same direction, first * the source camera ACAMERA_LENS_RADIAL_DISTORTION must be corrected for. Then the source * the source camera ACAMERA_LENS_DISTORTION must be corrected for. Then the source * camera ACAMERA_LENS_INTRINSIC_CALIBRATION needs to be applied, followed by the * ACAMERA_LENS_POSE_ROTATION of the source camera, the translation of the source camera * relative to the destination camera, the ACAMERA_LENS_POSE_ROTATION of the destination Loading @@ -2269,10 +2269,10 @@ typedef enum acamera_metadata_tag { * <p>When ACAMERA_LENS_POSE_REFERENCE is GYROSCOPE, then this position is relative to * the center of the primary gyroscope on the device.</p> * * @see ACAMERA_LENS_DISTORTION * @see ACAMERA_LENS_INTRINSIC_CALIBRATION * @see ACAMERA_LENS_POSE_REFERENCE * @see ACAMERA_LENS_POSE_ROTATION * @see ACAMERA_LENS_RADIAL_DISTORTION */ ACAMERA_LENS_POSE_TRANSLATION = // float[3] ACAMERA_LENS_START + 7, Loading Loading @@ -2382,7 +2382,7 @@ typedef enum acamera_metadata_tag { * where <code>(0,0)</code> is the top-left of the * preCorrectionActiveArraySize rectangle. Once the pose and * intrinsic calibration transforms have been applied to a * world point, then the ACAMERA_LENS_RADIAL_DISTORTION * world point, then the ACAMERA_LENS_DISTORTION * transform needs to be applied, and the result adjusted to * be in the ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE coordinate * system (where <code>(0, 0)</code> is the top-left of the Loading @@ -2390,19 +2390,42 @@ typedef enum acamera_metadata_tag { * coordinate of the world point for processed (non-RAW) * output buffers.</p> * * @see ACAMERA_LENS_DISTORTION * @see ACAMERA_LENS_POSE_ROTATION * @see ACAMERA_LENS_POSE_TRANSLATION * @see ACAMERA_LENS_RADIAL_DISTORTION * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE */ ACAMERA_LENS_INTRINSIC_CALIBRATION = // float[5] ACAMERA_LENS_START + 10, ACAMERA_LENS_RADIAL_DISTORTION = // Deprecated! DO NOT USE ACAMERA_LENS_START + 11, /** * <p>The origin for ACAMERA_LENS_POSE_TRANSLATION.</p> * * @see ACAMERA_LENS_POSE_TRANSLATION * * <p>Type: byte (acamera_metadata_enum_android_lens_pose_reference_t)</p> * * <p>This tag may appear in: * <ul> * <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li> * </ul></p> * * <p>Different calibration methods and use cases can produce better or worse results * depending on the selected coordinate origin.</p> */ ACAMERA_LENS_POSE_REFERENCE = // byte (acamera_metadata_enum_android_lens_pose_reference_t) ACAMERA_LENS_START + 12, /** * <p>The correction coefficients to correct for this camera device's * radial and tangential lens distortion.</p> * <p>Replaces the deprecated ACAMERA_LENS_RADIAL_DISTORTION field, which was * inconsistently defined.</p> * * @see ACAMERA_LENS_RADIAL_DISTORTION * * <p>Type: float[6]</p> * <p>Type: float[5]</p> * * <p>This tag may appear in: * <ul> Loading @@ -2410,13 +2433,13 @@ typedef enum acamera_metadata_tag { * <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li> * </ul></p> * * <p>Four radial distortion coefficients <code>[kappa_0, kappa_1, kappa_2, * <p>Three radial distortion coefficients <code>[kappa_1, kappa_2, * kappa_3]</code> and two tangential distortion coefficients * <code>[kappa_4, kappa_5]</code> that can be used to correct the * lens's geometric distortion with the mapping equations:</p> * <pre><code> x_c = x_i * ( kappa_0 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) + * <pre><code> x_c = x_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) + * kappa_4 * (2 * x_i * y_i) + kappa_5 * ( r^2 + 2 * x_i^2 ) * y_c = y_i * ( kappa_0 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) + * y_c = y_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) + * kappa_5 * (2 * x_i * y_i) + kappa_4 * ( r^2 + 2 * y_i^2 ) * </code></pre> * <p>Here, <code>[x_c, y_c]</code> are the coordinates to sample in the Loading @@ -2424,40 +2447,21 @@ typedef enum acamera_metadata_tag { * corrected image at the coordinate <code>[x_i, y_i]</code>:</p> * <pre><code> correctedImage(x_i, y_i) = sample_at(x_c, y_c, inputImage) * </code></pre> * <p>The pixel coordinates are defined in a normalized * coordinate system related to the * ACAMERA_LENS_INTRINSIC_CALIBRATION calibration fields. * Both <code>[x_i, y_i]</code> and <code>[x_c, y_c]</code> have <code>(0,0)</code> at the * lens optical center <code>[c_x, c_y]</code>. The maximum magnitudes * of both x and y coordinates are normalized to be 1 at the * edge further from the optical center, so the range * for both dimensions is <code>-1 <= x <= 1</code>.</p> * <p>The pixel coordinates are defined in a coordinate system * related to the ACAMERA_LENS_INTRINSIC_CALIBRATION * calibration fields; see that entry for details of the mapping stages. * Both <code>[x_i, y_i]</code> and <code>[x_c, y_c]</code> * have <code>(0,0)</code> at the lens optical center <code>[c_x, c_y]</code>, and * the range of the coordinates depends on the focal length * terms of the intrinsic calibration.</p> * <p>Finally, <code>r</code> represents the radial distance from the * optical center, <code>r^2 = x_i^2 + y_i^2</code>, and its magnitude * is therefore no larger than <code>|r| <= sqrt(2)</code>.</p> * optical center, <code>r^2 = x_i^2 + y_i^2</code>.</p> * <p>The distortion model used is the Brown-Conrady model.</p> * * @see ACAMERA_LENS_INTRINSIC_CALIBRATION */ ACAMERA_LENS_RADIAL_DISTORTION = // float[6] ACAMERA_LENS_START + 11, /** * <p>The origin for ACAMERA_LENS_POSE_TRANSLATION.</p> * * @see ACAMERA_LENS_POSE_TRANSLATION * * <p>Type: byte (acamera_metadata_enum_android_lens_pose_reference_t)</p> * * <p>This tag may appear in: * <ul> * <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li> * </ul></p> * * <p>Different calibration methods and use cases can produce better or worse results * depending on the selected coordinate origin.</p> */ ACAMERA_LENS_POSE_REFERENCE = // byte (acamera_metadata_enum_android_lens_pose_reference_t) ACAMERA_LENS_START + 12, ACAMERA_LENS_DISTORTION = // float[5] ACAMERA_LENS_START + 13, ACAMERA_LENS_END, /** Loading Loading @@ -4212,7 +4216,7 @@ typedef enum acamera_metadata_tag { * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.</p> * <p>The currently supported fields that correct for geometric distortion are:</p> * <ol> * <li>ACAMERA_LENS_RADIAL_DISTORTION.</li> * <li>ACAMERA_LENS_DISTORTION.</li> * </ol> * <p>If all of the geometric distortion fields are no-ops, this rectangle will be the same * as the post-distortion-corrected rectangle given in Loading @@ -4224,7 +4228,7 @@ typedef enum acamera_metadata_tag { * full array may include black calibration pixels or other inactive regions.</p> * <p>The data representation is <code>int[4]</code>, which maps to <code>(left, top, width, height)</code>.</p> * * @see ACAMERA_LENS_RADIAL_DISTORTION * @see ACAMERA_LENS_DISTORTION * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE * @see ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE Loading Loading @@ -6941,7 +6945,7 @@ typedef enum acamera_metadata_enum_acamera_request_available_capabilities { * <li>ACAMERA_LENS_POSE_TRANSLATION</li> * <li>ACAMERA_LENS_POSE_ROTATION</li> * <li>ACAMERA_LENS_INTRINSIC_CALIBRATION</li> * <li>ACAMERA_LENS_RADIAL_DISTORTION</li> * <li>ACAMERA_LENS_DISTORTION</li> * </ul> * </li> * <li>The ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE entry is listed by this device.</li> Loading @@ -6959,12 +6963,12 @@ typedef enum acamera_metadata_enum_acamera_request_available_capabilities { * rate, including depth stall time.</p> * * @see ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE * @see ACAMERA_LENS_DISTORTION * @see ACAMERA_LENS_FACING * @see ACAMERA_LENS_INTRINSIC_CALIBRATION * @see ACAMERA_LENS_POSE_REFERENCE * @see ACAMERA_LENS_POSE_ROTATION * @see ACAMERA_LENS_POSE_TRANSLATION * @see ACAMERA_LENS_RADIAL_DISTORTION */ ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT = 8, Loading Loading @@ -6994,7 +6998,7 @@ typedef enum acamera_metadata_enum_acamera_request_available_capabilities { * <li>ACAMERA_LENS_POSE_ROTATION</li> * <li>ACAMERA_LENS_POSE_TRANSLATION</li> * <li>ACAMERA_LENS_INTRINSIC_CALIBRATION</li> * <li>ACAMERA_LENS_RADIAL_DISTORTION</li> * <li>ACAMERA_LENS_DISTORTION</li> * </ul> * </li> * <li>The SENSOR_INFO_TIMESTAMP_SOURCE of the logical device and physical devices must be Loading @@ -7020,11 +7024,11 @@ typedef enum acamera_metadata_enum_acamera_request_available_capabilities { * not slow down the frame rate of the capture, as long as the minimum frame duration * of the physical and logical streams are the same.</p> * * @see ACAMERA_LENS_DISTORTION * @see ACAMERA_LENS_INTRINSIC_CALIBRATION * @see ACAMERA_LENS_POSE_REFERENCE * @see ACAMERA_LENS_POSE_ROTATION * @see ACAMERA_LENS_POSE_TRANSLATION * @see ACAMERA_LENS_RADIAL_DISTORTION * @see ACAMERA_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE */ ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA = 11, Loading drm/mediadrm/plugins/clearkey/hidl/DrmPlugin.cpp +131 −2 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include <utils/Log.h> #include <stdio.h> #include <inttypes.h> #include "DrmPlugin.h" #include "ClearKeyDrmProperties.h" Loading @@ -26,6 +27,7 @@ #include "TypeConvert.h" namespace { const int kSecureStopIdStart = 100; const std::string kStreaming("Streaming"); const std::string kOffline("Offline"); const std::string kTrue("True"); Loading @@ -36,7 +38,18 @@ const std::string kQueryKeyPlayAllowed("PlayAllowed"); // Value: "True" or "False" const std::string kQueryKeyRenewAllowed("RenewAllowed"); // Value: "True" or "False" }; const int kSecureStopIdSize = 10; std::vector<uint8_t> uint32ToVector(uint32_t value) { // 10 bytes to display max value 4294967295 + one byte null terminator char buffer[kSecureStopIdSize]; memset(buffer, 0, kSecureStopIdSize); snprintf(buffer, kSecureStopIdSize, "%" PRIu32, value); return std::vector<uint8_t>(buffer, buffer + sizeof(buffer)); } }; // unnamed namespace namespace android { namespace hardware { Loading @@ -48,9 +61,11 @@ DrmPlugin::DrmPlugin(SessionLibrary* sessionLibrary) : mSessionLibrary(sessionLibrary), mOpenSessionOkCount(0), mCloseSessionOkCount(0), mCloseSessionNotOpenedCount(0) { mCloseSessionNotOpenedCount(0), mNextSecureStopId(kSecureStopIdStart) { mPlayPolicy.clear(); initProperties(); mSecureStops.clear(); } void DrmPlugin::initProperties() { Loading @@ -73,6 +88,18 @@ void DrmPlugin::initProperties() { mByteArrayProperties[kMetricsKey] = valueVector; } // The secure stop in ClearKey implementation is not installed securely. // This function merely creates a test environment for testing secure stops APIs. // The content in this secure stop is implementation dependent, the clearkey // secureStop does not serve as a reference implementation. void DrmPlugin::installSecureStop(const hidl_vec<uint8_t>& sessionId) { ClearkeySecureStop clearkeySecureStop; clearkeySecureStop.id = uint32ToVector(++mNextSecureStopId); clearkeySecureStop.data.assign(sessionId.begin(), sessionId.end()); mSecureStops.insert(std::pair<std::vector<uint8_t>, ClearkeySecureStop>( clearkeySecureStop.id, clearkeySecureStop)); } Return<void> DrmPlugin::openSession(openSession_cb _hidl_cb) { sp<Session> session = mSessionLibrary->createSession(); Loading Loading @@ -209,6 +236,7 @@ Return<void> DrmPlugin::provideKeyResponse( _hidl_cb(Status::BAD_VALUE, hidl_vec<uint8_t>()); return Void(); } sp<Session> session = mSessionLibrary->findSession(toVector(scope)); if (!session.get()) { _hidl_cb(Status::ERROR_DRM_SESSION_NOT_OPENED, hidl_vec<uint8_t>()); Loading @@ -224,6 +252,8 @@ Return<void> DrmPlugin::provideKeyResponse( keySetId.clear(); } installSecureStop(scope); // Returns status and empty keySetId _hidl_cb(status, toHidlVec(keySetId)); return Void(); Loading Loading @@ -435,7 +465,106 @@ Return<void> DrmPlugin::getMetrics(getMetrics_cb _hidl_cb) { return Void(); } Return<void> DrmPlugin::getSecureStops(getSecureStops_cb _hidl_cb) { std::vector<SecureStop> stops; for (auto itr = mSecureStops.begin(); itr != mSecureStops.end(); ++itr) { ClearkeySecureStop clearkeyStop = itr->second; std::vector<uint8_t> stopVec; stopVec.insert(stopVec.end(), clearkeyStop.id.begin(), clearkeyStop.id.end()); stopVec.insert(stopVec.end(), clearkeyStop.data.begin(), clearkeyStop.data.end()); SecureStop stop; stop.opaqueData = toHidlVec(stopVec); stops.push_back(stop); } _hidl_cb(Status::OK, stops); return Void(); } Return<void> DrmPlugin::getSecureStop(const hidl_vec<uint8_t>& secureStopId, getSecureStop_cb _hidl_cb) { SecureStop stop; auto itr = mSecureStops.find(toVector(secureStopId)); if (itr != mSecureStops.end()) { ClearkeySecureStop clearkeyStop = itr->second; std::vector<uint8_t> stopVec; stopVec.insert(stopVec.end(), clearkeyStop.id.begin(), clearkeyStop.id.end()); stopVec.insert(stopVec.end(), clearkeyStop.data.begin(), clearkeyStop.data.end()); stop.opaqueData = toHidlVec(stopVec); _hidl_cb(Status::OK, stop); } else { _hidl_cb(Status::BAD_VALUE, stop); } return Void(); } Return<Status> DrmPlugin::releaseSecureStop(const hidl_vec<uint8_t>& secureStopId) { return removeSecureStop(secureStopId); } Return<Status> DrmPlugin::releaseAllSecureStops() { return removeAllSecureStops(); } Return<void> DrmPlugin::getSecureStopIds(getSecureStopIds_cb _hidl_cb) { std::vector<SecureStopId> ids; for (auto itr = mSecureStops.begin(); itr != mSecureStops.end(); ++itr) { ids.push_back(itr->first); } _hidl_cb(Status::OK, toHidlVec(ids)); return Void(); } Return<Status> DrmPlugin::releaseSecureStops(const SecureStopRelease& ssRelease) { if (ssRelease.opaqueData.size() == 0) { return Status::BAD_VALUE; } Status status = Status::OK; std::vector<uint8_t> input = toVector(ssRelease.opaqueData); // The format of opaqueData is shared between the server // and the drm service. The clearkey implementation consists of: // count - number of secure stops // list of fixed length secure stops size_t countBufferSize = sizeof(uint32_t); uint32_t count = 0; sscanf(reinterpret_cast<char*>(input.data()), "%04" PRIu32, &count); // Avoid divide by 0 below. if (count == 0) { return Status::BAD_VALUE; } size_t secureStopSize = (input.size() - countBufferSize) / count; uint8_t buffer[secureStopSize]; size_t offset = countBufferSize; // skip the count for (size_t i = 0; i < count; ++i, offset += secureStopSize) { memcpy(buffer, input.data() + offset, secureStopSize); std::vector<uint8_t> id(buffer, buffer + kSecureStopIdSize); status = removeSecureStop(toHidlVec(id)); if (Status::OK != status) break; } return status; } Return<Status> DrmPlugin::removeSecureStop(const hidl_vec<uint8_t>& secureStopId) { if (1 != mSecureStops.erase(toVector(secureStopId))) { return Status::BAD_VALUE; } return Status::OK; } Return<Status> DrmPlugin::removeAllSecureStops() { mSecureStops.clear(); mNextSecureStopId = kSecureStopIdStart; return Status::OK; } } // namespace clearkey } // namespace V1_1 Loading drm/mediadrm/plugins/clearkey/hidl/include/DrmPlugin.h +25 −48 Original line number Diff line number Diff line Loading @@ -17,9 +17,11 @@ #ifndef CLEARKEY_DRM_PLUGIN_H_ #define CLEARKEY_DRM_PLUGIN_H_ #include <android/hardware/drm/1.1/IDrmPlugin.h> #include <stdio.h> #include <map> #include "SessionLibrary.h" #include "Utils.h" Loading @@ -36,6 +38,7 @@ using ::android::hardware::drm::V1_0::KeyType; using ::android::hardware::drm::V1_0::KeyValue; using ::android::hardware::drm::V1_0::SecureStop; using ::android::hardware::drm::V1_0::SecureStopId; using ::android::hardware::drm::V1_0::SessionId; using ::android::hardware::drm::V1_0::Status; using ::android::hardware::drm::V1_1::DrmMetricGroup; using ::android::hardware::drm::V1_1::IDrmPlugin; Loading Loading @@ -124,34 +127,6 @@ struct DrmPlugin : public IDrmPlugin { return Void(); } Return<void> getSecureStops(getSecureStops_cb _hidl_cb) { _hidl_cb(Status::ERROR_DRM_CANNOT_HANDLE, hidl_vec<SecureStop>()); return Void(); } Return<void> getSecureStop( const hidl_vec<uint8_t>& secureStopId, getSecureStop_cb _hidl_cb) { if (secureStopId.size() == 0) { _hidl_cb(Status::BAD_VALUE, SecureStop()); return Void(); } _hidl_cb(Status::ERROR_DRM_CANNOT_HANDLE, SecureStop()); return Void(); } Return<Status> releaseSecureStop(const hidl_vec<uint8_t>& ssRelease) { if (ssRelease.size() == 0) { return Status::BAD_VALUE; } return Status::ERROR_DRM_CANNOT_HANDLE; } Return<Status> releaseAllSecureStops() { return Status::ERROR_DRM_CANNOT_HANDLE; } Return<void> getHdcpLevels(getHdcpLevels_cb _hidl_cb) { HdcpLevel connectedLevel = HdcpLevel::HDCP_NONE; HdcpLevel maxLevel = HdcpLevel::HDCP_NO_OUTPUT; Loading Loading @@ -305,31 +280,26 @@ struct DrmPlugin : public IDrmPlugin { return Void(); } Return<void> getSecureStopIds(getSecureStopIds_cb _hidl_cb) { _hidl_cb(Status::ERROR_DRM_CANNOT_HANDLE, hidl_vec<SecureStopId>()); return Void(); } Return<void> getSecureStops(getSecureStops_cb _hidl_cb); Return<Status> releaseSecureStops(const SecureStopRelease& ssRelease) { if (ssRelease.opaqueData.size() == 0) { return Status::BAD_VALUE; } return Status::ERROR_DRM_CANNOT_HANDLE; } Return<void> getSecureStop(const hidl_vec<uint8_t>& secureStopId, getSecureStop_cb _hidl_cb); Return<Status> removeSecureStop(const hidl_vec<uint8_t>& secureStopId) { if (secureStopId.size() == 0) { return Status::BAD_VALUE; } return Status::ERROR_DRM_CANNOT_HANDLE; } Return<Status> releaseSecureStop(const hidl_vec<uint8_t>& ssRelease); Return<Status> removeAllSecureStops() { return Status::ERROR_DRM_CANNOT_HANDLE; } Return<Status> releaseAllSecureStops(); Return<void> getSecureStopIds(getSecureStopIds_cb _hidl_cb); Return<Status> releaseSecureStops(const SecureStopRelease& ssRelease); Return<Status> removeSecureStop(const hidl_vec<uint8_t>& secureStopId); Return<Status> removeAllSecureStops(); private: void initProperties(); void installSecureStop(const hidl_vec<uint8_t>& sessionId); void setPlayPolicy(); Return<Status> setSecurityLevel(const hidl_vec<uint8_t>& sessionId, Loading @@ -344,6 +314,12 @@ private: KeyRequestType *getKeyRequestType, std::string *defaultUrl); struct ClearkeySecureStop { std::vector<uint8_t> id; std::vector<uint8_t> data; }; std::map<std::vector<uint8_t>, ClearkeySecureStop> mSecureStops; std::vector<KeyValue> mPlayPolicy; std::map<std::string, std::string> mStringProperties; std::map<std::string, std::vector<uint8_t> > mByteArrayProperties; Loading @@ -353,6 +329,7 @@ private: int64_t mOpenSessionOkCount; int64_t mCloseSessionOkCount; int64_t mCloseSessionNotOpenedCount; uint32_t mNextSecureStopId; CLEARKEY_DISALLOW_COPY_AND_ASSIGN_AND_NEW(DrmPlugin); }; Loading media/extractors/mp4/ItemTable.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -1471,8 +1471,8 @@ sp<MetaData> ItemTable::getImageMeta(const uint32_t imageIndex) { // point image to the first tile for grid size and HVCC image = &mItemIdToItemMap.editValueAt(tileItemIndex); meta->setInt32(kKeyGridWidth, image->width); meta->setInt32(kKeyGridHeight, image->height); meta->setInt32(kKeyTileWidth, image->width); meta->setInt32(kKeyTileHeight, image->height); meta->setInt32(kKeyMaxInputSize, image->width * image->height * 1.5); } Loading media/libmedia/NdkWrapper.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -56,10 +56,8 @@ static const char *AMediaFormatKeyGroupInt32[] = { AMEDIAFORMAT_KEY_COLOR_TRANSFER, AMEDIAFORMAT_KEY_COMPLEXITY, AMEDIAFORMAT_KEY_FLAC_COMPRESSION_LEVEL, AMEDIAFORMAT_KEY_GRID_COLS, AMEDIAFORMAT_KEY_GRID_HEIGHT, AMEDIAFORMAT_KEY_GRID_COLUMNS, AMEDIAFORMAT_KEY_GRID_ROWS, AMEDIAFORMAT_KEY_GRID_WIDTH, AMEDIAFORMAT_KEY_HEIGHT, AMEDIAFORMAT_KEY_INTRA_REFRESH_PERIOD, AMEDIAFORMAT_KEY_IS_ADTS, Loading @@ -84,6 +82,8 @@ static const char *AMediaFormatKeyGroupInt32[] = { AMEDIAFORMAT_KEY_DISPLAY_HEIGHT, AMEDIAFORMAT_KEY_DISPLAY_WIDTH, AMEDIAFORMAT_KEY_TEMPORAL_LAYER_ID, AMEDIAFORMAT_KEY_TILE_HEIGHT, AMEDIAFORMAT_KEY_TILE_WIDTH, AMEDIAFORMAT_KEY_TRACK_INDEX, }; Loading Loading
camera/ndk/include/camera/NdkCameraMetadataTags.h +47 −43 Original line number Diff line number Diff line Loading @@ -2257,7 +2257,7 @@ typedef enum acamera_metadata_tag { * from the main sensor along the +X axis (to the right from the user's perspective) will * report <code>(0.03, 0, 0)</code>.</p> * <p>To transform a pixel coordinates between two cameras facing the same direction, first * the source camera ACAMERA_LENS_RADIAL_DISTORTION must be corrected for. Then the source * the source camera ACAMERA_LENS_DISTORTION must be corrected for. Then the source * camera ACAMERA_LENS_INTRINSIC_CALIBRATION needs to be applied, followed by the * ACAMERA_LENS_POSE_ROTATION of the source camera, the translation of the source camera * relative to the destination camera, the ACAMERA_LENS_POSE_ROTATION of the destination Loading @@ -2269,10 +2269,10 @@ typedef enum acamera_metadata_tag { * <p>When ACAMERA_LENS_POSE_REFERENCE is GYROSCOPE, then this position is relative to * the center of the primary gyroscope on the device.</p> * * @see ACAMERA_LENS_DISTORTION * @see ACAMERA_LENS_INTRINSIC_CALIBRATION * @see ACAMERA_LENS_POSE_REFERENCE * @see ACAMERA_LENS_POSE_ROTATION * @see ACAMERA_LENS_RADIAL_DISTORTION */ ACAMERA_LENS_POSE_TRANSLATION = // float[3] ACAMERA_LENS_START + 7, Loading Loading @@ -2382,7 +2382,7 @@ typedef enum acamera_metadata_tag { * where <code>(0,0)</code> is the top-left of the * preCorrectionActiveArraySize rectangle. Once the pose and * intrinsic calibration transforms have been applied to a * world point, then the ACAMERA_LENS_RADIAL_DISTORTION * world point, then the ACAMERA_LENS_DISTORTION * transform needs to be applied, and the result adjusted to * be in the ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE coordinate * system (where <code>(0, 0)</code> is the top-left of the Loading @@ -2390,19 +2390,42 @@ typedef enum acamera_metadata_tag { * coordinate of the world point for processed (non-RAW) * output buffers.</p> * * @see ACAMERA_LENS_DISTORTION * @see ACAMERA_LENS_POSE_ROTATION * @see ACAMERA_LENS_POSE_TRANSLATION * @see ACAMERA_LENS_RADIAL_DISTORTION * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE */ ACAMERA_LENS_INTRINSIC_CALIBRATION = // float[5] ACAMERA_LENS_START + 10, ACAMERA_LENS_RADIAL_DISTORTION = // Deprecated! DO NOT USE ACAMERA_LENS_START + 11, /** * <p>The origin for ACAMERA_LENS_POSE_TRANSLATION.</p> * * @see ACAMERA_LENS_POSE_TRANSLATION * * <p>Type: byte (acamera_metadata_enum_android_lens_pose_reference_t)</p> * * <p>This tag may appear in: * <ul> * <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li> * </ul></p> * * <p>Different calibration methods and use cases can produce better or worse results * depending on the selected coordinate origin.</p> */ ACAMERA_LENS_POSE_REFERENCE = // byte (acamera_metadata_enum_android_lens_pose_reference_t) ACAMERA_LENS_START + 12, /** * <p>The correction coefficients to correct for this camera device's * radial and tangential lens distortion.</p> * <p>Replaces the deprecated ACAMERA_LENS_RADIAL_DISTORTION field, which was * inconsistently defined.</p> * * @see ACAMERA_LENS_RADIAL_DISTORTION * * <p>Type: float[6]</p> * <p>Type: float[5]</p> * * <p>This tag may appear in: * <ul> Loading @@ -2410,13 +2433,13 @@ typedef enum acamera_metadata_tag { * <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li> * </ul></p> * * <p>Four radial distortion coefficients <code>[kappa_0, kappa_1, kappa_2, * <p>Three radial distortion coefficients <code>[kappa_1, kappa_2, * kappa_3]</code> and two tangential distortion coefficients * <code>[kappa_4, kappa_5]</code> that can be used to correct the * lens's geometric distortion with the mapping equations:</p> * <pre><code> x_c = x_i * ( kappa_0 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) + * <pre><code> x_c = x_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) + * kappa_4 * (2 * x_i * y_i) + kappa_5 * ( r^2 + 2 * x_i^2 ) * y_c = y_i * ( kappa_0 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) + * y_c = y_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) + * kappa_5 * (2 * x_i * y_i) + kappa_4 * ( r^2 + 2 * y_i^2 ) * </code></pre> * <p>Here, <code>[x_c, y_c]</code> are the coordinates to sample in the Loading @@ -2424,40 +2447,21 @@ typedef enum acamera_metadata_tag { * corrected image at the coordinate <code>[x_i, y_i]</code>:</p> * <pre><code> correctedImage(x_i, y_i) = sample_at(x_c, y_c, inputImage) * </code></pre> * <p>The pixel coordinates are defined in a normalized * coordinate system related to the * ACAMERA_LENS_INTRINSIC_CALIBRATION calibration fields. * Both <code>[x_i, y_i]</code> and <code>[x_c, y_c]</code> have <code>(0,0)</code> at the * lens optical center <code>[c_x, c_y]</code>. The maximum magnitudes * of both x and y coordinates are normalized to be 1 at the * edge further from the optical center, so the range * for both dimensions is <code>-1 <= x <= 1</code>.</p> * <p>The pixel coordinates are defined in a coordinate system * related to the ACAMERA_LENS_INTRINSIC_CALIBRATION * calibration fields; see that entry for details of the mapping stages. * Both <code>[x_i, y_i]</code> and <code>[x_c, y_c]</code> * have <code>(0,0)</code> at the lens optical center <code>[c_x, c_y]</code>, and * the range of the coordinates depends on the focal length * terms of the intrinsic calibration.</p> * <p>Finally, <code>r</code> represents the radial distance from the * optical center, <code>r^2 = x_i^2 + y_i^2</code>, and its magnitude * is therefore no larger than <code>|r| <= sqrt(2)</code>.</p> * optical center, <code>r^2 = x_i^2 + y_i^2</code>.</p> * <p>The distortion model used is the Brown-Conrady model.</p> * * @see ACAMERA_LENS_INTRINSIC_CALIBRATION */ ACAMERA_LENS_RADIAL_DISTORTION = // float[6] ACAMERA_LENS_START + 11, /** * <p>The origin for ACAMERA_LENS_POSE_TRANSLATION.</p> * * @see ACAMERA_LENS_POSE_TRANSLATION * * <p>Type: byte (acamera_metadata_enum_android_lens_pose_reference_t)</p> * * <p>This tag may appear in: * <ul> * <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li> * </ul></p> * * <p>Different calibration methods and use cases can produce better or worse results * depending on the selected coordinate origin.</p> */ ACAMERA_LENS_POSE_REFERENCE = // byte (acamera_metadata_enum_android_lens_pose_reference_t) ACAMERA_LENS_START + 12, ACAMERA_LENS_DISTORTION = // float[5] ACAMERA_LENS_START + 13, ACAMERA_LENS_END, /** Loading Loading @@ -4212,7 +4216,7 @@ typedef enum acamera_metadata_tag { * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.</p> * <p>The currently supported fields that correct for geometric distortion are:</p> * <ol> * <li>ACAMERA_LENS_RADIAL_DISTORTION.</li> * <li>ACAMERA_LENS_DISTORTION.</li> * </ol> * <p>If all of the geometric distortion fields are no-ops, this rectangle will be the same * as the post-distortion-corrected rectangle given in Loading @@ -4224,7 +4228,7 @@ typedef enum acamera_metadata_tag { * full array may include black calibration pixels or other inactive regions.</p> * <p>The data representation is <code>int[4]</code>, which maps to <code>(left, top, width, height)</code>.</p> * * @see ACAMERA_LENS_RADIAL_DISTORTION * @see ACAMERA_LENS_DISTORTION * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE * @see ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE Loading Loading @@ -6941,7 +6945,7 @@ typedef enum acamera_metadata_enum_acamera_request_available_capabilities { * <li>ACAMERA_LENS_POSE_TRANSLATION</li> * <li>ACAMERA_LENS_POSE_ROTATION</li> * <li>ACAMERA_LENS_INTRINSIC_CALIBRATION</li> * <li>ACAMERA_LENS_RADIAL_DISTORTION</li> * <li>ACAMERA_LENS_DISTORTION</li> * </ul> * </li> * <li>The ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE entry is listed by this device.</li> Loading @@ -6959,12 +6963,12 @@ typedef enum acamera_metadata_enum_acamera_request_available_capabilities { * rate, including depth stall time.</p> * * @see ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE * @see ACAMERA_LENS_DISTORTION * @see ACAMERA_LENS_FACING * @see ACAMERA_LENS_INTRINSIC_CALIBRATION * @see ACAMERA_LENS_POSE_REFERENCE * @see ACAMERA_LENS_POSE_ROTATION * @see ACAMERA_LENS_POSE_TRANSLATION * @see ACAMERA_LENS_RADIAL_DISTORTION */ ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT = 8, Loading Loading @@ -6994,7 +6998,7 @@ typedef enum acamera_metadata_enum_acamera_request_available_capabilities { * <li>ACAMERA_LENS_POSE_ROTATION</li> * <li>ACAMERA_LENS_POSE_TRANSLATION</li> * <li>ACAMERA_LENS_INTRINSIC_CALIBRATION</li> * <li>ACAMERA_LENS_RADIAL_DISTORTION</li> * <li>ACAMERA_LENS_DISTORTION</li> * </ul> * </li> * <li>The SENSOR_INFO_TIMESTAMP_SOURCE of the logical device and physical devices must be Loading @@ -7020,11 +7024,11 @@ typedef enum acamera_metadata_enum_acamera_request_available_capabilities { * not slow down the frame rate of the capture, as long as the minimum frame duration * of the physical and logical streams are the same.</p> * * @see ACAMERA_LENS_DISTORTION * @see ACAMERA_LENS_INTRINSIC_CALIBRATION * @see ACAMERA_LENS_POSE_REFERENCE * @see ACAMERA_LENS_POSE_ROTATION * @see ACAMERA_LENS_POSE_TRANSLATION * @see ACAMERA_LENS_RADIAL_DISTORTION * @see ACAMERA_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE */ ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA = 11, Loading
drm/mediadrm/plugins/clearkey/hidl/DrmPlugin.cpp +131 −2 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include <utils/Log.h> #include <stdio.h> #include <inttypes.h> #include "DrmPlugin.h" #include "ClearKeyDrmProperties.h" Loading @@ -26,6 +27,7 @@ #include "TypeConvert.h" namespace { const int kSecureStopIdStart = 100; const std::string kStreaming("Streaming"); const std::string kOffline("Offline"); const std::string kTrue("True"); Loading @@ -36,7 +38,18 @@ const std::string kQueryKeyPlayAllowed("PlayAllowed"); // Value: "True" or "False" const std::string kQueryKeyRenewAllowed("RenewAllowed"); // Value: "True" or "False" }; const int kSecureStopIdSize = 10; std::vector<uint8_t> uint32ToVector(uint32_t value) { // 10 bytes to display max value 4294967295 + one byte null terminator char buffer[kSecureStopIdSize]; memset(buffer, 0, kSecureStopIdSize); snprintf(buffer, kSecureStopIdSize, "%" PRIu32, value); return std::vector<uint8_t>(buffer, buffer + sizeof(buffer)); } }; // unnamed namespace namespace android { namespace hardware { Loading @@ -48,9 +61,11 @@ DrmPlugin::DrmPlugin(SessionLibrary* sessionLibrary) : mSessionLibrary(sessionLibrary), mOpenSessionOkCount(0), mCloseSessionOkCount(0), mCloseSessionNotOpenedCount(0) { mCloseSessionNotOpenedCount(0), mNextSecureStopId(kSecureStopIdStart) { mPlayPolicy.clear(); initProperties(); mSecureStops.clear(); } void DrmPlugin::initProperties() { Loading @@ -73,6 +88,18 @@ void DrmPlugin::initProperties() { mByteArrayProperties[kMetricsKey] = valueVector; } // The secure stop in ClearKey implementation is not installed securely. // This function merely creates a test environment for testing secure stops APIs. // The content in this secure stop is implementation dependent, the clearkey // secureStop does not serve as a reference implementation. void DrmPlugin::installSecureStop(const hidl_vec<uint8_t>& sessionId) { ClearkeySecureStop clearkeySecureStop; clearkeySecureStop.id = uint32ToVector(++mNextSecureStopId); clearkeySecureStop.data.assign(sessionId.begin(), sessionId.end()); mSecureStops.insert(std::pair<std::vector<uint8_t>, ClearkeySecureStop>( clearkeySecureStop.id, clearkeySecureStop)); } Return<void> DrmPlugin::openSession(openSession_cb _hidl_cb) { sp<Session> session = mSessionLibrary->createSession(); Loading Loading @@ -209,6 +236,7 @@ Return<void> DrmPlugin::provideKeyResponse( _hidl_cb(Status::BAD_VALUE, hidl_vec<uint8_t>()); return Void(); } sp<Session> session = mSessionLibrary->findSession(toVector(scope)); if (!session.get()) { _hidl_cb(Status::ERROR_DRM_SESSION_NOT_OPENED, hidl_vec<uint8_t>()); Loading @@ -224,6 +252,8 @@ Return<void> DrmPlugin::provideKeyResponse( keySetId.clear(); } installSecureStop(scope); // Returns status and empty keySetId _hidl_cb(status, toHidlVec(keySetId)); return Void(); Loading Loading @@ -435,7 +465,106 @@ Return<void> DrmPlugin::getMetrics(getMetrics_cb _hidl_cb) { return Void(); } Return<void> DrmPlugin::getSecureStops(getSecureStops_cb _hidl_cb) { std::vector<SecureStop> stops; for (auto itr = mSecureStops.begin(); itr != mSecureStops.end(); ++itr) { ClearkeySecureStop clearkeyStop = itr->second; std::vector<uint8_t> stopVec; stopVec.insert(stopVec.end(), clearkeyStop.id.begin(), clearkeyStop.id.end()); stopVec.insert(stopVec.end(), clearkeyStop.data.begin(), clearkeyStop.data.end()); SecureStop stop; stop.opaqueData = toHidlVec(stopVec); stops.push_back(stop); } _hidl_cb(Status::OK, stops); return Void(); } Return<void> DrmPlugin::getSecureStop(const hidl_vec<uint8_t>& secureStopId, getSecureStop_cb _hidl_cb) { SecureStop stop; auto itr = mSecureStops.find(toVector(secureStopId)); if (itr != mSecureStops.end()) { ClearkeySecureStop clearkeyStop = itr->second; std::vector<uint8_t> stopVec; stopVec.insert(stopVec.end(), clearkeyStop.id.begin(), clearkeyStop.id.end()); stopVec.insert(stopVec.end(), clearkeyStop.data.begin(), clearkeyStop.data.end()); stop.opaqueData = toHidlVec(stopVec); _hidl_cb(Status::OK, stop); } else { _hidl_cb(Status::BAD_VALUE, stop); } return Void(); } Return<Status> DrmPlugin::releaseSecureStop(const hidl_vec<uint8_t>& secureStopId) { return removeSecureStop(secureStopId); } Return<Status> DrmPlugin::releaseAllSecureStops() { return removeAllSecureStops(); } Return<void> DrmPlugin::getSecureStopIds(getSecureStopIds_cb _hidl_cb) { std::vector<SecureStopId> ids; for (auto itr = mSecureStops.begin(); itr != mSecureStops.end(); ++itr) { ids.push_back(itr->first); } _hidl_cb(Status::OK, toHidlVec(ids)); return Void(); } Return<Status> DrmPlugin::releaseSecureStops(const SecureStopRelease& ssRelease) { if (ssRelease.opaqueData.size() == 0) { return Status::BAD_VALUE; } Status status = Status::OK; std::vector<uint8_t> input = toVector(ssRelease.opaqueData); // The format of opaqueData is shared between the server // and the drm service. The clearkey implementation consists of: // count - number of secure stops // list of fixed length secure stops size_t countBufferSize = sizeof(uint32_t); uint32_t count = 0; sscanf(reinterpret_cast<char*>(input.data()), "%04" PRIu32, &count); // Avoid divide by 0 below. if (count == 0) { return Status::BAD_VALUE; } size_t secureStopSize = (input.size() - countBufferSize) / count; uint8_t buffer[secureStopSize]; size_t offset = countBufferSize; // skip the count for (size_t i = 0; i < count; ++i, offset += secureStopSize) { memcpy(buffer, input.data() + offset, secureStopSize); std::vector<uint8_t> id(buffer, buffer + kSecureStopIdSize); status = removeSecureStop(toHidlVec(id)); if (Status::OK != status) break; } return status; } Return<Status> DrmPlugin::removeSecureStop(const hidl_vec<uint8_t>& secureStopId) { if (1 != mSecureStops.erase(toVector(secureStopId))) { return Status::BAD_VALUE; } return Status::OK; } Return<Status> DrmPlugin::removeAllSecureStops() { mSecureStops.clear(); mNextSecureStopId = kSecureStopIdStart; return Status::OK; } } // namespace clearkey } // namespace V1_1 Loading
drm/mediadrm/plugins/clearkey/hidl/include/DrmPlugin.h +25 −48 Original line number Diff line number Diff line Loading @@ -17,9 +17,11 @@ #ifndef CLEARKEY_DRM_PLUGIN_H_ #define CLEARKEY_DRM_PLUGIN_H_ #include <android/hardware/drm/1.1/IDrmPlugin.h> #include <stdio.h> #include <map> #include "SessionLibrary.h" #include "Utils.h" Loading @@ -36,6 +38,7 @@ using ::android::hardware::drm::V1_0::KeyType; using ::android::hardware::drm::V1_0::KeyValue; using ::android::hardware::drm::V1_0::SecureStop; using ::android::hardware::drm::V1_0::SecureStopId; using ::android::hardware::drm::V1_0::SessionId; using ::android::hardware::drm::V1_0::Status; using ::android::hardware::drm::V1_1::DrmMetricGroup; using ::android::hardware::drm::V1_1::IDrmPlugin; Loading Loading @@ -124,34 +127,6 @@ struct DrmPlugin : public IDrmPlugin { return Void(); } Return<void> getSecureStops(getSecureStops_cb _hidl_cb) { _hidl_cb(Status::ERROR_DRM_CANNOT_HANDLE, hidl_vec<SecureStop>()); return Void(); } Return<void> getSecureStop( const hidl_vec<uint8_t>& secureStopId, getSecureStop_cb _hidl_cb) { if (secureStopId.size() == 0) { _hidl_cb(Status::BAD_VALUE, SecureStop()); return Void(); } _hidl_cb(Status::ERROR_DRM_CANNOT_HANDLE, SecureStop()); return Void(); } Return<Status> releaseSecureStop(const hidl_vec<uint8_t>& ssRelease) { if (ssRelease.size() == 0) { return Status::BAD_VALUE; } return Status::ERROR_DRM_CANNOT_HANDLE; } Return<Status> releaseAllSecureStops() { return Status::ERROR_DRM_CANNOT_HANDLE; } Return<void> getHdcpLevels(getHdcpLevels_cb _hidl_cb) { HdcpLevel connectedLevel = HdcpLevel::HDCP_NONE; HdcpLevel maxLevel = HdcpLevel::HDCP_NO_OUTPUT; Loading Loading @@ -305,31 +280,26 @@ struct DrmPlugin : public IDrmPlugin { return Void(); } Return<void> getSecureStopIds(getSecureStopIds_cb _hidl_cb) { _hidl_cb(Status::ERROR_DRM_CANNOT_HANDLE, hidl_vec<SecureStopId>()); return Void(); } Return<void> getSecureStops(getSecureStops_cb _hidl_cb); Return<Status> releaseSecureStops(const SecureStopRelease& ssRelease) { if (ssRelease.opaqueData.size() == 0) { return Status::BAD_VALUE; } return Status::ERROR_DRM_CANNOT_HANDLE; } Return<void> getSecureStop(const hidl_vec<uint8_t>& secureStopId, getSecureStop_cb _hidl_cb); Return<Status> removeSecureStop(const hidl_vec<uint8_t>& secureStopId) { if (secureStopId.size() == 0) { return Status::BAD_VALUE; } return Status::ERROR_DRM_CANNOT_HANDLE; } Return<Status> releaseSecureStop(const hidl_vec<uint8_t>& ssRelease); Return<Status> removeAllSecureStops() { return Status::ERROR_DRM_CANNOT_HANDLE; } Return<Status> releaseAllSecureStops(); Return<void> getSecureStopIds(getSecureStopIds_cb _hidl_cb); Return<Status> releaseSecureStops(const SecureStopRelease& ssRelease); Return<Status> removeSecureStop(const hidl_vec<uint8_t>& secureStopId); Return<Status> removeAllSecureStops(); private: void initProperties(); void installSecureStop(const hidl_vec<uint8_t>& sessionId); void setPlayPolicy(); Return<Status> setSecurityLevel(const hidl_vec<uint8_t>& sessionId, Loading @@ -344,6 +314,12 @@ private: KeyRequestType *getKeyRequestType, std::string *defaultUrl); struct ClearkeySecureStop { std::vector<uint8_t> id; std::vector<uint8_t> data; }; std::map<std::vector<uint8_t>, ClearkeySecureStop> mSecureStops; std::vector<KeyValue> mPlayPolicy; std::map<std::string, std::string> mStringProperties; std::map<std::string, std::vector<uint8_t> > mByteArrayProperties; Loading @@ -353,6 +329,7 @@ private: int64_t mOpenSessionOkCount; int64_t mCloseSessionOkCount; int64_t mCloseSessionNotOpenedCount; uint32_t mNextSecureStopId; CLEARKEY_DISALLOW_COPY_AND_ASSIGN_AND_NEW(DrmPlugin); }; Loading
media/extractors/mp4/ItemTable.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -1471,8 +1471,8 @@ sp<MetaData> ItemTable::getImageMeta(const uint32_t imageIndex) { // point image to the first tile for grid size and HVCC image = &mItemIdToItemMap.editValueAt(tileItemIndex); meta->setInt32(kKeyGridWidth, image->width); meta->setInt32(kKeyGridHeight, image->height); meta->setInt32(kKeyTileWidth, image->width); meta->setInt32(kKeyTileHeight, image->height); meta->setInt32(kKeyMaxInputSize, image->width * image->height * 1.5); } Loading
media/libmedia/NdkWrapper.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -56,10 +56,8 @@ static const char *AMediaFormatKeyGroupInt32[] = { AMEDIAFORMAT_KEY_COLOR_TRANSFER, AMEDIAFORMAT_KEY_COMPLEXITY, AMEDIAFORMAT_KEY_FLAC_COMPRESSION_LEVEL, AMEDIAFORMAT_KEY_GRID_COLS, AMEDIAFORMAT_KEY_GRID_HEIGHT, AMEDIAFORMAT_KEY_GRID_COLUMNS, AMEDIAFORMAT_KEY_GRID_ROWS, AMEDIAFORMAT_KEY_GRID_WIDTH, AMEDIAFORMAT_KEY_HEIGHT, AMEDIAFORMAT_KEY_INTRA_REFRESH_PERIOD, AMEDIAFORMAT_KEY_IS_ADTS, Loading @@ -84,6 +82,8 @@ static const char *AMediaFormatKeyGroupInt32[] = { AMEDIAFORMAT_KEY_DISPLAY_HEIGHT, AMEDIAFORMAT_KEY_DISPLAY_WIDTH, AMEDIAFORMAT_KEY_TEMPORAL_LAYER_ID, AMEDIAFORMAT_KEY_TILE_HEIGHT, AMEDIAFORMAT_KEY_TILE_WIDTH, AMEDIAFORMAT_KEY_TRACK_INDEX, }; Loading