| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "webkit/media/webvideoframe_impl.h" | 5 #include "webkit/media/webvideoframe_impl.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "media/base/video_frame.h" | 8 #include "media/base/video_frame.h" |
| 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebVideoFrame.h" | 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebVideoFrame.h" |
| 10 | 10 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 return 1; | 66 return 1; |
| 67 case media::VideoFrame::YV12: | 67 case media::VideoFrame::YV12: |
| 68 case media::VideoFrame::YV16: | 68 case media::VideoFrame::YV16: |
| 69 return 3; | 69 return 3; |
| 70 case media::VideoFrame::INVALID: | 70 case media::VideoFrame::INVALID: |
| 71 case media::VideoFrame::EMPTY: | 71 case media::VideoFrame::EMPTY: |
| 72 case media::VideoFrame::I420: | 72 case media::VideoFrame::I420: |
| 73 break; | 73 break; |
| 74 case media::VideoFrame::NATIVE_TEXTURE: | 74 case media::VideoFrame::NATIVE_TEXTURE: |
| 75 return 0; | 75 return 0; |
| 76 case media::VideoFrame::kColorUnknown: |
| 77 case media::VideoFrame::kI420: |
| 78 case media::VideoFrame::kYUY2: |
| 79 case media::VideoFrame::kUYVY: |
| 80 case media::VideoFrame::kRGB24: |
| 81 case media::VideoFrame::kARGB: |
| 82 case media::VideoFrame::kMJPEG: |
| 83 break; |
| 76 } | 84 } |
| 77 NOTREACHED(); | 85 NOTREACHED(); |
| 78 return 0; | 86 return 0; |
| 79 } | 87 } |
| 80 | 88 |
| 81 int WebVideoFrameImpl::stride(unsigned plane) const { | 89 int WebVideoFrameImpl::stride(unsigned plane) const { |
| 82 if (video_frame_.get()) | 90 if (video_frame_.get()) |
| 83 return static_cast<int>(video_frame_->stride(plane)); | 91 return static_cast<int>(video_frame_->stride(plane)); |
| 84 return 0; | 92 return 0; |
| 85 } | 93 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 96 return video_frame_->texture_id(); | 104 return video_frame_->texture_id(); |
| 97 } | 105 } |
| 98 | 106 |
| 99 unsigned WebVideoFrameImpl::textureTarget() const { | 107 unsigned WebVideoFrameImpl::textureTarget() const { |
| 100 if (!video_frame_.get() || format() != FormatNativeTexture) | 108 if (!video_frame_.get() || format() != FormatNativeTexture) |
| 101 return 0; | 109 return 0; |
| 102 return video_frame_->texture_target(); | 110 return video_frame_->texture_target(); |
| 103 } | 111 } |
| 104 | 112 |
| 105 } // namespace webkit_media | 113 } // namespace webkit_media |
| OLD | NEW |