summaryrefslogtreecommitdiff
path: root/chromium/components/chromeos_camera/dmabuf_utils.h
blob: f895c0ccf5e0effccda67130712806f5d4074af1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef COMPONENTS_CHROMEOS_CAMERA_DMABUF_UTILS_H_
#define COMPONENTS_CHROMEOS_CAMERA_DMABUF_UTILS_H_

#include <stdint.h>

#include <vector>

#include "base/memory/scoped_refptr.h"
#include "components/chromeos_camera/common/dmabuf.mojom.h"
#include "media/base/video_types.h"
#include "ui/gfx/geometry/size.h"

namespace media {
class VideoFrame;
}

namespace chromeos_camera {

scoped_refptr<media::VideoFrame> ConstructVideoFrame(
    std::vector<mojom::DmaBufPlanePtr> dma_buf_planes,
    media::VideoPixelFormat pixel_format,
    const gfx::Size& coded_size);

}  // namespace chromeos_camera

#endif  // COMPONENTS_CHROMEOS_CAMERA_DMABUF_UTILS_H_