blob: ab714cfef60f6a235d307e973721983a62df4bee [file] [log] [blame]
Roman Stratiienko1cbaaf92022-02-21 10:52:18 +02001/*
2 * Copyright (C) 2022 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#pragma once
18
19#include <cstdint>
20
21constexpr int kBufferMaxPlanes = 4;
22
23struct BufferInfo {
24 uint32_t width;
25 uint32_t height;
26 uint32_t format; /* DRM_FORMAT_* from drm_fourcc.h */
27 uint32_t pitches[kBufferMaxPlanes];
28 uint32_t offsets[kBufferMaxPlanes];
29 /* sizes[] is used only by mapper@4 metadata getter for internal purposes */
30 uint32_t sizes[kBufferMaxPlanes];
31 int prime_fds[kBufferMaxPlanes];
32 uint64_t modifiers[kBufferMaxPlanes];
33};