| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 public EncodedImageCallback { | 235 public EncodedImageCallback { |
| 236 public: | 236 public: |
| 237 TestSimulcastEncoderAdapterFake() | 237 TestSimulcastEncoderAdapterFake() |
| 238 : helper_(new TestSimulcastEncoderAdapterFakeHelper()), | 238 : helper_(new TestSimulcastEncoderAdapterFakeHelper()), |
| 239 adapter_(helper_->CreateMockEncoderAdapter()), | 239 adapter_(helper_->CreateMockEncoderAdapter()), |
| 240 last_encoded_image_width_(-1), | 240 last_encoded_image_width_(-1), |
| 241 last_encoded_image_height_(-1), | 241 last_encoded_image_height_(-1), |
| 242 last_encoded_image_simulcast_index_(-1) {} | 242 last_encoded_image_simulcast_index_(-1) {} |
| 243 virtual ~TestSimulcastEncoderAdapterFake() {} | 243 virtual ~TestSimulcastEncoderAdapterFake() {} |
| 244 | 244 |
| 245 Result OnEncodedImage(const EncodedImage& encoded_image, | 245 int32_t Encoded(const EncodedImage& encodedImage, |
| 246 const CodecSpecificInfo* codec_specific_info, | 246 const CodecSpecificInfo* codecSpecificInfo = NULL, |
| 247 const RTPFragmentationHeader* fragmentation) override { | 247 const RTPFragmentationHeader* fragmentation = NULL) override { |
| 248 last_encoded_image_width_ = encoded_image._encodedWidth; | 248 last_encoded_image_width_ = encodedImage._encodedWidth; |
| 249 last_encoded_image_height_ = encoded_image._encodedHeight; | 249 last_encoded_image_height_ = encodedImage._encodedHeight; |
| 250 if (codec_specific_info) { | 250 if (codecSpecificInfo) { |
| 251 last_encoded_image_simulcast_index_ = | 251 last_encoded_image_simulcast_index_ = |
| 252 codec_specific_info->codecSpecific.VP8.simulcastIdx; | 252 codecSpecificInfo->codecSpecific.VP8.simulcastIdx; |
| 253 } | 253 } |
| 254 return Result(Result::OK, encoded_image._timeStamp); | 254 return 0; |
| 255 } | 255 } |
| 256 | 256 |
| 257 bool GetLastEncodedImageInfo(int* out_width, | 257 bool GetLastEncodedImageInfo(int* out_width, |
| 258 int* out_height, | 258 int* out_height, |
| 259 int* out_simulcast_index) { | 259 int* out_simulcast_index) { |
| 260 if (last_encoded_image_width_ == -1) { | 260 if (last_encoded_image_width_ == -1) { |
| 261 return false; | 261 return false; |
| 262 } | 262 } |
| 263 *out_width = last_encoded_image_width_; | 263 *out_width = last_encoded_image_width_; |
| 264 *out_height = last_encoded_image_height_; | 264 *out_height = last_encoded_image_height_; |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 memset(input_frame.video_frame_buffer()->MutableDataV(), 0, | 522 memset(input_frame.video_frame_buffer()->MutableDataV(), 0, |
| 523 input_frame.allocated_size(kVPlane)); | 523 input_frame.allocated_size(kVPlane)); |
| 524 | 524 |
| 525 std::vector<FrameType> frame_types(3, kVideoFrameKey); | 525 std::vector<FrameType> frame_types(3, kVideoFrameKey); |
| 526 EXPECT_EQ(WEBRTC_VIDEO_CODEC_FALLBACK_SOFTWARE, | 526 EXPECT_EQ(WEBRTC_VIDEO_CODEC_FALLBACK_SOFTWARE, |
| 527 adapter_->Encode(input_frame, nullptr, &frame_types)); | 527 adapter_->Encode(input_frame, nullptr, &frame_types)); |
| 528 } | 528 } |
| 529 | 529 |
| 530 } // namespace testing | 530 } // namespace testing |
| 531 } // namespace webrtc | 531 } // namespace webrtc |
| OLD | NEW |