| Index: webkit/media/crypto/decoders/ffmpeg_util.cc
|
| diff --git a/webkit/media/crypto/decoders/ffmpeg_util.cc b/webkit/media/crypto/decoders/ffmpeg_util.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..10e46f35c6e72e5f8143f49826dddb52b8edcf05
|
| --- /dev/null
|
| +++ b/webkit/media/crypto/decoders/ffmpeg_util.cc
|
| @@ -0,0 +1,25 @@
|
| +// Copyright (c) 2012 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.
|
| +
|
| +#include "base/logging.h"
|
| +#include "webkit/media/crypto/decoders/ffmpeg_util.h"
|
| +#include "webkit/media/crypto/ppapi/content_decryption_module.h"
|
| +
|
| +namespace webkit_media {
|
| +
|
| +using cdm::VideoFrame;
|
| +
|
| +VideoFrame::Format PixelFormatToVideoFormat(PixelFormat pixel_format) {
|
| + switch (pixel_format) {
|
| + case PIX_FMT_YUV422P:
|
| + return VideoFrame::YV16;
|
| + case PIX_FMT_YUV420P:
|
| + return VideoFrame::YV12;
|
| + default:
|
| + DVLOG(1) << "Unsupported PixelFormat: " << pixel_format;
|
| + }
|
| + return VideoFrame::INVALID;
|
| +}
|
| +
|
| +} // namespace webkit_media
|
|
|