1 /* 2 * Copyright (c) 2021 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 /** 17 * @file video_key_info.h 18 * 19 * @brief Declares the key-value pairs used to record key information of a video frame. 20 * 21 * @since 1.0 22 * @version 1.0 23 */ 24 25 #ifndef VIDEO_KEY_INFO_H 26 #define VIDEO_KEY_INFO_H 27 28 #include <string> 29 30 namespace OHOS::Camera { 31 /** 32 * @brief Indicates the data length. The value type is int32_t. 33 */ 34 const std::string dataSize = "dataSize"; 35 const int32_t VIDEO_KEY_INFO_DATA_SIZE = 0x01; 36 37 /** 38 * @brief Indicates the timestamp, in nanoseconds. The value type is int64_t. 39 */ 40 const std::string timeStamp = "timeStamp"; 41 const int32_t VIDEO_KEY_INFO_TIMESTAMP = 0x02; 42 43 /** 44 * @brief Specifies whether the frame is a key frame. 45 * The value type is int32_t. The value <b>1</b> means that the frame is a key frame, and <b>0</b> means the opposite. 46 */ 47 const std::string isKeyFrame = "isKeyFrame"; 48 const int32_t VIDEO_KEY_INFO_IS_KEY_FRAME = 0x03; 49 50 /** 51 * @brief Indicates the stream id corresponding to the image data. The value type is int32_t. 52 */ 53 const std::string streamId = "streamId"; 54 const int32_t VIDEO_KEY_STREAM_ID = 0x04; 55 56 /** 57 * @brief Indicates the capture id corresponding to the image data. The value type is int32_t. 58 */ 59 const std::string captureId = "captureId"; 60 const int32_t VIDEO_KEY_CAPTRUE_ID = 0x05; 61 } // end namespace OHOS::Camera 62 #endif 63