From 0b7673bf7f1f7ba04e9db43c812b17326eabf13c Mon Sep 17 00:00:00 2001 From: Jiyong Min Date: Tue, 12 Sep 2017 13:25:08 +0900 Subject: [PATCH 01/16] Apply tizen coding rule Change-Id: I808f35cc9231b7fe41b16f3c46d1cee1a6a48148 Signed-off-by: Jiyong Min --- include/metadata_editor_private.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/metadata_editor_private.h b/include/metadata_editor_private.h index 48d558b..4207292 100755 --- a/include/metadata_editor_private.h +++ b/include/metadata_editor_private.h @@ -54,8 +54,7 @@ extern "C" { #endif #define LOG_TAG "CAPI_MEDIA_METADATA_EDITOR" #define META_SAFE_FREE(src) { if (src) {free(src); src = NULL; } } -#define META_MALLOC(src, size) { if (size <= 0) src = NULL; \ - else { src = (char *)malloc(size); if (src) memset(src, 0x0, size); } } +#define META_MALLOC(src, size) { if (size <= 0) { src = NULL; } else { src = (char *)malloc(size); if (src) memset(src, 0x0, size); } } #define META_MAX_BUF_LEN 20 -- 2.7.4 From 7b795050a1ca3bace60959d52d2ce0ea217ff197 Mon Sep 17 00:00:00 2001 From: Minje Ahn Date: Fri, 29 Sep 2017 12:06:35 +0900 Subject: [PATCH 02/16] Reinforce coverage Change-Id: I387ff9ec8c67a0cfc8ec787a81d42a80b33a4168 Signed-off-by: Minje Ahn --- src/metadata_editor.cpp | 46 +++++++++++++++++----------------------------- 1 file changed, 17 insertions(+), 29 deletions(-) diff --git a/src/metadata_editor.cpp b/src/metadata_editor.cpp index 5953d9d..7d4004e 100755 --- a/src/metadata_editor.cpp +++ b/src/metadata_editor.cpp @@ -21,6 +21,7 @@ #include #include #include +#include static int __ID3_getTwixFrameByName(metadata_editor_s* _metadata, TagLib::ID3v1::Tag* tag1, TagLib::ID3v2::Tag* tag2, const char* frameID, char** value); static int __ID3_setTwixFrameByName(metadata_editor_s* _metadata, TagLib::ID3v1::Tag* tag1, TagLib::ID3v2::Tag* tag2, const char* frameID, const char* value); @@ -576,13 +577,10 @@ static int __MP4_getNumberOfPictures(metadata_editor_s* _metadata, char** value) TagLib::MP4::ItemListMap& itemMap = tag->itemListMap(); TagLib::MP4::ItemListMap::ConstIterator it = itemMap.find("covr"); if (it != itemMap.end()) { // Item was found - uint number = it->second.toCoverArtList().size(); // Get the size of CoverList (i.e. number of pictures in file) - metadata_editor_info("There are %u picture(s) in file", number); char buf[META_MAX_BUF_LEN] = {0, }; - snprintf(buf, META_MAX_BUF_LEN, "%u", number); // Convert integer value of size to its c-string representation - int length = strlen(buf); - metadata_editor_retvm_if(length == 0, METADATA_EDITOR_ERROR_NONE, "Empty string"); - *value = strndup(buf, length); + snprintf(buf, META_MAX_BUF_LEN, "%u", it->second.toCoverArtList().size()); // Convert integer value of size to its c-string representation + if (strlen(buf) > 0) + *value = g_strdup(buf); return METADATA_EDITOR_ERROR_NONE; } else { // Item was not found metadata_editor_info("No item in file"); @@ -1398,14 +1396,11 @@ extern "C" int metadata_editor_update_metadata(metadata_editor_h metadata) { if (!tag1 || tag1->isEmpty()) { // If no ID3v1 tag - prevent its creation if (_file->save(TagLib::MPEG::File::ID3v2 | TagLib::MPEG::File::APE)) return METADATA_EDITOR_ERROR_NONE; - else - return METADATA_EDITOR_ERROR_OPERATION_FAILED; } else { // otherwise - save all tags in file if (_file->save(TagLib::MPEG::File::AllTags)) return METADATA_EDITOR_ERROR_NONE; - else - return METADATA_EDITOR_ERROR_OPERATION_FAILED; } + return METADATA_EDITOR_ERROR_OPERATION_FAILED; } case METADATA_EDITOR_FORMAT_MP4: { TagLib::MP4::File* _file = (TagLib::MP4::File*)_metadata->file; @@ -1811,26 +1806,19 @@ extern "C" int metadata_editor_remove_picture(metadata_editor_h metadata, int in metadata_editor_retvm_if(tag2 == NULL, METADATA_EDITOR_ERROR_OPERATION_FAILED, "Error. ID3v2 tag was not created. Can not proceed metadata updating"); TagLib::ID3v2::FrameList lst = tag2->frameListMap()["APIC"]; // Check if there are pictures in the tag - if (lst.isEmpty()) { - metadata_editor_error("No pictures in file"); - return METADATA_EDITOR_ERROR_OPERATION_FAILED; - } else { // pictures exist in file - // Check if index is correct or not - if ((index < 0) || (lst.size() <= (uint)index)) { - metadata_editor_error("Index of picture is out of range"); - return METADATA_EDITOR_ERROR_INVALID_PARAMETER; - } else { // everything is correct - begin extraction - metadata_editor_info("Removing of picture number %d", index); - int i = 0; - // Among all frames we must choose that one with specified index. "i" will be counter - for (TagLib::ID3v2::FrameList::Iterator it = lst.begin(); it != lst.end(); ++it, ++i) { - if (i != index) continue; - tag2->removeFrame(*it); - break; - } - return METADATA_EDITOR_ERROR_NONE; - } + metadata_editor_retvm_if(lst.isEmpty(), METADATA_EDITOR_ERROR_OPERATION_FAILED, "No pictures in file"); + + // Check if index is correct or not + metadata_editor_retvm_if((index < 0) || (lst.size() <= (uint)index), METADATA_EDITOR_ERROR_INVALID_PARAMETER, "Index of picture is out of range"); + metadata_editor_info("Removing of picture number %d", index); + int i = 0; + // Among all frames we must choose that one with specified index. "i" will be counter + for (TagLib::ID3v2::FrameList::Iterator it = lst.begin(); it != lst.end(); ++it, ++i) { + if (i != index) continue; + tag2->removeFrame(*it); + break; } + return METADATA_EDITOR_ERROR_NONE; } case METADATA_EDITOR_FORMAT_MP4: { TagLib::MP4::File* _file = (TagLib::MP4::File*) _metadata->file; -- 2.7.4 From 806db55afc0ce5a88950d96e53e30b0ec295207b Mon Sep 17 00:00:00 2001 From: hj kim Date: Wed, 24 Jan 2018 14:17:03 +0900 Subject: [PATCH 03/16] Fix Doxygen mistakes Change-Id: I5338485c225160dc101280459f4dbb01a631c0b1 --- include/metadata_editor.h | 76 +++++++++++++++---------------- include/metadata_editor_private.h | 6 +-- include/metadata_editor_type.h | 19 +++++--- packaging/capi-media-metadata-editor.spec | 2 +- 4 files changed, 54 insertions(+), 49 deletions(-) diff --git a/include/metadata_editor.h b/include/metadata_editor.h index 07d6a50..d012f1a 100755 --- a/include/metadata_editor.h +++ b/include/metadata_editor.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef __TIZEN_METADATA_EDITOR_H__ -#define __TIZEN_METADATA_EDITOR_H__ +#ifndef __TIZEN_MULTIMEDIA_METADATA_EDITOR_H__ +#define __TIZEN_MULTIMEDIA_METADATA_EDITOR_H__ #include @@ -36,12 +36,12 @@ extern "C" { /** - * @brief Create metadata + * @brief Creates metadata. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * - * @remarks You must release @a metadata using metadata_editor_destroy(). + * @remarks The @a metadata should be released using metadata_editor_destroy(). * - * @param [in] metadata The handle to metadata + * @param[in] metadata The handle to metadata * @return 0 on success, otherwise a negative error value * @retval #METADATA_EDITOR_ERROR_NONE Successful * @retval #METADATA_EDITOR_ERROR_INVALID_PARAMETER Invalid parameter @@ -52,14 +52,14 @@ int metadata_editor_create(metadata_editor_h *metadata); /** - * @brief Set file path to read or write metadata + * @brief Sets file path to read or write metadata. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * * @remarks In case of accessing specific path in internal storage or external storage, you may add the privilege for accessing the path. \n * For example, if you get the specific path by using storage_get_directory(). you should add previlege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. * - * @param [in] metadata The handle to metadata - * @param [in] path path to read or write metadata + * @param[in] metadata The handle to metadata + * @param[in] path path to read or write metadata * @return 0 on success, otherwise a negative error value * @retval #METADATA_EDITOR_ERROR_NONE Successful * @retval #METADATA_EDITOR_ERROR_INVALID_PARAMETER Invalid parameter @@ -74,17 +74,17 @@ int metadata_editor_set_path(metadata_editor_h metadata, const char *path); /** - * @brief Get the metadata corresponding to the attribute. + * @brief Gets the metadata corresponding to the attribute. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * - * @remarks You must release @a value using @c free(). \n + * @remarks The @a value should be released using free(). \n * If the attribute value of the metadata is empty, return value is NULL. \n * In case of accessing specific path in internal storage or external storage, you may add the privilege for accessing the path. \n * For example, if you get the specific path by using storage_get_directory(). you should add previlege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. * - * @param [in] metadata The handle to metadata - * @param [in] attribute key attribute name to get - * @param [out] value The value of the attribute + * @param[in] metadata The handle to metadata + * @param[in] attribute key attribute name to get + * @param[out] value The value of the attribute * @return 0 on success, otherwise a negative error value * @retval #METADATA_EDITOR_ERROR_NONE Successful * @retval #METADATA_EDITOR_ERROR_INVALID_PARAMETER Invalid parameter @@ -98,16 +98,16 @@ int metadata_editor_get_metadata(metadata_editor_h metadata, metadata_editor_att /** - * @brief Set the attribute of the metadata. - * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif + * @brief Sets the attribute of the metadata. * @details This function set the attribute of the metadata for updating the metadata. \n + * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * - * @remarks You must release @a value using @c free(). \n + * @remarks The @a value should be released using free(). \n * You must call metadata_editor_update_metadata() for applying to the metadata of the media file. if not, you will see the existing metadata when you call metadata_editor_get_metadata(). * - * @param [in] metadata The handle to metadata - * @param [in] attribute key attribute name to get - * @param [in] value The value of the attribute + * @param[in] metadata The handle to metadata + * @param[in] attribute key attribute name to get + * @param[in] value The value of the attribute * @return 0 on success, otherwise a negative error value * @retval #METADATA_EDITOR_ERROR_NONE Successful * @retval #METADATA_EDITOR_ERROR_INVALID_PARAMETER Invalid parameter @@ -120,14 +120,14 @@ int metadata_editor_set_metadata(metadata_editor_h metadata, metadata_editor_att /** - * @brief Update the modified metadata - * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif + * @brief Updates the modified metadata. * @details This function update the metadata in the media file that is modified by metadata_editor_set_metadata(). + * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * * @remarks In case of accessing specific path in internal storage or external storage, you may add the privilege for accessing the path. \n * For example, if you get the specific path by using storage_get_directory(). you should add previlege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. * - * @param [in] metadata The handle to metadata + * @param[in] metadata The handle to metadata * @return 0 on success, otherwise a negative error value * @retval #METADATA_EDITOR_ERROR_NONE Successful * @retval #METADATA_EDITOR_ERROR_INVALID_PARAMETER Invalid parameter @@ -140,18 +140,18 @@ int metadata_editor_set_metadata(metadata_editor_h metadata, metadata_editor_att int metadata_editor_update_metadata(metadata_editor_h metadata); /** - * @brief Get the picture in the media file + * @brief Gets the picture in the media file. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * - * @remarks You must release @a picture using @c free(). \n + * @remarks The @a picture abd @a mime_type should be released using free(). \n * In case of accessing specific path in internal storage or external storage, you may add the privilege for accessing the path. \n * For example, if you get the specific path by using storage_get_directory(). you should add previlege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. * - * @param [in] metadata The handle to metadata - * @param [in] index picture order - * @param [out] picture encoded picture - * @param [out] size encoded picture size - * @param [out] mime_type the mime type of picture + * @param[in] metadata The handle to metadata + * @param[in] index picture order + * @param[out] picture encoded picture + * @param[out] size encoded picture size + * @param[out] mime_type the MIME of the picture * @return 0 on success, otherwise a negative error value * @retval #METADATA_EDITOR_ERROR_NONE Successful * @retval #METADATA_EDITOR_ERROR_INVALID_PARAMETER Invalid parameter @@ -164,7 +164,7 @@ int metadata_editor_update_metadata(metadata_editor_h metadata); int metadata_editor_get_picture(metadata_editor_h metadata, int index, void **picture, int *size, char **mime_type); /** - * @brief Append the picture to the media file + * @brief Appends the picture to the media file. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * * @remarks You must call metadata_editor_update_metadata() for applying to the metadata of the media file. if not, you will see the existing metadata when you call metadata_editor_get_metadata(). \n @@ -172,8 +172,8 @@ int metadata_editor_get_picture(metadata_editor_h metadata, int index, void **pi * In case of accessing specific path in internal storage or external storage, you may add the privilege for accessing the path. \n * For example, if you get the specific path by using storage_get_directory(). you should add previlege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. * - * @param [in] metadata The handle to metadata - * @param [in] picture_path The path of picture for adding to the metadata + * @param[in] metadata The handle to metadata + * @param[in] picture_path The path of picture for adding to the metadata * @return 0 on success, otherwise a negative error value * @retval #METADATA_EDITOR_ERROR_NONE Successful * @retval #METADATA_EDITOR_ERROR_INVALID_PARAMETER Invalid parameter @@ -187,13 +187,13 @@ int metadata_editor_get_picture(metadata_editor_h metadata, int index, void **pi int metadata_editor_append_picture(metadata_editor_h metadata, const char *picture_path); /** - * @brief Remove artwork image from media file + * @brief Removes artwork image from media file. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * * @remarks You must call metadata_editor_update_metadata() for applying to the metadata of the media file. if not, you will see the existing metadata when you call metadata_editor_get_metadata(). \n * - * @param [in] metadata The handle to metadata - * @param [in] index artwork image order + * @param[in] metadata The handle to metadata + * @param[in] index artwork image order * @return 0 on success, otherwise a negative error value * @retval #METADATA_EDITOR_ERROR_NONE Successful * @retval #METADATA_EDITOR_ERROR_INVALID_PARAMETER Invalid parameter @@ -206,10 +206,10 @@ int metadata_editor_append_picture(metadata_editor_h metadata, const char *pictu int metadata_editor_remove_picture(metadata_editor_h metadata, int index); /** - * @brief Destroy metadata + * @brief Destroys metadata. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * - * @param [in] metadata The handle to metadata + * @param[in] metadata The handle to metadata * @return 0 on success, otherwise a negative error value * @retval #METADATA_EDITOR_ERROR_NONE Successful * @retval #METADATA_EDITOR_ERROR_INVALID_PARAMETER Invalid parameter @@ -228,4 +228,4 @@ int metadata_editor_destroy(metadata_editor_h metadata); } #endif /* __cplusplus */ -#endif /* __TIZEN_METADATA_EDITOR_H__ */ +#endif /* __TIZEN_MULTIMEDIA_METADATA_EDITOR_H__ */ diff --git a/include/metadata_editor_private.h b/include/metadata_editor_private.h index 4207292..767fdbb 100755 --- a/include/metadata_editor_private.h +++ b/include/metadata_editor_private.h @@ -15,8 +15,8 @@ */ -#ifndef __TIZEN_METADATA_EDITOR_PRIVATE_H__ -#define __TIZEN_METADATA_EDITOR_PRIVATE_H__ +#ifndef __TIZEN_MULTIMEDIA_METADATA_EDITOR_PRIVATE_H__ +#define __TIZEN_MULTIMEDIA_METADATA_EDITOR_PRIVATE_H__ #include #include @@ -96,4 +96,4 @@ typedef struct { #ifdef __cplusplus } #endif /* __cplusplus */ -#endif /*__TIZEN_METADATA_EDITOR_PRIVATE_H__*/ +#endif /*__TIZEN_MULTIMEDIA_METADATA_EDITOR_PRIVATE_H__*/ diff --git a/include/metadata_editor_type.h b/include/metadata_editor_type.h index d7ab918..f1e55ba 100755 --- a/include/metadata_editor_type.h +++ b/include/metadata_editor_type.h @@ -16,8 +16,8 @@ -#ifndef __TIZEN_METADATA_EDITOR_TYPE_H__ -#define __TIZEN_METADATA_EDITOR_TYPE_H__ +#ifndef __TIZEN_MULTIMEDIA_METADATA_EDITOR_TYPE_H__ +#define __TIZEN_MULTIMEDIA_METADATA_EDITOR_TYPE_H__ #include @@ -31,12 +31,17 @@ extern "C" { * @{ */ -/** @brief Definition for Metadata editor Error Class */ + +/** +* @brief Definition for Metadata editor Error Class. +* @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif +* +*/ #define METADATA_EDITOR_ERROR_CLASS TIZEN_ERROR_METADATA_EDITOR /** * @ingroup CAPI_MEDIA_METADATA_EDITOR_MODULE - * @brief The enumerations of media metadata error + * @brief The enumerations of media metadata error. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif */ typedef enum { @@ -52,7 +57,7 @@ typedef enum { /** * @ingroup CAPI_MEDIA_METADATA_EDITOR_MODULE - * @brief The enumerations of attribute + * @brief The enumerations of attribute. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif */ typedef enum { @@ -73,7 +78,7 @@ typedef enum { /** * @ingroup CAPI_MEDIA_METADATA_EDITOR_MODULE - * @brief The handle of media metadata + * @brief The handle of media metadata. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif */ typedef void * metadata_editor_h; @@ -86,4 +91,4 @@ typedef void * metadata_editor_h; } #endif /* __cplusplus */ -#endif /*__TIZEN_METADATA_EDITOR_TYPE_H__*/ +#endif /*__TIZEN_MULTIMEDIA_METADATA_EDITOR_TYPE_H__*/ diff --git a/packaging/capi-media-metadata-editor.spec b/packaging/capi-media-metadata-editor.spec index e69ec87..d55882b 100755 --- a/packaging/capi-media-metadata-editor.spec +++ b/packaging/capi-media-metadata-editor.spec @@ -1,6 +1,6 @@ Name: capi-media-metadata-editor Summary: A metadata editor library in Tizen Native API -Version: 0.1.7 +Version: 0.1.8 Release: 0 Group: Multimedia/API License: Apache-2.0 -- 2.7.4 From 5eeceab6a06be700671c76ea11da4a45e61378d2 Mon Sep 17 00:00:00 2001 From: hj kim Date: Thu, 25 Jan 2018 09:19:30 +0900 Subject: [PATCH 04/16] Fix Doxygen mistakes Change-Id: I2e89f110ab047dd34e1c1ecbd6e6b6b7cb853fad --- include/metadata_editor.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/metadata_editor.h b/include/metadata_editor.h index d012f1a..80d4e4b 100755 --- a/include/metadata_editor.h +++ b/include/metadata_editor.h @@ -191,6 +191,8 @@ int metadata_editor_append_picture(metadata_editor_h metadata, const char *pictu * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * * @remarks You must call metadata_editor_update_metadata() for applying to the metadata of the media file. if not, you will see the existing metadata when you call metadata_editor_get_metadata(). \n + * In case of accessing specific path in internal storage or external storage, you may add the privilege for accessing the path. \n + * For example, if you get the specific path by using storage_get_directory(). you should add previlege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. * * @param[in] metadata The handle to metadata * @param[in] index artwork image order -- 2.7.4 From 36424e29da432f8cde3f147bd8692ba8f4263b14 Mon Sep 17 00:00:00 2001 From: Minje Ahn Date: Mon, 12 Feb 2018 11:31:48 +0900 Subject: [PATCH 05/16] Fix typo Change-Id: I309224042e23271c4ce2142b7f5ec5135219fde5 Signed-off-by: Minje Ahn --- include/metadata_editor.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/metadata_editor.h b/include/metadata_editor.h index 80d4e4b..8e115b5 100755 --- a/include/metadata_editor.h +++ b/include/metadata_editor.h @@ -56,7 +56,7 @@ int metadata_editor_create(metadata_editor_h *metadata); * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * * @remarks In case of accessing specific path in internal storage or external storage, you may add the privilege for accessing the path. \n - * For example, if you get the specific path by using storage_get_directory(). you should add previlege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. + * For example, if you get the specific path by using storage_get_directory(). you should add privilege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. * * @param[in] metadata The handle to metadata * @param[in] path path to read or write metadata @@ -80,7 +80,7 @@ int metadata_editor_set_path(metadata_editor_h metadata, const char *path); * @remarks The @a value should be released using free(). \n * If the attribute value of the metadata is empty, return value is NULL. \n * In case of accessing specific path in internal storage or external storage, you may add the privilege for accessing the path. \n - * For example, if you get the specific path by using storage_get_directory(). you should add previlege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. + * For example, if you get the specific path by using storage_get_directory(). you should add privilege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. * * @param[in] metadata The handle to metadata * @param[in] attribute key attribute name to get @@ -125,7 +125,7 @@ int metadata_editor_set_metadata(metadata_editor_h metadata, metadata_editor_att * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * * @remarks In case of accessing specific path in internal storage or external storage, you may add the privilege for accessing the path. \n - * For example, if you get the specific path by using storage_get_directory(). you should add previlege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. + * For example, if you get the specific path by using storage_get_directory(). you should add privilege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. * * @param[in] metadata The handle to metadata * @return 0 on success, otherwise a negative error value @@ -145,7 +145,7 @@ int metadata_editor_update_metadata(metadata_editor_h metadata); * * @remarks The @a picture abd @a mime_type should be released using free(). \n * In case of accessing specific path in internal storage or external storage, you may add the privilege for accessing the path. \n - * For example, if you get the specific path by using storage_get_directory(). you should add previlege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. + * For example, if you get the specific path by using storage_get_directory(). you should add privilege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. * * @param[in] metadata The handle to metadata * @param[in] index picture order @@ -170,7 +170,7 @@ int metadata_editor_get_picture(metadata_editor_h metadata, int index, void **pi * @remarks You must call metadata_editor_update_metadata() for applying to the metadata of the media file. if not, you will see the existing metadata when you call metadata_editor_get_metadata(). \n * Image type of the metadata supports jpeg and png. \n * In case of accessing specific path in internal storage or external storage, you may add the privilege for accessing the path. \n - * For example, if you get the specific path by using storage_get_directory(). you should add previlege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. + * For example, if you get the specific path by using storage_get_directory(). you should add privilege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. * * @param[in] metadata The handle to metadata * @param[in] picture_path The path of picture for adding to the metadata @@ -192,7 +192,7 @@ int metadata_editor_append_picture(metadata_editor_h metadata, const char *pictu * * @remarks You must call metadata_editor_update_metadata() for applying to the metadata of the media file. if not, you will see the existing metadata when you call metadata_editor_get_metadata(). \n * In case of accessing specific path in internal storage or external storage, you may add the privilege for accessing the path. \n - * For example, if you get the specific path by using storage_get_directory(). you should add previlege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. + * For example, if you get the specific path by using storage_get_directory(). you should add privilege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. * * @param[in] metadata The handle to metadata * @param[in] index artwork image order -- 2.7.4 From 2e4c90aaaf3864e77a0e53e49451b2143abf744a Mon Sep 17 00:00:00 2001 From: Minje Ahn Date: Mon, 5 Mar 2018 14:10:07 +0900 Subject: [PATCH 06/16] Fix typo Change-Id: If06f721dc2c9e13f04cd8e4944b43b72d193d6df Signed-off-by: Minje Ahn --- doc/metadata_editor_doc.h | 2 +- include/metadata_editor.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/metadata_editor_doc.h b/doc/metadata_editor_doc.h index 56f1310..ecb4431 100755 --- a/doc/metadata_editor_doc.h +++ b/doc/metadata_editor_doc.h @@ -37,7 +37,7 @@ * \#include * * @section CAPI_MEDIA_METADATA_EDITOR_OVERVIEW Overview - * The @ref CAPI_MEDIA_METADATA_EDITOR_MODULE API allows you to read the metadata from a media file(#metadata_editor_get_metadata()). To edit a metadata(#metadata_editor_set_metadata()), create/destory the handle(#metadata_editor_create()/#metadata_editor_destroy), and append/ remove a picture in the metadata(#metadata_editor_append_picture()/ #metadata_editor_remove_picture()). + * The @ref CAPI_MEDIA_METADATA_EDITOR_MODULE API allows you to read the metadata from a media file(#metadata_editor_get_metadata()). To edit a metadata(#metadata_editor_set_metadata()), create/destroy the handle(#metadata_editor_create()/#metadata_editor_destroy), and append/ remove a picture in the metadata(#metadata_editor_append_picture()/ #metadata_editor_remove_picture()). */ #endif /* __TIZEN_METADATA_EDITOR_DOC_H__ */ diff --git a/include/metadata_editor.h b/include/metadata_editor.h index 8e115b5..01b8cbc 100755 --- a/include/metadata_editor.h +++ b/include/metadata_editor.h @@ -143,7 +143,7 @@ int metadata_editor_update_metadata(metadata_editor_h metadata); * @brief Gets the picture in the media file. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * - * @remarks The @a picture abd @a mime_type should be released using free(). \n + * @remarks The @a picture and @a mime_type should be released using free(). \n * In case of accessing specific path in internal storage or external storage, you may add the privilege for accessing the path. \n * For example, if you get the specific path by using storage_get_directory(). you should add privilege http://tizen.org/privilege/mediastorage or http://tizen.org/privilege/externalstorage. * -- 2.7.4 From 41d25a71f1c114ef32178235ec4e616233b72cd4 Mon Sep 17 00:00:00 2001 From: hj kim Date: Fri, 23 Mar 2018 09:29:37 +0900 Subject: [PATCH 07/16] Fix Coverity issues Change-Id: I71fb5886972dae84270b701d35eca0176175fb86 --- test/metadata_editor_test.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/metadata_editor_test.c b/test/metadata_editor_test.c index 1f84eb3..6e2bbc6 100755 --- a/test/metadata_editor_test.c +++ b/test/metadata_editor_test.c @@ -366,10 +366,14 @@ static bool __add_picture(metadata_editor_h metadata) static bool __delete_pictures(metadata_editor_h metadata) { + int ret = METADATA_EDITOR_ERROR_NONE; uint num, i; char *picture_index = NULL; - metadata_editor_get_metadata(metadata, METADATA_EDITOR_ATTR_PICTURE_NUM, &picture_index); + ret = metadata_editor_get_metadata(metadata, METADATA_EDITOR_ATTR_PICTURE_NUM, &picture_index); + if (ret != METADATA_EDITOR_ERROR_NONE) + printf("fail to metadata_editor_get_metadata[%d]\n", ret); + printf("The number of pictures is [%s]\n", picture_index); if (picture_index) { -- 2.7.4 From 5216d274a51a3c3abb69d2690267d2bbc11647ab Mon Sep 17 00:00:00 2001 From: hj kim Date: Thu, 21 Jun 2018 14:04:07 +0900 Subject: [PATCH 08/16] Just update api description Change-Id: If122aba54eec100152d2625d008398102a324a5e --- include/metadata_editor.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/metadata_editor.h b/include/metadata_editor.h index 01b8cbc..a4eaddf 100755 --- a/include/metadata_editor.h +++ b/include/metadata_editor.h @@ -45,7 +45,7 @@ extern "C" { * @return 0 on success, otherwise a negative error value * @retval #METADATA_EDITOR_ERROR_NONE Successful * @retval #METADATA_EDITOR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #METADATA_EDITOR_ERROR_OUT_OF_MEMORY Not enough memory is available + * @retval #METADATA_EDITOR_ERROR_OUT_OF_MEMORY Out of memory * @see metadata_editor_destroy() */ int metadata_editor_create(metadata_editor_h *metadata); @@ -88,7 +88,7 @@ int metadata_editor_set_path(metadata_editor_h metadata, const char *path); * @return 0 on success, otherwise a negative error value * @retval #METADATA_EDITOR_ERROR_NONE Successful * @retval #METADATA_EDITOR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #METADATA_EDITOR_ERROR_OUT_OF_MEMORY Not enough memory is available + * @retval #METADATA_EDITOR_ERROR_OUT_OF_MEMORY Out of memory * @retval #METADATA_EDITOR_ERROR_PERMISSION_DENIED Permission denied * @retval #METADATA_EDITOR_ERROR_OPERATION_FAILED Internal Operation Fail * @pre Set path to read or write metadata by calling metadata_editor_set_path() @@ -111,7 +111,7 @@ int metadata_editor_get_metadata(metadata_editor_h metadata, metadata_editor_att * @return 0 on success, otherwise a negative error value * @retval #METADATA_EDITOR_ERROR_NONE Successful * @retval #METADATA_EDITOR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #METADATA_EDITOR_ERROR_OUT_OF_MEMORY Not enough memory is available + * @retval #METADATA_EDITOR_ERROR_OUT_OF_MEMORY Out of memory * @retval #METADATA_EDITOR_ERROR_OPERATION_FAILED Internal Operation Fail * @pre Set path to read or write metadata by calling metadata_editor_set_path() * @see metadata_editor_create(), metadata_editor_update_metadata(), metadata_editor_destroy() @@ -131,7 +131,7 @@ int metadata_editor_set_metadata(metadata_editor_h metadata, metadata_editor_att * @return 0 on success, otherwise a negative error value * @retval #METADATA_EDITOR_ERROR_NONE Successful * @retval #METADATA_EDITOR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #METADATA_EDITOR_ERROR_OUT_OF_MEMORY Not enough memory is available + * @retval #METADATA_EDITOR_ERROR_OUT_OF_MEMORY Out of memory * @retval #METADATA_EDITOR_ERROR_PERMISSION_DENIED Permission denied * @retval #METADATA_EDITOR_ERROR_OPERATION_FAILED Internal Operation Fail * @pre Set path to read or write metadata by calling metadata_editor_set_path() @@ -155,7 +155,7 @@ int metadata_editor_update_metadata(metadata_editor_h metadata); * @return 0 on success, otherwise a negative error value * @retval #METADATA_EDITOR_ERROR_NONE Successful * @retval #METADATA_EDITOR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #METADATA_EDITOR_ERROR_OUT_OF_MEMORY Not enough memory is available + * @retval #METADATA_EDITOR_ERROR_OUT_OF_MEMORY Out of memory * @retval #METADATA_EDITOR_ERROR_OPERATION_FAILED Internal Operation Fail * @retval #METADATA_EDITOR_ERROR_PERMISSION_DENIED Permission denied * @pre Set path to read or write metadata by calling metadata_editor_set_path() @@ -177,7 +177,7 @@ int metadata_editor_get_picture(metadata_editor_h metadata, int index, void **pi * @return 0 on success, otherwise a negative error value * @retval #METADATA_EDITOR_ERROR_NONE Successful * @retval #METADATA_EDITOR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #METADATA_EDITOR_ERROR_OUT_OF_MEMORY Not enough memory is available + * @retval #METADATA_EDITOR_ERROR_OUT_OF_MEMORY Out of memory * @retval #METADATA_EDITOR_ERROR_NOT_SUPPORTED unsupported file type * @retval #METADATA_EDITOR_ERROR_OPERATION_FAILED Internal Operation Fail * @retval #METADATA_EDITOR_ERROR_PERMISSION_DENIED Permission denied @@ -199,7 +199,7 @@ int metadata_editor_append_picture(metadata_editor_h metadata, const char *pictu * @return 0 on success, otherwise a negative error value * @retval #METADATA_EDITOR_ERROR_NONE Successful * @retval #METADATA_EDITOR_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #METADATA_EDITOR_ERROR_OUT_OF_MEMORY Not enough memory is available + * @retval #METADATA_EDITOR_ERROR_OUT_OF_MEMORY Out of memory * @retval #METADATA_EDITOR_ERROR_OPERATION_FAILED Internal Operation Fail * @retval #METADATA_EDITOR_ERROR_PERMISSION_DENIED Permission denied * @pre Set path to read or write metadata by calling metadata_editor_set_path() -- 2.7.4 From b29ca1c5a3d07abf09deadddf84b0405da9dd502 Mon Sep 17 00:00:00 2001 From: SeokHoon Lee Date: Fri, 14 Sep 2018 16:13:56 +0900 Subject: [PATCH 09/16] Add gcov environment Signed-off-by: SeokHoon Lee Change-Id: Ie6879f3d2a8baef1b61e7f53e6acf2030b4ffaf5 --- packaging/capi-media-metadata-editor.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packaging/capi-media-metadata-editor.spec b/packaging/capi-media-metadata-editor.spec index d55882b..a7eed50 100755 --- a/packaging/capi-media-metadata-editor.spec +++ b/packaging/capi-media-metadata-editor.spec @@ -32,6 +32,13 @@ export CFLAGS+=" -Wextra -Wno-array-bounds" export CFLAGS+=" -Wno-ignored-qualifiers -Wno-unused-parameter -Wshadow" export CFLAGS+=" -Wwrite-strings -Wswitch-default" CXXFLAGS=${CXXFLAGS/-fgnu89-inline/} +%if 0%{?gcov:1} +export CFLAGS+=" -fprofile-arcs -ftest-coverage" +export CXXFLAGS+=" -fprofile-arcs -ftest-coverage" +export FFLAGS+=" -fprofile-arcs -ftest-coverage" +export LDFLAGS+=" -lgcov" +%endif + MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` %cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -- 2.7.4 From d5b382415e719972e98fad3e05ee8397036774a0 Mon Sep 17 00:00:00 2001 From: hj kim Date: Wed, 31 Oct 2018 15:09:54 +0900 Subject: [PATCH 10/16] Fix wrong PC_REQUIRED Change-Id: I7314748e4903320bdaa95a15f730223647fd4e15 --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8280500..ec9094c 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,7 @@ SET(service "metadata-editor") # for package file SET(dependents "dlog capi-base-common taglib aul") +SET(pc_dependents "capi-base-common") PROJECT(${fw_name} C CXX) @@ -53,7 +54,7 @@ INSTALL( ) SET(PC_NAME ${fw_name}) -SET(PC_REQUIRED ${dependents}) +SET(PC_REQUIRED ${pc_dependents}) SET(PC_LDFLAGS -l${fw_name}) CONFIGURE_FILE( -- 2.7.4 From 9eb566aa2b101235ac32ea871def35e9409c12ba Mon Sep 17 00:00:00 2001 From: "jiyong.min" Date: Thu, 10 Jan 2019 13:24:30 +0900 Subject: [PATCH 11/16] Fix the log position to avoid errno change. Change-Id: Ia7d81de1f5fa4aa766e3d700497d2cadc314456e --- src/metadata_editor.cpp | 3 ++- test/metadata_editor_test.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/metadata_editor.cpp b/src/metadata_editor.cpp index 7d4004e..7d8379a 100755 --- a/src/metadata_editor.cpp +++ b/src/metadata_editor.cpp @@ -826,10 +826,11 @@ extern "C" int metadata_editor_set_path(metadata_editor_h metadata, const char * /* check the file exits actually */ exist = open(path, O_RDONLY); if(exist < 0) { - metadata_editor_error("Not exist file"); if (errno == EACCES || errno == EPERM) { + metadata_editor_error("Permission denied"); return METADATA_EDITOR_ERROR_PERMISSION_DENIED; } else { + metadata_editor_error("Not exist file"); return METADATA_EDITOR_ERROR_FILE_EXISTS; } } diff --git a/test/metadata_editor_test.c b/test/metadata_editor_test.c index 6e2bbc6..efc780d 100755 --- a/test/metadata_editor_test.c +++ b/test/metadata_editor_test.c @@ -417,7 +417,7 @@ int main(int argc, char *argv[]) /*__printRetValue("metadata_editor_create(...)",ret); */ if (ret != METADATA_EDITOR_ERROR_NONE) { - printf("Fail metadata_editor_create() at line [%d]\n", __LINE__); + printf("Fail metadata_editor_create() [%d]\n", ret); return 0; } @@ -425,7 +425,7 @@ int main(int argc, char *argv[]) /*__printRetValue("metadata_editor_set_path(...)",ret); */ if (ret != METADATA_EDITOR_ERROR_NONE) { - printf("Fail metadata_editor_set_path() at line [%d]\n", __LINE__); + printf("Fail metadata_editor_set_path() [%d]\n", ret); goto exception; } -- 2.7.4 From f97a101efe6fa864af3ccd29874165e28f08c792 Mon Sep 17 00:00:00 2001 From: "jiyong.min" Date: Tue, 29 Jan 2019 09:28:04 +0900 Subject: [PATCH 12/16] Add to check the return of fread() - If an error occurs, the return value is a short item count. Change-Id: I3acb7494ff53f56243ae239b6c1371eb5537478f --- src/metadata_editor.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/metadata_editor.cpp b/src/metadata_editor.cpp index 7d8379a..61034fd 100755 --- a/src/metadata_editor.cpp +++ b/src/metadata_editor.cpp @@ -770,7 +770,7 @@ int __metadata_editor_get_picture_info(const char *path, void **picture, int *si //IF ok.. read file FILE* fin = fopen(path, "rb"); - int file_size = 0; + size_t file_size = 0; if (fin) { while (fgetc(fin) != EOF) @@ -781,7 +781,11 @@ int __metadata_editor_get_picture_info(const char *path, void **picture, int *si memset(picture_buffer, 0, file_size * sizeof(char)); fin = fopen(path, "rb"); if (fin) { - ret = fread(picture_buffer, file_size, 1, fin); + if(file_size != fread(picture_buffer, file_size, 1, fin)) { + metadata_editor_error("fread error"); + fclose(fin); + return METADATA_EDITOR_ERROR_OPERATION_FAILED; + } fclose(fin); } if (*picture == NULL) { -- 2.7.4 From 6f5913629493ce5a2e7b5ea9fe59ce4662f43ea1 Mon Sep 17 00:00:00 2001 From: "jiyong.min" Date: Fri, 1 Feb 2019 08:08:42 +0900 Subject: [PATCH 13/16] Change the value for checking fread() to the number of items Change-Id: I95149c62b7be1b73990830bb0ffa7f10404e16de --- src/metadata_editor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/metadata_editor.cpp b/src/metadata_editor.cpp index 61034fd..92b73b4 100755 --- a/src/metadata_editor.cpp +++ b/src/metadata_editor.cpp @@ -781,7 +781,7 @@ int __metadata_editor_get_picture_info(const char *path, void **picture, int *si memset(picture_buffer, 0, file_size * sizeof(char)); fin = fopen(path, "rb"); if (fin) { - if(file_size != fread(picture_buffer, file_size, 1, fin)) { + if(file_size != fread(picture_buffer, 1, file_size, fin)) { metadata_editor_error("fread error"); fclose(fin); return METADATA_EDITOR_ERROR_OPERATION_FAILED; -- 2.7.4 From 752ca4759fe47ab522b3cb77d8bebfdf7c76509b Mon Sep 17 00:00:00 2001 From: Minje Ahn Date: Tue, 2 Jul 2019 08:29:04 +0900 Subject: [PATCH 14/16] Add for line coverage Change-Id: Ief38a15eb8a0d5ce606b11fc9e5c22353ff2aaa1 Signed-off-by: Minje Ahn --- packaging/capi-media-metadata-editor.spec | 39 ++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/packaging/capi-media-metadata-editor.spec b/packaging/capi-media-metadata-editor.spec index a7eed50..d3625a7 100755 --- a/packaging/capi-media-metadata-editor.spec +++ b/packaging/capi-media-metadata-editor.spec @@ -12,6 +12,10 @@ BuildRequires: pkgconfig(taglib) BuildRequires: pkgconfig(aul) Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig +%if 0%{?gcov:1} +BuildRequires: lcov +BuildRequires: zip +%endif %description A media metadata editor library in Tizen Native API. @@ -24,6 +28,15 @@ Requires: %{name} = %{version}-%{release} %description devel A media metadata editor library in Tizen Native API. (Development files included) +%if 0%{?gcov:1} +%package gcov +Summary: Line Coverage of Metadata Editor library in Tizen C API +Group: Development/Multimedia + +%description gcov +Collection of files related to Line Coverage. It is teseted as gcov for a metadata editor library in Tizen native API +%endif + %prep %setup -q @@ -44,10 +57,29 @@ MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` make %{?jobs:-j%jobs} +%if 0%{?gcov:1} +mkdir -p gcov-obj +find . -name '*.gcno' -exec cp '{}' gcov-obj ';' +%endif + %install rm -rf %{buildroot} %make_install +if 0%{?gcov:1} +mkdir -p %{buildroot}%{_datadir}/gcov/obj +install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj +%endif + +%check +ctest --output-on-failure %{?_smp_mflags} +%if 0%{?gcov:1} +lcov -c --ignore-errors graph --no-external -q -d . -o metadata-editor.info +genhtml metadata-editor.info -o metadata-editor.out +zip -r metadata-editor.zip metadata-editor.out metadata-editor.info +install -m 0644 metadata-editor.zip %{buildroot}%{_datadir}/gcov/ +%endif + %post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -58,4 +90,9 @@ rm -rf %{buildroot} %files devel %{_includedir}/metadata-editor/*.h -%{_libdir}/pkgconfig/capi-media-metadata-editor.pc +%{_libdir}/pkgconfig/capi-media-metadata-editor.pci + +%if 0%{?gcov:1} +%files gcov +%{_datadir}/gcov/obj/* +%endif -- 2.7.4 From 5178d32f388f7872a3b6d5c20f23681c18952903 Mon Sep 17 00:00:00 2001 From: Minje Ahn Date: Tue, 2 Jul 2019 09:27:44 +0900 Subject: [PATCH 15/16] Fix build error Change-Id: I7e5f0b6e080785c32c2dda1bf440ced048aaab3e Signed-off-by: Minje Ahn --- packaging/capi-media-metadata-editor.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/capi-media-metadata-editor.spec b/packaging/capi-media-metadata-editor.spec index d3625a7..81bc1ee 100755 --- a/packaging/capi-media-metadata-editor.spec +++ b/packaging/capi-media-metadata-editor.spec @@ -90,7 +90,7 @@ install -m 0644 metadata-editor.zip %{buildroot}%{_datadir}/gcov/ %files devel %{_includedir}/metadata-editor/*.h -%{_libdir}/pkgconfig/capi-media-metadata-editor.pci +%{_libdir}/pkgconfig/capi-media-metadata-editor.pc %if 0%{?gcov:1} %files gcov -- 2.7.4 From af03f9f54b78bc7630169f85127f03e9a24834f2 Mon Sep 17 00:00:00 2001 From: Minje Ahn Date: Tue, 2 Jul 2019 10:45:02 +0900 Subject: [PATCH 16/16] Remove check for gcov Change-Id: I99fcdd951a0afc327f39606167262e563c20c28c Signed-off-by: Minje Ahn --- packaging/capi-media-metadata-editor.spec | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/packaging/capi-media-metadata-editor.spec b/packaging/capi-media-metadata-editor.spec index 81bc1ee..a1b40b2 100755 --- a/packaging/capi-media-metadata-editor.spec +++ b/packaging/capi-media-metadata-editor.spec @@ -12,10 +12,6 @@ BuildRequires: pkgconfig(taglib) BuildRequires: pkgconfig(aul) Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig -%if 0%{?gcov:1} -BuildRequires: lcov -BuildRequires: zip -%endif %description A media metadata editor library in Tizen Native API. @@ -66,20 +62,11 @@ find . -name '*.gcno' -exec cp '{}' gcov-obj ';' rm -rf %{buildroot} %make_install -if 0%{?gcov:1} +%if 0%{?gcov:1} mkdir -p %{buildroot}%{_datadir}/gcov/obj install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj %endif -%check -ctest --output-on-failure %{?_smp_mflags} -%if 0%{?gcov:1} -lcov -c --ignore-errors graph --no-external -q -d . -o metadata-editor.info -genhtml metadata-editor.info -o metadata-editor.out -zip -r metadata-editor.zip metadata-editor.out metadata-editor.info -install -m 0644 metadata-editor.zip %{buildroot}%{_datadir}/gcov/ -%endif - %post -p /sbin/ldconfig %postun -p /sbin/ldconfig -- 2.7.4