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

Side by Side Diff: content/renderer/media/video_frame_compositor.cc

Issue 289373011: Support for YUV 4:4:4 subsampling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Try that again. Created 6 years, 6 months 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/renderer/media/video_frame_compositor.h" 5 #include "content/renderer/media/video_frame_compositor.h"
6 6
7 #include "media/base/video_frame.h" 7 #include "media/base/video_frame.h"
8 8
9 namespace content { 9 namespace content {
10 10
11 static bool IsOpaque(const scoped_refptr<media::VideoFrame>& frame) { 11 static bool IsOpaque(const scoped_refptr<media::VideoFrame>& frame) {
12 switch (frame->format()) { 12 switch (frame->format()) {
13 case media::VideoFrame::UNKNOWN: 13 case media::VideoFrame::UNKNOWN:
14 case media::VideoFrame::YV12: 14 case media::VideoFrame::YV12:
15 case media::VideoFrame::YV12J: 15 case media::VideoFrame::YV12J:
16 case media::VideoFrame::YV16: 16 case media::VideoFrame::YV16:
17 case media::VideoFrame::I420: 17 case media::VideoFrame::I420:
18 case media::VideoFrame::YV24:
18 case media::VideoFrame::NV12: 19 case media::VideoFrame::NV12:
19 return true; 20 return true;
20 21
21 case media::VideoFrame::YV12A: 22 case media::VideoFrame::YV12A:
22 #if defined(VIDEO_HOLE) 23 #if defined(VIDEO_HOLE)
23 case media::VideoFrame::HOLE: 24 case media::VideoFrame::HOLE:
24 #endif // defined(VIDEO_HOLE) 25 #endif // defined(VIDEO_HOLE)
25 case media::VideoFrame::NATIVE_TEXTURE: 26 case media::VideoFrame::NATIVE_TEXTURE:
26 break; 27 break;
27 } 28 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 opacity_changed_cb_.Run(IsOpaque(frame)); 68 opacity_changed_cb_.Run(IsOpaque(frame));
68 } 69 }
69 70
70 current_frame_ = frame; 71 current_frame_ = frame;
71 72
72 if (client_) 73 if (client_)
73 client_->DidReceiveFrame(); 74 client_->DidReceiveFrame();
74 } 75 }
75 76
76 } // namespace content 77 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_browsertest.cc ('k') | media/base/video_frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698