1 /*
2  * Copyright (c) 2024 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 IMAGE_COMMON_H
17 #define IMAGE_COMMON_H
18 #include "v2_0/codec_image_type.h"
19 namespace OHOS {
20 namespace Codec {
21 namespace Image {
22 static const int32_t DATA_BUFFERID = 10;
23 static const int32_t DATA_SIZE = 20;
24 static const int32_t DATA_VERSION_NVERSION = 30;
25 static const int32_t DATA_BUFFERTYPE = 40;
26 static const int32_t DATA_BUFFERLEN = 50;
27 static const int32_t DATA_ALLOCLEN = 60;
28 static const int32_t DATA_FILLEDLEN = 70;
29 static const int32_t DATA_OFFSET = 80;
30 static const int32_t DATA_FENCEFD = 90;
31 static const int32_t DATA_TYPE = 100;
32 static const int32_t DATA_PTS = 200;
33 static const int32_t DATA_FLAG = 300;
34 static const int32_t TESTING_APP_DATA = 33;
35 
FillDataImageBuffer(HDI::Codec::Image::V2_0::CodecImageBuffer & dataFuzz)36 void FillDataImageBuffer(HDI::Codec::Image::V2_0::CodecImageBuffer &dataFuzz)
37 {
38     dataFuzz.id = DATA_BUFFERID;
39     dataFuzz.size = DATA_SIZE;
40     dataFuzz.buffer = nullptr;
41     dataFuzz.fenceFd = -1;
42 }
43 }  // namespace Image
44 }  // namespace Codec
45 }  // namespace OHOS
46 #endif