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/session/media/channel.cc b/talk/session/media/channel.cc
index 8579db2..9a8559a 100644
--- a/talk/session/media/channel.cc
+++ b/talk/session/media/channel.cc
@@ -610,7 +610,9 @@
}
void BaseChannel::OnChannelRead(TransportChannel* channel,
- const char* data, size_t len, int flags) {
+ const char* data, size_t len,
+ const talk_base::PacketTime& packet_time,
+ int flags) {
// OnChannelRead gets called from P2PSocket; now pass data to MediaEngine
ASSERT(worker_thread_ == talk_base::Thread::Current());
@@ -618,7 +620,7 @@
// transport. We feed RTP traffic into the demuxer to determine if it is RTCP.
bool rtcp = PacketIsRtcp(channel, data, len);
talk_base::Buffer packet(data, len);
- HandlePacket(rtcp, &packet);
+ HandlePacket(rtcp, &packet, packet_time);
}
void BaseChannel::OnReadyToSend(TransportChannel* channel) {
@@ -774,7 +776,8 @@
return true;
}
-void BaseChannel::HandlePacket(bool rtcp, talk_base::Buffer* packet) {
+void BaseChannel::HandlePacket(bool rtcp, talk_base::Buffer* packet,
+ const talk_base::PacketTime& packet_time) {
if (!WantsPacket(rtcp, packet)) {
return;
}
@@ -843,9 +846,9 @@
// Push it down to the media channel.
if (!rtcp) {
- media_channel_->OnPacketReceived(packet);
+ media_channel_->OnPacketReceived(packet, packet_time);
} else {
- media_channel_->OnRtcpReceived(packet);
+ media_channel_->OnRtcpReceived(packet, packet_time);
}
}
@@ -1645,8 +1648,10 @@
}
void VoiceChannel::OnChannelRead(TransportChannel* channel,
- const char* data, size_t len, int flags) {
- BaseChannel::OnChannelRead(channel, data, len, flags);
+ const char* data, size_t len,
+ const talk_base::PacketTime& packet_time,
+ int flags) {
+ BaseChannel::OnChannelRead(channel, data, len, packet_time, flags);
// Set a flag when we've received an RTP packet. If we're waiting for early
// media, this will disable the timeout.
diff --git a/talk/session/media/channel.h b/talk/session/media/channel.h
index 27a81a6..d297ee4 100644
--- a/talk/session/media/channel.h
+++ b/talk/session/media/channel.h
@@ -265,8 +265,11 @@
// From TransportChannel
void OnWritableState(TransportChannel* channel);
- virtual void OnChannelRead(TransportChannel* channel, const char* data,
- size_t len, int flags);
+ virtual void OnChannelRead(TransportChannel* channel,
+ const char* data,
+ size_t len,
+ const talk_base::PacketTime& packet_time,
+ int flags);
void OnReadyToSend(TransportChannel* channel);
bool PacketIsRtcp(const TransportChannel* channel, const char* data,
@@ -274,7 +277,8 @@
bool SendPacket(bool rtcp, talk_base::Buffer* packet,
talk_base::DiffServCodePoint dscp);
virtual bool WantsPacket(bool rtcp, talk_base::Buffer* packet);
- void HandlePacket(bool rtcp, talk_base::Buffer* packet);
+ void HandlePacket(bool rtcp, talk_base::Buffer* packet,
+ const talk_base::PacketTime& packet_time);
// Apply the new local/remote session description.
void OnNewLocalDescription(BaseSession* session, ContentAction action);
@@ -441,7 +445,9 @@
private:
// overrides from BaseChannel
virtual void OnChannelRead(TransportChannel* channel,
- const char* data, size_t len, int flags);
+ const char* data, size_t len,
+ const talk_base::PacketTime& packet_time,
+ int flags);
virtual void ChangeState();
virtual const ContentInfo* GetFirstContent(const SessionDescription* sdesc);
virtual bool SetLocalContent_w(const MediaContentDescription* content,
diff --git a/talk/session/media/channel_unittest.cc b/talk/session/media/channel_unittest.cc
index 0273907..48a9bde 100644
--- a/talk/session/media/channel_unittest.cc
+++ b/talk/session/media/channel_unittest.cc
@@ -1775,7 +1775,7 @@
channel2_->transport_channel();
transport_channel->SignalReadPacket(
transport_channel, reinterpret_cast<const char*>(kBadPacket),
- sizeof(kBadPacket), 0);
+ sizeof(kBadPacket), talk_base::PacketTime(), 0);
EXPECT_EQ_WAIT(T::MediaChannel::ERROR_PLAY_SRTP_ERROR, error_, 500);
}
diff --git a/talk/session/media/channelmanager.cc b/talk/session/media/channelmanager.cc
index d4fcc79..4d5d8fc 100644
--- a/talk/session/media/channelmanager.cc
+++ b/talk/session/media/channelmanager.cc
@@ -947,4 +947,9 @@
return true;
}
+bool ChannelManager::StartAecDump(FILE* file) {
+ return worker_thread_->Invoke<bool>(
+ Bind(&MediaEngineInterface::StartAecDump, media_engine_.get(), file));
+}
+
} // namespace cricket
diff --git a/talk/session/media/channelmanager.h b/talk/session/media/channelmanager.h
index fdb8f73..f19d3d0 100644
--- a/talk/session/media/channelmanager.h
+++ b/talk/session/media/channelmanager.h
@@ -214,6 +214,9 @@
void SetVideoCaptureDeviceMaxFormat(const std::string& usb_id,
const VideoFormat& max_format);
+ // Starts AEC dump using existing file.
+ bool StartAecDump(FILE* file);
+
sigslot::repeater0<> SignalDevicesChange;
sigslot::signal2<VideoCapturer*, CaptureState> SignalVideoCaptureStateChange;