Update talk to 58127566 together with
https://webrtc-codereview.appspot.com/5309005/.
R=mallinath@webrtc.org, niklas.enbom@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/5719004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@5277 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/talk/media/base/fakemediaengine.h b/talk/media/base/fakemediaengine.h
index c44db68..d71c660 100644
--- a/talk/media/base/fakemediaengine.h
+++ b/talk/media/base/fakemediaengine.h
@@ -191,10 +191,12 @@
return true;
}
void set_playout(bool playout) { playout_ = playout; }
- virtual void OnPacketReceived(talk_base::Buffer* packet) {
+ virtual void OnPacketReceived(talk_base::Buffer* packet,
+ const talk_base::PacketTime& packet_time) {
rtp_packets_.push_back(std::string(packet->data(), packet->length()));
}
- virtual void OnRtcpReceived(talk_base::Buffer* packet) {
+ virtual void OnRtcpReceived(talk_base::Buffer* packet,
+ const talk_base::PacketTime& packet_time) {
rtcp_packets_.push_back(std::string(packet->data(), packet->length()));
}
virtual void OnReadyToSend(bool ready) {
@@ -776,6 +778,8 @@
bool SetLocalMonitor(bool enable) { return true; }
+ bool StartAecDump(FILE* file) { return false; }
+
bool RegisterProcessor(uint32 ssrc, VoiceProcessor* voice_processor,
MediaProcessorDirection direction) {
if (direction == MPD_RX) {
diff --git a/talk/media/base/fakenetworkinterface.h b/talk/media/base/fakenetworkinterface.h
index 37679eb..eb0175b 100644
--- a/talk/media/base/fakenetworkinterface.h
+++ b/talk/media/base/fakenetworkinterface.h
@@ -201,9 +201,11 @@
msg->pdata);
if (dest_) {
if (msg->message_id == ST_RTP) {
- dest_->OnPacketReceived(&msg_data->data());
+ dest_->OnPacketReceived(&msg_data->data(),
+ talk_base::CreatePacketTime(0));
} else {
- dest_->OnRtcpReceived(&msg_data->data());
+ dest_->OnRtcpReceived(&msg_data->data(),
+ talk_base::CreatePacketTime(0));
}
}
delete msg_data;
diff --git a/talk/media/base/filemediaengine.cc b/talk/media/base/filemediaengine.cc
index 80e9729..dfec607 100644
--- a/talk/media/base/filemediaengine.cc
+++ b/talk/media/base/filemediaengine.cc
@@ -315,7 +315,8 @@
return true;
}
-void FileVoiceChannel::OnPacketReceived(talk_base::Buffer* packet) {
+void FileVoiceChannel::OnPacketReceived(
+ talk_base::Buffer* packet, const talk_base::PacketTime& packet_time) {
rtp_sender_receiver_->OnPacketReceived(packet);
}
@@ -360,7 +361,8 @@
return true;
}
-void FileVideoChannel::OnPacketReceived(talk_base::Buffer* packet) {
+void FileVideoChannel::OnPacketReceived(
+ talk_base::Buffer* packet, const talk_base::PacketTime& packet_time) {
rtp_sender_receiver_->OnPacketReceived(packet);
}
diff --git a/talk/media/base/filemediaengine.h b/talk/media/base/filemediaengine.h
index 129af9c..843806b 100644
--- a/talk/media/base/filemediaengine.h
+++ b/talk/media/base/filemediaengine.h
@@ -133,6 +133,7 @@
virtual bool FindVideoCodec(const VideoCodec& codec) { return true; }
virtual void SetVoiceLogging(int min_sev, const char* filter) {}
virtual void SetVideoLogging(int min_sev, const char* filter) {}
+ virtual bool StartAecDump(FILE* file) { return false; }
virtual bool RegisterVideoProcessor(VideoProcessor* processor) {
return true;
@@ -232,8 +233,10 @@
virtual bool GetStats(VoiceMediaInfo* info) { return true; }
// Implement pure virtual methods of MediaChannel.
- virtual void OnPacketReceived(talk_base::Buffer* packet);
- virtual void OnRtcpReceived(talk_base::Buffer* packet) {}
+ virtual void OnPacketReceived(talk_base::Buffer* packet,
+ const talk_base::PacketTime& packet_time);
+ virtual void OnRtcpReceived(talk_base::Buffer* packet,
+ const talk_base::PacketTime& packet_time) {}
virtual void OnReadyToSend(bool ready) {}
virtual bool AddSendStream(const StreamParams& sp);
virtual bool RemoveSendStream(uint32 ssrc);
@@ -298,8 +301,10 @@
virtual bool RequestIntraFrame() { return false; }
// Implement pure virtual methods of MediaChannel.
- virtual void OnPacketReceived(talk_base::Buffer* packet);
- virtual void OnRtcpReceived(talk_base::Buffer* packet) {}
+ virtual void OnPacketReceived(talk_base::Buffer* packet,
+ const talk_base::PacketTime& packet_time);
+ virtual void OnRtcpReceived(talk_base::Buffer* packet,
+ const talk_base::PacketTime& packet_time) {}
virtual void OnReadyToSend(bool ready) {}
virtual bool AddSendStream(const StreamParams& sp);
virtual bool RemoveSendStream(uint32 ssrc);
diff --git a/talk/media/base/filemediaengine_unittest.cc b/talk/media/base/filemediaengine_unittest.cc
index 7ba96a2..b1b021d 100644
--- a/talk/media/base/filemediaengine_unittest.cc
+++ b/talk/media/base/filemediaengine_unittest.cc
@@ -63,7 +63,7 @@
if (!packet) return false;
if (media_channel_) {
- media_channel_->OnPacketReceived(packet);
+ media_channel_->OnPacketReceived(packet, talk_base::PacketTime());
}
if (dump_writer_.get() &&
talk_base::SR_SUCCESS != dump_writer_->WriteRtpPacket(
diff --git a/talk/media/base/hybridvideoengine.cc b/talk/media/base/hybridvideoengine.cc
index a405f8d..6863311 100644
--- a/talk/media/base/hybridvideoengine.cc
+++ b/talk/media/base/hybridvideoengine.cc
@@ -276,19 +276,21 @@
active_channel_->GetStats(info);
}
-void HybridVideoMediaChannel::OnPacketReceived(talk_base::Buffer* packet) {
+void HybridVideoMediaChannel::OnPacketReceived(
+ talk_base::Buffer* packet, const talk_base::PacketTime& packet_time) {
// Eat packets until we have an active channel;
if (active_channel_) {
- active_channel_->OnPacketReceived(packet);
+ active_channel_->OnPacketReceived(packet, packet_time);
} else {
LOG(LS_INFO) << "HybridVideoChannel: Eating early RTP packet";
}
}
-void HybridVideoMediaChannel::OnRtcpReceived(talk_base::Buffer* packet) {
+void HybridVideoMediaChannel::OnRtcpReceived(
+ talk_base::Buffer* packet, const talk_base::PacketTime& packet_time) {
// Eat packets until we have an active channel;
if (active_channel_) {
- active_channel_->OnRtcpReceived(packet);
+ active_channel_->OnRtcpReceived(packet, packet_time);
} else {
LOG(LS_INFO) << "HybridVideoChannel: Eating early RTCP packet";
}
diff --git a/talk/media/base/hybridvideoengine.h b/talk/media/base/hybridvideoengine.h
index ab62cc7..a49a1aa 100644
--- a/talk/media/base/hybridvideoengine.h
+++ b/talk/media/base/hybridvideoengine.h
@@ -87,8 +87,10 @@
virtual bool GetStats(VideoMediaInfo* info);
- virtual void OnPacketReceived(talk_base::Buffer* packet);
- virtual void OnRtcpReceived(talk_base::Buffer* packet);
+ virtual void OnPacketReceived(talk_base::Buffer* packet,
+ const talk_base::PacketTime& packet_time);
+ virtual void OnRtcpReceived(talk_base::Buffer* packet,
+ const talk_base::PacketTime& packet_time);
virtual void OnReadyToSend(bool ready);
virtual void UpdateAspectRatio(int ratio_w, int ratio_h);
diff --git a/talk/media/base/mediachannel.h b/talk/media/base/mediachannel.h
index 9e1ea9d..94ae03f 100644
--- a/talk/media/base/mediachannel.h
+++ b/talk/media/base/mediachannel.h
@@ -509,9 +509,11 @@
}
// Called when a RTP packet is received.
- virtual void OnPacketReceived(talk_base::Buffer* packet) = 0;
+ virtual void OnPacketReceived(talk_base::Buffer* packet,
+ const talk_base::PacketTime& packet_time) = 0;
// Called when a RTCP packet is received.
- virtual void OnRtcpReceived(talk_base::Buffer* packet) = 0;
+ virtual void OnRtcpReceived(talk_base::Buffer* packet,
+ const talk_base::PacketTime& packet_time) = 0;
// Called when the socket's ability to send has changed.
virtual void OnReadyToSend(bool ready) = 0;
// Creates a new outgoing media stream with SSRCs and CNAME as described
@@ -1131,25 +1133,15 @@
virtual ~DataMediaChannel() {}
- virtual bool SetSendBandwidth(bool autobw, int bps) = 0;
virtual bool SetSendCodecs(const std::vector<DataCodec>& codecs) = 0;
virtual bool SetRecvCodecs(const std::vector<DataCodec>& codecs) = 0;
- virtual bool SetRecvRtpHeaderExtensions(
- const std::vector<RtpHeaderExtension>& extensions) = 0;
- virtual bool SetSendRtpHeaderExtensions(
- const std::vector<RtpHeaderExtension>& extensions) = 0;
- virtual bool AddSendStream(const StreamParams& sp) = 0;
- virtual bool RemoveSendStream(uint32 ssrc) = 0;
- virtual bool AddRecvStream(const StreamParams& sp) = 0;
- virtual bool RemoveRecvStream(uint32 ssrc) = 0;
+
virtual bool MuteStream(uint32 ssrc, bool on) { return false; }
// TODO(pthatcher): Implement this.
virtual bool GetStats(DataMediaInfo* info) { return true; }
virtual bool SetSend(bool send) = 0;
virtual bool SetReceive(bool receive) = 0;
- virtual void OnPacketReceived(talk_base::Buffer* packet) = 0;
- virtual void OnRtcpReceived(talk_base::Buffer* packet) = 0;
virtual bool SendData(
const SendDataParams& params,
diff --git a/talk/media/base/mediaengine.h b/talk/media/base/mediaengine.h
index f916572..c04df9f 100644
--- a/talk/media/base/mediaengine.h
+++ b/talk/media/base/mediaengine.h
@@ -135,6 +135,9 @@
virtual void SetVoiceLogging(int min_sev, const char* filter) = 0;
virtual void SetVideoLogging(int min_sev, const char* filter) = 0;
+ // Starts AEC dump using existing file.
+ virtual bool StartAecDump(FILE* file) = 0;
+
// Voice processors for effects.
virtual bool RegisterVoiceProcessor(uint32 ssrc,
VoiceProcessor* video_processor,
@@ -253,6 +256,10 @@
video_.SetLogging(min_sev, filter);
}
+ virtual bool StartAecDump(FILE* file) {
+ return voice_.StartAecDump(file);
+ }
+
virtual bool RegisterVoiceProcessor(uint32 ssrc,
VoiceProcessor* processor,
MediaProcessorDirection direction) {
diff --git a/talk/media/base/rtpdataengine.cc b/talk/media/base/rtpdataengine.cc
index 3a9228a..0f84c83 100644
--- a/talk/media/base/rtpdataengine.cc
+++ b/talk/media/base/rtpdataengine.cc
@@ -230,7 +230,8 @@
return true;
}
-void RtpDataMediaChannel::OnPacketReceived(talk_base::Buffer* packet) {
+void RtpDataMediaChannel::OnPacketReceived(
+ talk_base::Buffer* packet, const talk_base::PacketTime& packet_time) {
RtpHeader header;
if (!GetRtpHeader(packet->data(), packet->length(), &header)) {
// Don't want to log for every corrupt packet.
diff --git a/talk/media/base/rtpdataengine.h b/talk/media/base/rtpdataengine.h
index bc7b667..59e6589 100644
--- a/talk/media/base/rtpdataengine.h
+++ b/talk/media/base/rtpdataengine.h
@@ -115,8 +115,10 @@
receiving_ = receive;
return true;
}
- virtual void OnPacketReceived(talk_base::Buffer* packet);
- virtual void OnRtcpReceived(talk_base::Buffer* packet) {}
+ virtual void OnPacketReceived(talk_base::Buffer* packet,
+ const talk_base::PacketTime& packet_time);
+ virtual void OnRtcpReceived(talk_base::Buffer* packet,
+ const talk_base::PacketTime& packet_time) {}
virtual void OnReadyToSend(bool ready) {}
virtual bool SendData(
const SendDataParams& params,
diff --git a/talk/media/base/rtpdataengine_unittest.cc b/talk/media/base/rtpdataengine_unittest.cc
index bc46818..a86ab3b 100644
--- a/talk/media/base/rtpdataengine_unittest.cc
+++ b/talk/media/base/rtpdataengine_unittest.cc
@@ -423,13 +423,13 @@
talk_base::scoped_ptr<cricket::RtpDataMediaChannel> dmc(CreateChannel());
// SetReceived not called.
- dmc->OnPacketReceived(&packet);
+ dmc->OnPacketReceived(&packet, talk_base::PacketTime());
EXPECT_FALSE(HasReceivedData());
dmc->SetReceive(true);
// Unknown payload id
- dmc->OnPacketReceived(&packet);
+ dmc->OnPacketReceived(&packet, talk_base::PacketTime());
EXPECT_FALSE(HasReceivedData());
cricket::DataCodec codec;
@@ -440,7 +440,7 @@
ASSERT_TRUE(dmc->SetRecvCodecs(codecs));
// Unknown stream
- dmc->OnPacketReceived(&packet);
+ dmc->OnPacketReceived(&packet, talk_base::PacketTime());
EXPECT_FALSE(HasReceivedData());
cricket::StreamParams stream;
@@ -448,7 +448,7 @@
ASSERT_TRUE(dmc->AddRecvStream(stream));
// Finally works!
- dmc->OnPacketReceived(&packet);
+ dmc->OnPacketReceived(&packet, talk_base::PacketTime());
EXPECT_TRUE(HasReceivedData());
EXPECT_EQ("abcde", GetReceivedData());
EXPECT_EQ(5U, GetReceivedDataLen());
@@ -463,6 +463,6 @@
talk_base::scoped_ptr<cricket::RtpDataMediaChannel> dmc(CreateChannel());
// Too short
- dmc->OnPacketReceived(&packet);
+ dmc->OnPacketReceived(&packet, talk_base::PacketTime());
EXPECT_FALSE(HasReceivedData());
}
diff --git a/talk/media/base/videoengine_unittest.h b/talk/media/base/videoengine_unittest.h
index 95d8f6c..d9266f2 100644
--- a/talk/media/base/videoengine_unittest.h
+++ b/talk/media/base/videoengine_unittest.h
@@ -981,7 +981,7 @@
EXPECT_TRUE(SetSend(true));
EXPECT_TRUE(channel_->SetRender(true));
EXPECT_EQ(0, renderer_.num_rendered_frames());
- channel_->OnPacketReceived(&packet1);
+ channel_->OnPacketReceived(&packet1, talk_base::PacketTime());
SetRendererAsDefault();
EXPECT_TRUE(SendFrame());
EXPECT_FRAME_WAIT(1, DefaultCodec().width, DefaultCodec().height, kTimeout);