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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 if (source_frame_writer_) { | 253 if (source_frame_writer_) { |
254 size_t length = CalcBufferSize(kI420, buffer->width(), buffer->height()); | 254 size_t length = CalcBufferSize(kI420, buffer->width(), buffer->height()); |
255 rtc::Buffer extracted_buffer(length); | 255 rtc::Buffer extracted_buffer(length); |
256 int extracted_length = | 256 int extracted_length = |
257 ExtractBuffer(buffer, length, extracted_buffer.data()); | 257 ExtractBuffer(buffer, length, extracted_buffer.data()); |
258 RTC_DCHECK_EQ(extracted_length, source_frame_writer_->FrameLength()); | 258 RTC_DCHECK_EQ(extracted_length, source_frame_writer_->FrameLength()); |
259 RTC_CHECK(source_frame_writer_->WriteFrame(extracted_buffer.data())); | 259 RTC_CHECK(source_frame_writer_->WriteFrame(extracted_buffer.data())); |
260 } | 260 } |
261 | 261 |
262 uint32_t timestamp = FrameNumberToTimestamp(frame_number); | 262 uint32_t timestamp = FrameNumberToTimestamp(frame_number); |
263 VideoFrame source_frame(buffer, timestamp, 0, webrtc::kVideoRotation_0); | 263 VideoFrame source_frame(buffer, timestamp, 0, webrtc::kVideoRotation_0, |
| 264 webrtc::VideoContentType::kDefault); |
264 | 265 |
265 // Store frame information during the different stages of encode and decode. | 266 // Store frame information during the different stages of encode and decode. |
266 frame_infos_.emplace_back(); | 267 frame_infos_.emplace_back(); |
267 FrameInfo* frame_info = &frame_infos_.back(); | 268 FrameInfo* frame_info = &frame_infos_.back(); |
268 frame_info->timestamp = timestamp; | 269 frame_info->timestamp = timestamp; |
269 | 270 |
270 // Decide if we are going to force a keyframe. | 271 // Decide if we are going to force a keyframe. |
271 std::vector<FrameType> frame_types(1, kVideoFrameDelta); | 272 std::vector<FrameType> frame_types(1, kVideoFrameDelta); |
272 if (config_.keyframe_interval > 0 && | 273 if (config_.keyframe_interval > 0 && |
273 frame_number % config_.keyframe_interval == 0) { | 274 frame_number % config_.keyframe_interval == 0) { |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 if (decoded_frame_writer_) { | 492 if (decoded_frame_writer_) { |
492 RTC_DCHECK_EQ(extracted_length, decoded_frame_writer_->FrameLength()); | 493 RTC_DCHECK_EQ(extracted_length, decoded_frame_writer_->FrameLength()); |
493 RTC_CHECK(decoded_frame_writer_->WriteFrame(extracted_buffer.data())); | 494 RTC_CHECK(decoded_frame_writer_->WriteFrame(extracted_buffer.data())); |
494 } | 495 } |
495 | 496 |
496 last_decoded_frame_buffer_ = std::move(extracted_buffer); | 497 last_decoded_frame_buffer_ = std::move(extracted_buffer); |
497 } | 498 } |
498 | 499 |
499 } // namespace test | 500 } // namespace test |
500 } // namespace webrtc | 501 } // namespace webrtc |
OLD | NEW |