OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "base/logging.h" |
| 6 #include "webkit/media/crypto/decoders/ffmpeg_util.h" |
| 7 #include "webkit/media/crypto/ppapi/content_decryption_module.h" |
| 8 |
| 9 namespace webkit_media { |
| 10 |
| 11 using cdm::VideoFrame; |
| 12 |
| 13 VideoFrame::Format PixelFormatToVideoFormat(PixelFormat pixel_format) { |
| 14 switch (pixel_format) { |
| 15 case PIX_FMT_YUV422P: |
| 16 return VideoFrame::YV16; |
| 17 case PIX_FMT_YUV420P: |
| 18 return VideoFrame::YV12; |
| 19 default: |
| 20 DVLOG(1) << "Unsupported PixelFormat: " << pixel_format; |
| 21 } |
| 22 return VideoFrame::INVALID; |
| 23 } |
| 24 |
| 25 } // namespace webkit_media |
OLD | NEW |