• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 std::string dataWidth = "dataWidth";
36 const std::string dataHeight = "dataHeight";
37 const int32_t VIDEO_KEY_INFO_DATA_SIZE = 0x01;
38 
39 /**
40  * @brief Indicates the timestamp, in nanoseconds. The value type is int64_t.
41  */
42 const std::string timeStamp = "timeStamp";
43 const int32_t VIDEO_KEY_INFO_TIMESTAMP = 0x02;
44 
45 /**
46  * @brief Specifies whether the frame is a key frame.
47  * 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.
48  */
49 const std::string isKeyFrame = "isKeyFrame";
50 const int32_t VIDEO_KEY_INFO_IS_KEY_FRAME = 0x03;
51 
52 /**
53  * @brief Indicates the stream id corresponding to the image data. The value type is int32_t.
54  */
55 const std::string streamId = "streamId";
56 const int32_t VIDEO_KEY_STREAM_ID = 0x04;
57 
58 /**
59  * @brief Indicates the capture id corresponding to the image data. The value type is int32_t.
60  */
61 const std::string captureId = "captureId";
62 const int32_t VIDEO_KEY_CAPTRUE_ID = 0x05;
63 
64 /**
65  * @brief Specifies whether the image is a degraded image. The value type is int32_t.
66  * The value <b>1</b> means that the image is a degraded image, and <b>0</b> means the opposite.
67  */
68 const std::string isDegradedImage = "isDegradedImage";
69 const int32_t VIDEO_KEY_IS_DEGRADED_IMAGE = 0x06;
70 
71 /**
72  * @brief Indicates the image id corresponding to the image data. The value type is int32_t.
73  */
74 const std::string imageId = "imageId";
75 const int32_t VIDEO_KEY_IMAGE_ID = 0x07;
76 
77 /**
78  * @brief Indicates the type of to the deferred processing.
79  * The value type is int32_t. The value <b>1</b> means that breakgound process, and <b>0</b> means offline process.
80  */
81 const std::string deferredProcessingType = "deferredProcessingType";
82 const int32_t VIDEO_KEY_DEFERRED_PROCESSING_TYPE = 0x08;
83 
84 } // end namespace OHOS::Camera
85 #endif
86