Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: webkit/media/webvideoframe_impl.cc

Issue 11274017: Added support for YUV videos to the software compositor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/media/webvideoframe_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
11 using WebKit::WebVideoFrame; 11 using WebKit::WebVideoFrame;
12 12
13 namespace webkit_media { 13 namespace webkit_media {
14 14
15 media::VideoFrame* WebVideoFrameImpl::toVideoFrame(
16 WebVideoFrame* web_video_frame) {
17 WebVideoFrameImpl* wrapped_frame =
18 static_cast<WebVideoFrameImpl*>(web_video_frame);
19 if (wrapped_frame)
20 return wrapped_frame->video_frame_.get();
21 return NULL;
22 }
23
24 WebVideoFrameImpl::WebVideoFrameImpl( 15 WebVideoFrameImpl::WebVideoFrameImpl(
25 scoped_refptr<media::VideoFrame> video_frame) 16 scoped_refptr<media::VideoFrame> video_frame)
26 : video_frame_(video_frame) { 17 : video_frame_(video_frame) {
27 } 18 }
28 19
29 WebVideoFrameImpl::~WebVideoFrameImpl() {} 20 WebVideoFrameImpl::~WebVideoFrameImpl() {}
30 21
31 #define COMPILE_ASSERT_MATCHING_ENUM(webkit_name, chromium_name) \ 22 #define COMPILE_ASSERT_MATCHING_ENUM(webkit_name, chromium_name) \
32 COMPILE_ASSERT(int(WebKit::WebVideoFrame::webkit_name) == \ 23 COMPILE_ASSERT(int(WebKit::WebVideoFrame::webkit_name) == \
33 int(media::VideoFrame::chromium_name), \ 24 int(media::VideoFrame::chromium_name), \
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 return video_frame_->texture_id(); 87 return video_frame_->texture_id();
97 } 88 }
98 89
99 unsigned WebVideoFrameImpl::textureTarget() const { 90 unsigned WebVideoFrameImpl::textureTarget() const {
100 if (!video_frame_.get() || format() != FormatNativeTexture) 91 if (!video_frame_.get() || format() != FormatNativeTexture)
101 return 0; 92 return 0;
102 return video_frame_->texture_target(); 93 return video_frame_->texture_target();
103 } 94 }
104 95
105 } // namespace webkit_media 96 } // namespace webkit_media
OLDNEW
« no previous file with comments | « webkit/media/webvideoframe_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698