| 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..8059eef511a10cd97abaa0d1afb0a5149ed836a1
|
| --- /dev/null
|
| +++ b/webkit/media/crypto/decoders/ffmpeg_util.cc
|
| @@ -0,0 +1,23 @@
|
| +// 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::ColorFormat PixelFormatToVideoFormat(PixelFormat pixel_format) {
|
| + switch (pixel_format) {
|
| + case PIX_FMT_YUV420P:
|
| + return VideoFrame::kFormatYv12;
|
| + default:
|
| + DVLOG(1) << "Unsupported PixelFormat: " << pixel_format;
|
| + }
|
| + return VideoFrame::kFormatInvalid;
|
| +}
|
| +
|
| +} // namespace webkit_media
|
|
|