| Index: media/capture/video/video_capture_utils.cc
|
| diff --git a/media/capture/video/blob_utils.cc b/media/capture/video/video_capture_utils.cc
|
| similarity index 80%
|
| rename from media/capture/video/blob_utils.cc
|
| rename to media/capture/video/video_capture_utils.cc
|
| index 54b622476c32055611c614c8c9960e8ed75faa23..9633a4be08fbc3b0dc1f47cf88e3d883e0fe4715 100644
|
| --- a/media/capture/video/blob_utils.cc
|
| +++ b/media/capture/video/video_capture_utils.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "media/capture/video/blob_utils.h"
|
| +#include "media/capture/video/video_capture_utils.h"
|
|
|
| #include "media/base/video_capture_types.h"
|
| #include "media/base/video_frame.h"
|
| @@ -10,8 +10,17 @@
|
| #include "third_party/skia/include/core/SkImage.h"
|
| #include "ui/gfx/codec/png_codec.h"
|
|
|
| +#define FourCcMacro(f, o, u, r) \
|
| + static_cast<unsigned>((static_cast<unsigned>(f) << 0)) | \
|
| + (static_cast<unsigned>(o) << 8) | (static_cast<unsigned>(u) << 16) | \
|
| + (static_cast<unsigned>(r) << 24)
|
| +
|
| namespace media {
|
|
|
| +static const unsigned kFourCcZ16 = FourCcMacro('Z', '1', '6', ' ');
|
| +static const unsigned kFourCcINVZ = FourCcMacro('I', 'N', 'V', 'Z');
|
| +static const unsigned kFourCcY16 = FourCcMacro('Y', '1', '6', ' ');
|
| +
|
| mojom::BlobPtr Blobify(const uint8_t* buffer,
|
| const uint32_t bytesused,
|
| const VideoCaptureFormat& capture_format) {
|
| @@ -66,4 +75,8 @@ mojom::BlobPtr Blobify(const uint8_t* buffer,
|
| return blob;
|
| }
|
|
|
| +bool IsY16FormatFourCc(unsigned four) {
|
| + return four == kFourCcZ16 || four == kFourCcINVZ || four == kFourCcY16;
|
| +}
|
| +
|
| } // namespace media
|
|
|