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

Side by Side Diff: webrtc/media/base/fakevideorenderer.h

Issue 2029273004: New static method I420Buffer::SetToBlack. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Add missing SetToBlack call. Created 4 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
« no previous file with comments | « webrtc/common_video/video_frame_buffer.cc ('k') | webrtc/media/base/videobroadcaster.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 15 matching lines...) Expand all
26 width_(0), 26 width_(0),
27 height_(0), 27 height_(0),
28 rotation_(webrtc::kVideoRotation_0), 28 rotation_(webrtc::kVideoRotation_0),
29 timestamp_(0), 29 timestamp_(0),
30 num_rendered_frames_(0), 30 num_rendered_frames_(0),
31 black_frame_(false) {} 31 black_frame_(false) {}
32 32
33 virtual void OnFrame(const VideoFrame& frame) { 33 virtual void OnFrame(const VideoFrame& frame) {
34 rtc::CritScope cs(&crit_); 34 rtc::CritScope cs(&crit_);
35 // TODO(zhurunz) Check with VP8 team to see if we can remove this 35 // TODO(zhurunz) Check with VP8 team to see if we can remove this
36 // tolerance on Y values. 36 // tolerance on Y values. Some unit tests produce Y values close
37 black_frame_ = CheckFrameColorYuv(6, 48, 128, 128, 128, 128, &frame); 37 // to 16 rather than close to zero, for supposedly black frames.
38 // Largest value observed is 34, e.g., running
39 // P2PTestConductor.LocalP2PTest16To9 (peerconnection_unittests).
40 black_frame_ = CheckFrameColorYuv(0, 48, 128, 128, 128, 128, &frame);
38 // Treat unexpected frame size as error. 41 // Treat unexpected frame size as error.
39 ++num_rendered_frames_; 42 ++num_rendered_frames_;
40 width_ = frame.width(); 43 width_ = frame.width();
41 height_ = frame.height(); 44 height_ = frame.height();
42 rotation_ = frame.rotation(); 45 rotation_ = frame.rotation();
43 timestamp_ = frame.GetTimeStamp(); 46 timestamp_ = frame.GetTimeStamp();
44 SignalRenderFrame(&frame); 47 SignalRenderFrame(&frame);
45 } 48 }
46 49
47 int errors() const { return errors_; } 50 int errors() const { return errors_; }
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 webrtc::VideoRotation rotation_; 135 webrtc::VideoRotation rotation_;
133 int64_t timestamp_; 136 int64_t timestamp_;
134 int num_rendered_frames_; 137 int num_rendered_frames_;
135 bool black_frame_; 138 bool black_frame_;
136 rtc::CriticalSection crit_; 139 rtc::CriticalSection crit_;
137 }; 140 };
138 141
139 } // namespace cricket 142 } // namespace cricket
140 143
141 #endif // WEBRTC_MEDIA_BASE_FAKEVIDEORENDERER_H_ 144 #endif // WEBRTC_MEDIA_BASE_FAKEVIDEORENDERER_H_
OLDNEW
« no previous file with comments | « webrtc/common_video/video_frame_buffer.cc ('k') | webrtc/media/base/videobroadcaster.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698