dmabuf.mojom 930 B

123456789101112131415161718192021222324252627
  1. // Copyright 2019 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. module chromeos_camera.mojom;
  5. import "media/mojo/mojom/media_types.mojom";
  6. // This structure defines a DMA-buf buffer plane. |fd_handle| holds the DMA-buf
  7. // file descriptor. The layout is specified by |stride|, |offset| and |size|.
  8. struct DmaBufPlane {
  9. handle fd_handle;
  10. int32 stride;
  11. uint32 offset;
  12. uint32 size;
  13. };
  14. // This structure defines a simplified version of media::VideoFrame backed by
  15. // DMA-bufs (see media/base/video_frame.h) for Chrome OS usage. The video frame
  16. // has pixel format |format| and coded size |coded_width|x|coded_height|.
  17. // Per-plane DMA-buf FDs and layouts are defined in |planes|.
  18. struct DmaBufVideoFrame {
  19. media.mojom.VideoPixelFormat format;
  20. uint32 coded_width;
  21. uint32 coded_height;
  22. array<DmaBufPlane> planes;
  23. };