OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 const std::vector<FrameType>& frame_types) { | 124 const std::vector<FrameType>& frame_types) { |
125 RTC_DCHECK_RUNS_SERIALIZED(&race_checker_); | 125 RTC_DCHECK_RUNS_SERIALIZED(&race_checker_); |
126 VideoFrame image; | 126 VideoFrame image; |
127 return encoder_->Encode(image, NULL, &frame_types); | 127 return encoder_->Encode(image, NULL, &frame_types); |
128 } | 128 } |
129 | 129 |
130 bool VCMGenericEncoder::InternalSource() const { | 130 bool VCMGenericEncoder::InternalSource() const { |
131 return internal_source_; | 131 return internal_source_; |
132 } | 132 } |
133 | 133 |
134 void VCMGenericEncoder::OnDroppedFrame() { | |
135 RTC_DCHECK_RUNS_SERIALIZED(&race_checker_); | |
136 encoder_->OnDroppedFrame(); | |
137 } | |
138 | |
139 bool VCMGenericEncoder::SupportsNativeHandle() const { | 134 bool VCMGenericEncoder::SupportsNativeHandle() const { |
140 RTC_DCHECK_RUNS_SERIALIZED(&race_checker_); | 135 RTC_DCHECK_RUNS_SERIALIZED(&race_checker_); |
141 return encoder_->SupportsNativeHandle(); | 136 return encoder_->SupportsNativeHandle(); |
142 } | 137 } |
143 | 138 |
144 VCMEncodedFrameCallback::VCMEncodedFrameCallback( | 139 VCMEncodedFrameCallback::VCMEncodedFrameCallback( |
145 EncodedImageCallback* post_encode_callback, | 140 EncodedImageCallback* post_encode_callback, |
146 media_optimization::MediaOptimization* media_opt) | 141 media_optimization::MediaOptimization* media_opt) |
147 : internal_source_(false), | 142 : internal_source_(false), |
148 post_encode_callback_(post_encode_callback), | 143 post_encode_callback_(post_encode_callback), |
(...skipping 16 matching lines...) Expand all Loading... |
165 media_opt_->UpdateWithEncodedData(encoded_image); | 160 media_opt_->UpdateWithEncodedData(encoded_image); |
166 if (internal_source_) { | 161 if (internal_source_) { |
167 // Signal to encoder to drop next frame. | 162 // Signal to encoder to drop next frame. |
168 result.drop_next_frame = media_opt_->DropFrame(); | 163 result.drop_next_frame = media_opt_->DropFrame(); |
169 } | 164 } |
170 } | 165 } |
171 return result; | 166 return result; |
172 } | 167 } |
173 | 168 |
174 } // namespace webrtc | 169 } // namespace webrtc |
OLD | NEW |