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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 | 89 |
90 if (wants.max_pixel_count && wants.max_pixel_count_step_up && | 90 if (wants.max_pixel_count && wants.max_pixel_count_step_up && |
91 *wants.max_pixel_count_step_up >= *wants.max_pixel_count) { | 91 *wants.max_pixel_count_step_up >= *wants.max_pixel_count) { |
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_->GetWidth() == frame.GetWidth() && | 99 if (black_frame_ && black_frame_->width() == frame.width() && |
100 black_frame_->GetHeight() == frame.GetHeight() && | 100 black_frame_->height() == frame.height() && |
101 black_frame_->GetVideoRotation() == frame.GetVideoRotation()) { | 101 black_frame_->GetVideoRotation() == frame.GetVideoRotation()) { |
102 black_frame_->SetTimeStamp(frame.GetTimeStamp()); | 102 black_frame_->SetTimeStamp(frame.GetTimeStamp()); |
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>( |
107 static_cast<int>(frame.GetWidth()), | 107 frame.width(), frame.height()), |
108 static_cast<int>(frame.GetHeight())), | |
109 frame.GetTimeStamp(), frame.GetVideoRotation())); | 108 frame.GetTimeStamp(), frame.GetVideoRotation())); |
110 black_frame_->SetToBlack(); | 109 black_frame_->SetToBlack(); |
111 return *black_frame_; | 110 return *black_frame_; |
112 } | 111 } |
113 | 112 |
114 } // namespace rtc | 113 } // namespace rtc |
OLD | NEW |