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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 } | 116 } |
117 | 117 |
118 int32_t VCMGenericEncoder::SetPeriodicKeyFrames(bool enable) { | 118 int32_t VCMGenericEncoder::SetPeriodicKeyFrames(bool enable) { |
119 RTC_DCHECK_RUNS_SERIALIZED(&race_checker_); | 119 RTC_DCHECK_RUNS_SERIALIZED(&race_checker_); |
120 return encoder_->SetPeriodicKeyFrames(enable); | 120 return encoder_->SetPeriodicKeyFrames(enable); |
121 } | 121 } |
122 | 122 |
123 int32_t VCMGenericEncoder::RequestFrame( | 123 int32_t VCMGenericEncoder::RequestFrame( |
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 | 126 VideoFrame image; |
127 // TODO(nisse): Used only with internal source. Delete as soon as | 127 return encoder_->Encode(image, NULL, &frame_types); |
128 // that feature is removed. The only implementation I've been able | |
129 // to find ignores what's in the frame. | |
130 return encoder_->Encode(VideoFrame(I420Buffer::Create(1, 1), | |
131 kVideoRotation_0, 0), | |
132 NULL, &frame_types); | |
133 return 0; | |
134 } | 128 } |
135 | 129 |
136 bool VCMGenericEncoder::InternalSource() const { | 130 bool VCMGenericEncoder::InternalSource() const { |
137 return internal_source_; | 131 return internal_source_; |
138 } | 132 } |
139 | 133 |
140 bool VCMGenericEncoder::SupportsNativeHandle() const { | 134 bool VCMGenericEncoder::SupportsNativeHandle() const { |
141 RTC_DCHECK_RUNS_SERIALIZED(&race_checker_); | 135 RTC_DCHECK_RUNS_SERIALIZED(&race_checker_); |
142 return encoder_->SupportsNativeHandle(); | 136 return encoder_->SupportsNativeHandle(); |
143 } | 137 } |
(...skipping 22 matching lines...) Expand all Loading... |
166 media_opt_->UpdateWithEncodedData(encoded_image); | 160 media_opt_->UpdateWithEncodedData(encoded_image); |
167 if (internal_source_) { | 161 if (internal_source_) { |
168 // Signal to encoder to drop next frame. | 162 // Signal to encoder to drop next frame. |
169 result.drop_next_frame = media_opt_->DropFrame(); | 163 result.drop_next_frame = media_opt_->DropFrame(); |
170 } | 164 } |
171 } | 165 } |
172 return result; | 166 return result; |
173 } | 167 } |
174 | 168 |
175 } // namespace webrtc | 169 } // namespace webrtc |
OLD | NEW |