Chromium Code Reviews| Index: media/capture/video/blob_utils.h |
| diff --git a/media/capture/video/blob_utils.h b/media/capture/video/blob_utils.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..7ada643cbfa16f45a3455db7a45510bdb900d89a |
| --- /dev/null |
| +++ b/media/capture/video/blob_utils.h |
| @@ -0,0 +1,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/mojo/interfaces/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, |
| + VideoCaptureFormat capture_format); |
|
xianglu
2016/09/20 18:43:03
Consider:
const VideoCaptureFormat& capture_fo
mcasas
2016/09/20 19:51:10
Good one. Done.
|
| + |
| +} // namespace media |
| + |
| +#endif // MEDIA_CAPTURE_VIDEO_BLOB_UTILS_H_ |