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

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

Issue 8897022: Revert 113895 - <video> decode in hardware! (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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')
Property Changes:
Added: svn:mergeinfo
Merged /branches/chrome_webkit_merge_branch/src/webkit/media/webvideoframe_impl.cc:r3734-4217,4606-5108,5177-5263
OLDNEW
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/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 25 matching lines...) Expand all
36 COMPILE_ASSERT_MATCHING_ENUM(FormatRGB555, RGB555); 36 COMPILE_ASSERT_MATCHING_ENUM(FormatRGB555, RGB555);
37 COMPILE_ASSERT_MATCHING_ENUM(FormatRGB565, RGB565); 37 COMPILE_ASSERT_MATCHING_ENUM(FormatRGB565, RGB565);
38 COMPILE_ASSERT_MATCHING_ENUM(FormatRGB24, RGB24); 38 COMPILE_ASSERT_MATCHING_ENUM(FormatRGB24, RGB24);
39 COMPILE_ASSERT_MATCHING_ENUM(FormatRGB32, RGB32); 39 COMPILE_ASSERT_MATCHING_ENUM(FormatRGB32, RGB32);
40 COMPILE_ASSERT_MATCHING_ENUM(FormatRGBA, RGBA); 40 COMPILE_ASSERT_MATCHING_ENUM(FormatRGBA, RGBA);
41 COMPILE_ASSERT_MATCHING_ENUM(FormatYV12, YV12); 41 COMPILE_ASSERT_MATCHING_ENUM(FormatYV12, YV12);
42 COMPILE_ASSERT_MATCHING_ENUM(FormatYV16, YV16); 42 COMPILE_ASSERT_MATCHING_ENUM(FormatYV16, YV16);
43 COMPILE_ASSERT_MATCHING_ENUM(FormatNV12, NV12); 43 COMPILE_ASSERT_MATCHING_ENUM(FormatNV12, NV12);
44 COMPILE_ASSERT_MATCHING_ENUM(FormatEmpty, EMPTY); 44 COMPILE_ASSERT_MATCHING_ENUM(FormatEmpty, EMPTY);
45 COMPILE_ASSERT_MATCHING_ENUM(FormatASCII, ASCII); 45 COMPILE_ASSERT_MATCHING_ENUM(FormatASCII, ASCII);
46 COMPILE_ASSERT_MATCHING_ENUM(FormatI420, I420);
47 COMPILE_ASSERT_MATCHING_ENUM(FormatNativeTexture, NATIVE_TEXTURE);
48 46
49 WebVideoFrame::Format WebVideoFrameImpl::format() const { 47 WebVideoFrame::Format WebVideoFrameImpl::format() const {
50 if (video_frame_.get()) 48 if (video_frame_.get())
51 return static_cast<WebVideoFrame::Format>(video_frame_->format()); 49 return static_cast<WebVideoFrame::Format>(video_frame_->format());
52 return WebVideoFrame::FormatInvalid; 50 return WebVideoFrame::FormatInvalid;
53 } 51 }
54 52
55 unsigned WebVideoFrameImpl::width() const { 53 unsigned WebVideoFrameImpl::width() const {
56 if (video_frame_.get()) 54 if (video_frame_.get())
57 return video_frame_->width(); 55 return video_frame_->width();
(...skipping 12 matching lines...) Expand all
70 return 0; 68 return 0;
71 } 69 }
72 70
73 int WebVideoFrameImpl::stride(unsigned plane) const { 71 int WebVideoFrameImpl::stride(unsigned plane) const {
74 if (video_frame_.get()) 72 if (video_frame_.get())
75 return static_cast<int>(video_frame_->stride(plane)); 73 return static_cast<int>(video_frame_->stride(plane));
76 return 0; 74 return 0;
77 } 75 }
78 76
79 const void* WebVideoFrameImpl::data(unsigned plane) const { 77 const void* WebVideoFrameImpl::data(unsigned plane) const {
80 if (!video_frame_.get() || format() == FormatNativeTexture) 78 if (video_frame_.get())
81 return NULL; 79 return static_cast<const void*>(video_frame_->data(plane));
82 return static_cast<const void*>(video_frame_->data(plane)); 80 return NULL;
83 }
84
85 unsigned WebVideoFrameImpl::textureId() const {
86 if (!video_frame_.get() || format() != FormatNativeTexture)
87 return 0;
88 return video_frame_->texture_id();
89 } 81 }
90 82
91 } // namespace webkit_media 83 } // 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