Chromium Code Reviews| Index: media/cast/video_sender/video_sender.cc |
| diff --git a/media/cast/video_sender/video_sender.cc b/media/cast/video_sender/video_sender.cc |
| index 355cdef6f846dbfabfc22e67a9a648795d582281..0ca451d4071807dd151deee23df6e4ad8de6f7f4 100644 |
| --- a/media/cast/video_sender/video_sender.cc |
| +++ b/media/cast/video_sender/video_sender.cc |
| @@ -226,20 +226,18 @@ void VideoSender::SendRtcpReport() { |
| DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); |
| transport::RtcpSenderLogMessage sender_log_message; |
| - const FrameRawMap& frame_raw_map = |
| - cast_environment_->Logging()->GetFrameRawData(); |
| + VideoRtcpRawMap video_logs = |
| + cast_environment_->Logging()->GetVideoRtcpRawData(); |
| + |
| + while (!video_logs.empty()) { |
| + VideoRtcpRawMap::iterator it = video_logs.begin(); |
| + uint32 rtp_timestamp = it->first; |
| - FrameRawMap::const_iterator it = frame_raw_map.begin(); |
| - while (it != frame_raw_map.end()) { |
| transport::RtcpSenderFrameLogMessage frame_message; |
| - frame_message.rtp_timestamp = it->first; |
| + frame_message.rtp_timestamp = rtp_timestamp; |
| frame_message.frame_status = transport::kRtcpSenderFrameStatusUnknown; |
| - if (it->second.type.empty()) { |
| - ++it; |
| - continue; |
| - } |
| - CastLoggingEvent last_event = it->second.type.back(); |
| - switch (last_event) { |
| + |
| + switch (it->second.type) { |
| case kVideoFrameCaptured: |
| frame_message.frame_status = |
| transport::kRtcpSenderFrameStatusDroppedByFlowControl; |
| @@ -253,28 +251,15 @@ void VideoSender::SendRtcpReport() { |
| transport::kRtcpSenderFrameStatusSentToNetwork; |
| break; |
| default: |
| - ++it; |
| - continue; |
| - } |
| - ++it; |
| - if (it == frame_raw_map.end()) { |
| - // Last message on our map; only send if it is kVideoFrameEncoded. |
| - if (last_event != kVideoFrameEncoded) { |
| - // For other events we will wait for it to finish and report the result |
| - // in the next report. |
| - break; |
| - } |
| + NOTREACHED(); |
|
mikhal1
2014/01/14 19:57:18
break;
pwestin
2014/01/17 23:46:17
Done.
|
| } |
| + video_logs.erase(rtp_timestamp); |
| sender_log_message.push_back(frame_message); |
| } |
| rtcp_->SendRtcpFromRtpSender(&sender_log_message); |
| if (!sender_log_message.empty()) { |
| VLOG(1) << "Failed to send all log messages"; |
| } |
| - |
| - // TODO(pwestin): When we start pulling out the logging by other means we need |
| - // to synchronize this. |
| - cast_environment_->Logging()->Reset(); |
| ScheduleNextRtcpReport(); |
| } |