| 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/rtp_receiver/rtp_receiver.h" | 5 #include "media/cast/rtp_receiver/rtp_receiver.h" |
| 6 | 6 |
| 7 #include "base/big_endian.h" | 7 #include "base/big_endian.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "media/cast/rtp_receiver/receiver_stats.h" | 9 #include "media/cast/rtp_receiver/receiver_stats.h" |
| 10 #include "media/cast/rtp_receiver/rtp_parser/rtp_parser.h" | 10 #include "media/cast/rtp_receiver/rtp_parser/rtp_parser.h" |
| 11 #include "media/cast/rtp_receiver/rtp_receiver_defines.h" | 11 #include "media/cast/rtp_receiver/rtp_receiver_defines.h" |
| 12 | 12 |
| 13 namespace media { | 13 namespace media { |
| 14 namespace cast { | 14 namespace cast { |
| 15 | 15 |
| 16 RtpReceiver::RtpReceiver(base::TickClock* clock, | 16 RtpReceiver::RtpReceiver(base::TickClock* clock, |
| 17 const AudioReceiverConfig* audio_config, | 17 const FrameReceiverConfig* audio_config, |
| 18 const VideoReceiverConfig* video_config) : | 18 const FrameReceiverConfig* video_config) : |
| 19 packet_parser_(audio_config ? audio_config->incoming_ssrc : | 19 packet_parser_(audio_config ? audio_config->incoming_ssrc : |
| 20 (video_config ? video_config->incoming_ssrc : 0), | 20 (video_config ? video_config->incoming_ssrc : 0), |
| 21 audio_config ? audio_config->rtp_payload_type : | 21 audio_config ? audio_config->rtp_payload_type : |
| 22 (video_config ? video_config->rtp_payload_type : 0)), | 22 (video_config ? video_config->rtp_payload_type : 0)), |
| 23 stats_(clock) { | 23 stats_(clock) { |
| 24 DCHECK(audio_config || video_config); | 24 DCHECK(audio_config || video_config); |
| 25 } | 25 } |
| 26 | 26 |
| 27 RtpReceiver::~RtpReceiver() {} | 27 RtpReceiver::~RtpReceiver() {} |
| 28 | 28 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 46 return false; | 46 return false; |
| 47 } | 47 } |
| 48 | 48 |
| 49 OnReceivedPayloadData(payload_data, payload_size, rtp_header); | 49 OnReceivedPayloadData(payload_data, payload_size, rtp_header); |
| 50 stats_.UpdateStatistics(rtp_header); | 50 stats_.UpdateStatistics(rtp_header); |
| 51 return true; | 51 return true; |
| 52 } | 52 } |
| 53 | 53 |
| 54 } // namespace cast | 54 } // namespace cast |
| 55 } // namespace media | 55 } // namespace media |
| OLD | NEW |