| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "media/cast/video_receiver/video_receiver.h" | 5 #include "media/cast/video_receiver/video_receiver.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 rtp_header.max_packet_id, | 436 rtp_header.max_packet_id, |
| 437 payload_size); | 437 payload_size); |
| 438 | 438 |
| 439 bool duplicate = false; | 439 bool duplicate = false; |
| 440 bool complete = | 440 bool complete = |
| 441 framer_->InsertPacket(payload_data, payload_size, rtp_header, &duplicate); | 441 framer_->InsertPacket(payload_data, payload_size, rtp_header, &duplicate); |
| 442 | 442 |
| 443 if (duplicate) { | 443 if (duplicate) { |
| 444 cast_environment_->Logging()->InsertPacketEvent( | 444 cast_environment_->Logging()->InsertPacketEvent( |
| 445 now, | 445 now, |
| 446 kDuplicatePacketReceived, | 446 kDuplicateVideoPacketReceived, |
| 447 rtp_header.webrtc.header.timestamp, | 447 rtp_header.webrtc.header.timestamp, |
| 448 rtp_header.frame_id, | 448 rtp_header.frame_id, |
| 449 rtp_header.packet_id, | 449 rtp_header.packet_id, |
| 450 rtp_header.max_packet_id, | 450 rtp_header.max_packet_id, |
| 451 payload_size); | 451 payload_size); |
| 452 // Duplicate packets are ignored. | 452 // Duplicate packets are ignored. |
| 453 return; | 453 return; |
| 454 } | 454 } |
| 455 if (!complete) | 455 if (!complete) |
| 456 return; // Video frame not complete; wait for more packets. | 456 return; // Video frame not complete; wait for more packets. |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 } | 524 } |
| 525 | 525 |
| 526 void VideoReceiver::SendNextRtcpReport() { | 526 void VideoReceiver::SendNextRtcpReport() { |
| 527 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); | 527 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); |
| 528 rtcp_->SendRtcpFromRtpReceiver(NULL, NULL); | 528 rtcp_->SendRtcpFromRtpReceiver(NULL, NULL); |
| 529 ScheduleNextRtcpReport(); | 529 ScheduleNextRtcpReport(); |
| 530 } | 530 } |
| 531 | 531 |
| 532 } // namespace cast | 532 } // namespace cast |
| 533 } // namespace media | 533 } // namespace media |
| OLD | NEW |