• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2021 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef ANDROID_V4L2_CODEC2_PLUGIN_STORE_DMABUF_HELPERS_H
6 #define ANDROID_V4L2_CODEC2_PLUGIN_STORE_DMABUF_HELPERS_H
7 
8 #include <inttypes.h>
9 
10 #include <optional>
11 
12 namespace android {
13 
14 // We use the value of dma-buf inode as the unique ID of the graphic buffers.
15 using unique_id_t = uint32_t;
16 std::optional<unique_id_t> getDmabufId(int dmabufFd);
17 
18 }  // namespace android
19 
20 #endif  // ANDROID_V4L2_CODEC2_PLUGIN_STORE_DMABUF_HELPERS_H
21