OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/glue/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 |
11 using WebKit::WebVideoFrame; | 11 using WebKit::WebVideoFrame; |
12 | 12 |
13 namespace webkit_glue { | 13 namespace webkit_media { |
14 | 14 |
15 media::VideoFrame* WebVideoFrameImpl::toVideoFrame( | 15 media::VideoFrame* WebVideoFrameImpl::toVideoFrame( |
16 WebVideoFrame* web_video_frame) { | 16 WebVideoFrame* web_video_frame) { |
17 WebVideoFrameImpl* wrapped_frame = | 17 WebVideoFrameImpl* wrapped_frame = |
18 static_cast<WebVideoFrameImpl*>(web_video_frame); | 18 static_cast<WebVideoFrameImpl*>(web_video_frame); |
19 if (wrapped_frame) | 19 if (wrapped_frame) |
20 return wrapped_frame->video_frame_.get(); | 20 return wrapped_frame->video_frame_.get(); |
21 return NULL; | 21 return NULL; |
22 } | 22 } |
23 | 23 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 return static_cast<int>(video_frame_->stride(plane)); | 73 return static_cast<int>(video_frame_->stride(plane)); |
74 return 0; | 74 return 0; |
75 } | 75 } |
76 | 76 |
77 const void* WebVideoFrameImpl::data(unsigned plane) const { | 77 const void* WebVideoFrameImpl::data(unsigned plane) const { |
78 if (video_frame_.get()) | 78 if (video_frame_.get()) |
79 return static_cast<const void*>(video_frame_->data(plane)); | 79 return static_cast<const void*>(video_frame_->data(plane)); |
80 return NULL; | 80 return NULL; |
81 } | 81 } |
82 | 82 |
83 } // namespace webkit_glue | 83 } // namespace webkit_media |
OLD | NEW |