1 /* 2 * Copyright (C) 2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef FRAMEWORKS_SERVICES_THUMBNAIL_SERVICE_INCLUDE_THUMBNAIL_CONST_H_ 17 #define FRAMEWORKS_SERVICES_THUMBNAIL_SERVICE_INCLUDE_THUMBNAIL_CONST_H_ 18 19 #include "medialibrary_db_const.h" 20 21 namespace OHOS { 22 namespace Media { 23 constexpr int32_t DEFAULT_THUMBNAIL_SIZE = 256; 24 constexpr int32_t DEFAULT_LCD_SIZE = 1080; 25 constexpr int32_t FULL_SCREEN_SIZE = 1920; 26 27 constexpr uint32_t DEVICE_UDID_LENGTH = 65; 28 29 constexpr int32_t THUMBNAIL_LCD_GENERATE_THRESHOLD = 2000; 30 constexpr int32_t THUMBNAIL_LCD_AGING_THRESHOLD = 4000; 31 constexpr int32_t WAIT_FOR_MS = 1000; 32 constexpr int32_t WAIT_FOR_SECOND = 3; 33 34 const std::string THUMBNAIL_END_SUFFIX = "_THU"; 35 const std::string THUMBNAIL_LCD_END_SUFFIX = "_LCD"; 36 const std::string FILE_URI_PREX = "file://"; 37 38 const std::string THUMBNAIL_FORMAT = "image/jpeg"; 39 constexpr uint8_t THUMBNAIL_QUALITY = 80; 40 constexpr uint32_t THUMBNAIL_QUERY_MAX = 2000; 41 constexpr int64_t AV_FRAME_TIME = 0; 42 43 constexpr uint8_t NUMBER_HINT_1 = 1; 44 45 const std::string THUMBNAIL_OPERN_KEYWORD = "operation"; 46 const std::string THUMBNAIL_HEIGHT = "height"; 47 const std::string THUMBNAIL_WIDTH = "width"; 48 } // namespace Media 49 } // namespace OHOS 50 51 #endif // FRAMEWORKS_SERVICES_THUMBNAIL_SERVICE_INCLUDE_THUMBNAIL_CONST_H_ 52