OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 // Calls to OnFrame are not synchronized with changes to the sink wants. | 59 // Calls to OnFrame are not synchronized with changes to the sink wants. |
60 // When rotation_applied is set to true, one or a few frames may get here | 60 // When rotation_applied is set to true, one or a few frames may get here |
61 // with rotation still pending. Protect sinks that don't expect any | 61 // with rotation still pending. Protect sinks that don't expect any |
62 // pending rotation. | 62 // pending rotation. |
63 LOG(LS_VERBOSE) << "Discarding frame with unexpected rotation."; | 63 LOG(LS_VERBOSE) << "Discarding frame with unexpected rotation."; |
64 continue; | 64 continue; |
65 } | 65 } |
66 if (sink_pair.wants.black_frames) { | 66 if (sink_pair.wants.black_frames) { |
67 sink_pair.sink->OnFrame(webrtc::VideoFrame( | 67 sink_pair.sink->OnFrame(webrtc::VideoFrame( |
68 GetBlackFrameBuffer(frame.width(), frame.height()), frame.rotation(), | 68 GetBlackFrameBuffer(frame.width(), frame.height()), frame.rotation(), |
69 frame.timestamp_us())); | 69 frame.content_type(), frame.timestamp_us())); |
70 } else { | 70 } else { |
71 sink_pair.sink->OnFrame(frame); | 71 sink_pair.sink->OnFrame(frame); |
72 } | 72 } |
73 } | 73 } |
74 } | 74 } |
75 | 75 |
76 void VideoBroadcaster::UpdateWants() { | 76 void VideoBroadcaster::UpdateWants() { |
77 RTC_DCHECK(thread_checker_.CalledOnValidThread()); | 77 RTC_DCHECK(thread_checker_.CalledOnValidThread()); |
78 | 78 |
79 VideoSinkWants wants; | 79 VideoSinkWants wants; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 rtc::scoped_refptr<webrtc::I420Buffer> buffer = | 114 rtc::scoped_refptr<webrtc::I420Buffer> buffer = |
115 webrtc::I420Buffer::Create(width, height); | 115 webrtc::I420Buffer::Create(width, height); |
116 webrtc::I420Buffer::SetBlack(buffer.get()); | 116 webrtc::I420Buffer::SetBlack(buffer.get()); |
117 black_frame_buffer_ = buffer; | 117 black_frame_buffer_ = buffer; |
118 } | 118 } |
119 | 119 |
120 return black_frame_buffer_; | 120 return black_frame_buffer_; |
121 } | 121 } |
122 | 122 |
123 } // namespace rtc | 123 } // namespace rtc |
OLD | NEW |