OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 | 125 |
126 int32_t FakeEncoder::SetChannelParameters(uint32_t packet_loss, int64_t rtt) { | 126 int32_t FakeEncoder::SetChannelParameters(uint32_t packet_loss, int64_t rtt) { |
127 return 0; | 127 return 0; |
128 } | 128 } |
129 | 129 |
130 int32_t FakeEncoder::SetRates(uint32_t new_target_bitrate, uint32_t framerate) { | 130 int32_t FakeEncoder::SetRates(uint32_t new_target_bitrate, uint32_t framerate) { |
131 target_bitrate_kbps_ = new_target_bitrate; | 131 target_bitrate_kbps_ = new_target_bitrate; |
132 return 0; | 132 return 0; |
133 } | 133 } |
134 | 134 |
| 135 const char* FakeEncoder::kImplementationName = "fake_encoder"; |
| 136 const char* FakeEncoder::ImplementationName() const { |
| 137 return kImplementationName; |
| 138 } |
| 139 |
135 FakeH264Encoder::FakeH264Encoder(Clock* clock) | 140 FakeH264Encoder::FakeH264Encoder(Clock* clock) |
136 : FakeEncoder(clock), callback_(NULL), idr_counter_(0) { | 141 : FakeEncoder(clock), callback_(NULL), idr_counter_(0) { |
137 FakeEncoder::RegisterEncodeCompleteCallback(this); | 142 FakeEncoder::RegisterEncodeCompleteCallback(this); |
138 } | 143 } |
139 | 144 |
140 int32_t FakeH264Encoder::RegisterEncodeCompleteCallback( | 145 int32_t FakeH264Encoder::RegisterEncodeCompleteCallback( |
141 EncodedImageCallback* callback) { | 146 EncodedImageCallback* callback) { |
142 callback_ = callback; | 147 callback_ = callback; |
143 return 0; | 148 return 0; |
144 } | 149 } |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 delay_ms_(delay_ms) {} | 198 delay_ms_(delay_ms) {} |
194 | 199 |
195 int32_t DelayedEncoder::Encode(const VideoFrame& input_image, | 200 int32_t DelayedEncoder::Encode(const VideoFrame& input_image, |
196 const CodecSpecificInfo* codec_specific_info, | 201 const CodecSpecificInfo* codec_specific_info, |
197 const std::vector<FrameType>* frame_types) { | 202 const std::vector<FrameType>* frame_types) { |
198 SleepMs(delay_ms_); | 203 SleepMs(delay_ms_); |
199 return FakeEncoder::Encode(input_image, codec_specific_info, frame_types); | 204 return FakeEncoder::Encode(input_image, codec_specific_info, frame_types); |
200 } | 205 } |
201 } // namespace test | 206 } // namespace test |
202 } // namespace webrtc | 207 } // namespace webrtc |
OLD | NEW |