Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(300)

Unified Diff: media/cast/rtcp/rtcp.cc

Issue 308043006: [Cast] Clean-up: Merge RtpReceiver+AudioReceiver+VideoReceiver-->FrameReceiver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed hclam's comments. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/cast/rtcp/rtcp.h ('k') | media/cast/rtcp/rtcp_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/rtcp/rtcp.cc
diff --git a/media/cast/rtcp/rtcp.cc b/media/cast/rtcp/rtcp.cc
index 3aa936b135d4900912bfb5dfd9d62baea9162014..480b2ac39904aa97a3d33d35e07f48f3bc804746 100644
--- a/media/cast/rtcp/rtcp.cc
+++ b/media/cast/rtcp/rtcp.cc
@@ -79,7 +79,8 @@ Rtcp::Rtcp(scoped_refptr<CastEnvironment> cast_environment,
transport::PacedPacketSender* paced_packet_sender,
RtpReceiverStatistics* rtp_receiver_statistics, RtcpMode rtcp_mode,
const base::TimeDelta& rtcp_interval, uint32 local_ssrc,
- uint32 remote_ssrc, const std::string& c_name, bool is_audio)
+ uint32 remote_ssrc, const std::string& c_name,
+ EventMediaType event_media_type)
: cast_environment_(cast_environment),
transport_sender_(transport_sender),
rtcp_interval_(rtcp_interval),
@@ -87,6 +88,7 @@ Rtcp::Rtcp(scoped_refptr<CastEnvironment> cast_environment,
local_ssrc_(local_ssrc),
remote_ssrc_(remote_ssrc),
c_name_(c_name),
+ event_media_type_(event_media_type),
rtp_receiver_statistics_(rtp_receiver_statistics),
rtt_feedback_(new LocalRtcpRttFeedback(this)),
receiver_feedback_(new LocalRtcpReceiverFeedback(this, cast_environment)),
@@ -97,8 +99,7 @@ Rtcp::Rtcp(scoped_refptr<CastEnvironment> cast_environment,
lip_sync_rtp_timestamp_(0),
lip_sync_ntp_timestamp_(0),
min_rtt_(base::TimeDelta::FromMilliseconds(kMaxRttMs)),
- number_of_rtt_in_avg_(0),
- is_audio_(is_audio) {
+ number_of_rtt_in_avg_(0) {
rtcp_receiver_.reset(new RtcpReceiver(cast_environment, sender_feedback,
receiver_feedback_.get(),
rtt_feedback_.get(), local_ssrc));
@@ -394,7 +395,6 @@ void Rtcp::UpdateNextTimeToSendRtcp() {
void Rtcp::OnReceivedReceiverLog(const RtcpReceiverLogMessage& receiver_log) {
// Add received log messages into our log system.
RtcpReceiverLogMessage::const_iterator it = receiver_log.begin();
- EventMediaType media_type = is_audio_ ? AUDIO_EVENT : VIDEO_EVENT;
for (; it != receiver_log.end(); ++it) {
uint32 rtp_timestamp = it->rtp_timestamp_;
@@ -405,18 +405,18 @@ void Rtcp::OnReceivedReceiverLog(const RtcpReceiverLogMessage& receiver_log) {
case PACKET_RECEIVED:
cast_environment_->Logging()->InsertPacketEvent(
event_it->event_timestamp, event_it->type,
- media_type, rtp_timestamp,
+ event_media_type_, rtp_timestamp,
kFrameIdUnknown, event_it->packet_id, 0, 0);
break;
case FRAME_ACK_SENT:
case FRAME_DECODED:
cast_environment_->Logging()->InsertFrameEvent(
- event_it->event_timestamp, event_it->type, media_type,
+ event_it->event_timestamp, event_it->type, event_media_type_,
rtp_timestamp, kFrameIdUnknown);
break;
case FRAME_PLAYOUT:
cast_environment_->Logging()->InsertFrameEventWithDelay(
- event_it->event_timestamp, event_it->type, media_type,
+ event_it->event_timestamp, event_it->type, event_media_type_,
rtp_timestamp, kFrameIdUnknown, event_it->delay_delta);
break;
default:
« no previous file with comments | « media/cast/rtcp/rtcp.h ('k') | media/cast/rtcp/rtcp_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698