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

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

Issue 1687273002: Revert of Make cricket::VideoCapturer implement VideoSourceInterface (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 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/media/base/capturerenderadapter.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 25 matching lines...) Expand all
36 black_frame_ = CheckFrameColorYuv(6, 48, 128, 128, 128, 128, frame); 36 black_frame_ = CheckFrameColorYuv(6, 48, 128, 128, 128, 128, frame);
37 // Treat unexpected frame size as error. 37 // Treat unexpected frame size as error.
38 if (!frame) { 38 if (!frame) {
39 LOG(LS_WARNING) << "RenderFrame expected non-null frame."; 39 LOG(LS_WARNING) << "RenderFrame expected non-null frame.";
40 ++errors_; 40 ++errors_;
41 return false; 41 return false;
42 } 42 }
43 ++num_rendered_frames_; 43 ++num_rendered_frames_;
44 width_ = static_cast<int>(frame->GetWidth()); 44 width_ = static_cast<int>(frame->GetWidth());
45 height_ = static_cast<int>(frame->GetHeight()); 45 height_ = static_cast<int>(frame->GetHeight());
46 rotation_ = frame->GetVideoRotation();
47 SignalRenderFrame(frame); 46 SignalRenderFrame(frame);
48 return true; 47 return true;
49 } 48 }
50 49
51 int errors() const { return errors_; } 50 int errors() const { return errors_; }
52 int width() const { 51 int width() const {
53 rtc::CritScope cs(&crit_); 52 rtc::CritScope cs(&crit_);
54 return width_; 53 return width_;
55 } 54 }
56 int height() const { 55 int height() const {
57 rtc::CritScope cs(&crit_); 56 rtc::CritScope cs(&crit_);
58 return height_; 57 return height_;
59 } 58 }
60 int rotation() const {
61 rtc::CritScope cs(&crit_);
62 return rotation_;
63 }
64 int num_rendered_frames() const { 59 int num_rendered_frames() const {
65 rtc::CritScope cs(&crit_); 60 rtc::CritScope cs(&crit_);
66 return num_rendered_frames_; 61 return num_rendered_frames_;
67 } 62 }
68 bool black_frame() const { 63 bool black_frame() const {
69 rtc::CritScope cs(&crit_); 64 rtc::CritScope cs(&crit_);
70 return black_frame_; 65 return black_frame_;
71 } 66 }
72 67
73 sigslot::signal3<int, int, int> SignalSetSize; 68 sigslot::signal3<int, int, int> SignalSetSize;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 } 116 }
122 u_pos += u_pitch; 117 u_pos += u_pitch;
123 v_pos += v_pitch; 118 v_pos += v_pitch;
124 } 119 }
125 return true; 120 return true;
126 } 121 }
127 122
128 int errors_; 123 int errors_;
129 int width_; 124 int width_;
130 int height_; 125 int height_;
131 webrtc::VideoRotation rotation_;
132 int num_rendered_frames_; 126 int num_rendered_frames_;
133 bool black_frame_; 127 bool black_frame_;
134 rtc::CriticalSection crit_; 128 rtc::CriticalSection crit_;
135 }; 129 };
136 130
137 } // namespace cricket 131 } // namespace cricket
138 132
139 #endif // WEBRTC_MEDIA_BASE_FAKEVIDEORENDERER_H_ 133 #endif // WEBRTC_MEDIA_BASE_FAKEVIDEORENDERER_H_
OLDNEW
« no previous file with comments | « webrtc/media/base/capturerenderadapter.cc ('k') | webrtc/media/base/videobroadcaster.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698