summaryrefslogtreecommitdiff
path: root/chromium/media/capture/video/blob_utils.h
blob: 2f715358639ad055d2e9d5885f84ec6e4eccafee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright 2016 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 MEDIA_CAPTURE_VIDEO_BLOB_UTILS_H_
#define MEDIA_CAPTURE_VIDEO_BLOB_UTILS_H_

#include "media/capture/mojo/image_capture.mojom.h"

namespace media {

struct VideoCaptureFormat;

// Helper method to create a mojom::Blob out of |buffer|, whose pixel format and
// resolution are taken from |capture_format|. Returns a null BlobPtr in case of
// error.
mojom::BlobPtr Blobify(const uint8_t* buffer,
                       const uint32_t bytesused,
                       const VideoCaptureFormat& capture_format);

}  // namespace media

#endif  // MEDIA_CAPTURE_VIDEO_BLOB_UTILS_H_