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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 wants.max_pixel_count_step_up = Optional<int>(); | 92 wants.max_pixel_count_step_up = Optional<int>(); |
93 } | 93 } |
94 current_wants_ = wants; | 94 current_wants_ = wants; |
95 } | 95 } |
96 | 96 |
97 const cricket::VideoFrame& VideoBroadcaster::GetBlackFrame( | 97 const cricket::VideoFrame& VideoBroadcaster::GetBlackFrame( |
98 const cricket::VideoFrame& frame) { | 98 const cricket::VideoFrame& frame) { |
99 if (black_frame_ && black_frame_->width() == frame.width() && | 99 if (black_frame_ && black_frame_->width() == frame.width() && |
100 black_frame_->height() == frame.height() && | 100 black_frame_->height() == frame.height() && |
101 black_frame_->rotation() == frame.rotation()) { | 101 black_frame_->rotation() == frame.rotation()) { |
102 black_frame_->SetTimeStamp(frame.GetTimeStamp()); | 102 black_frame_->set_timestamp_us(frame.timestamp_us()); |
103 return *black_frame_; | 103 return *black_frame_; |
104 } | 104 } |
105 black_frame_.reset(new cricket::WebRtcVideoFrame( | 105 black_frame_.reset(new cricket::WebRtcVideoFrame( |
106 new rtc::RefCountedObject<webrtc::I420Buffer>( | 106 new rtc::RefCountedObject<webrtc::I420Buffer>(frame.width(), |
107 frame.width(), frame.height()), | 107 frame.height()), |
108 frame.GetTimeStamp(), frame.rotation())); | 108 frame.rotation(), frame.timestamp_us())); |
109 black_frame_->SetToBlack(); | 109 black_frame_->SetToBlack(); |
110 return *black_frame_; | 110 return *black_frame_; |
111 } | 111 } |
112 | 112 |
113 } // namespace rtc | 113 } // namespace rtc |
OLD | NEW |