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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 | 120 |
121 int32_t FakeEncoder::SetChannelParameters(uint32_t packet_loss, int64_t rtt) { | 121 int32_t FakeEncoder::SetChannelParameters(uint32_t packet_loss, int64_t rtt) { |
122 return 0; | 122 return 0; |
123 } | 123 } |
124 | 124 |
125 int32_t FakeEncoder::SetRates(uint32_t new_target_bitrate, uint32_t framerate) { | 125 int32_t FakeEncoder::SetRates(uint32_t new_target_bitrate, uint32_t framerate) { |
126 target_bitrate_kbps_ = new_target_bitrate; | 126 target_bitrate_kbps_ = new_target_bitrate; |
127 return 0; | 127 return 0; |
128 } | 128 } |
129 | 129 |
| 130 const char* FakeEncoder::kImplementationName = "fake_encoder"; |
| 131 const char* FakeEncoder::ImplementationName() const { |
| 132 return kImplementationName; |
| 133 } |
| 134 |
130 FakeH264Encoder::FakeH264Encoder(Clock* clock) | 135 FakeH264Encoder::FakeH264Encoder(Clock* clock) |
131 : FakeEncoder(clock), callback_(NULL), idr_counter_(0) { | 136 : FakeEncoder(clock), callback_(NULL), idr_counter_(0) { |
132 FakeEncoder::RegisterEncodeCompleteCallback(this); | 137 FakeEncoder::RegisterEncodeCompleteCallback(this); |
133 } | 138 } |
134 | 139 |
135 int32_t FakeH264Encoder::RegisterEncodeCompleteCallback( | 140 int32_t FakeH264Encoder::RegisterEncodeCompleteCallback( |
136 EncodedImageCallback* callback) { | 141 EncodedImageCallback* callback) { |
137 callback_ = callback; | 142 callback_ = callback; |
138 return 0; | 143 return 0; |
139 } | 144 } |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 delay_ms_(delay_ms) {} | 193 delay_ms_(delay_ms) {} |
189 | 194 |
190 int32_t DelayedEncoder::Encode(const VideoFrame& input_image, | 195 int32_t DelayedEncoder::Encode(const VideoFrame& input_image, |
191 const CodecSpecificInfo* codec_specific_info, | 196 const CodecSpecificInfo* codec_specific_info, |
192 const std::vector<VideoFrameType>* frame_types) { | 197 const std::vector<VideoFrameType>* frame_types) { |
193 SleepMs(delay_ms_); | 198 SleepMs(delay_ms_); |
194 return FakeEncoder::Encode(input_image, codec_specific_info, frame_types); | 199 return FakeEncoder::Encode(input_image, codec_specific_info, frame_types); |
195 } | 200 } |
196 } // namespace test | 201 } // namespace test |
197 } // namespace webrtc | 202 } // namespace webrtc |
OLD | NEW |