(Auto)update libjingle 74128148-> 74132319
git-svn-id: http://webrtc.googlecode.com/svn/trunk@6982 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/talk/media/webrtc/webrtcvideoengine.cc b/talk/media/webrtc/webrtcvideoengine.cc
index e9edf73..ed40911 100644
--- a/talk/media/webrtc/webrtcvideoengine.cc
+++ b/talk/media/webrtc/webrtcvideoengine.cc
@@ -2208,6 +2208,9 @@
return true;
}
if (!GetSendChannelBySsrcKey(local_ssrc)) {
+ // If a stream has multiple ssrcs, the local_ssrc could be any of
+ // them, but we use the first one (StreamParams::first_ssrc()) as
+ // the key.
for (SendChannelMap::iterator iter = send_channels_.begin();
iter != send_channels_.end(); ++iter) {
WebRtcVideoChannelSendInfo* send_channel = iter->second;
diff --git a/talk/media/webrtc/webrtcvideoengine.h b/talk/media/webrtc/webrtcvideoengine.h
index dac1aa4..4e41809 100644
--- a/talk/media/webrtc/webrtcvideoengine.h
+++ b/talk/media/webrtc/webrtcvideoengine.h
@@ -42,6 +42,9 @@
#if !defined(LIBPEERCONNECTION_LIB) && \
!defined(LIBPEERCONNECTION_IMPLEMENTATION)
+// If you hit this, then you've tried to include this header from outside
+// a shared library. An instance of this class must only be created from
+// within the library that actually implements it.
#error "Bogus include."
#endif
@@ -109,7 +112,8 @@
bool SetDefaultEncoderConfig(const VideoEncoderConfig& config);
VideoEncoderConfig GetDefaultEncoderConfig() const;
- WebRtcVideoMediaChannel* CreateChannel(VoiceMediaChannel* voice_channel);
+ virtual WebRtcVideoMediaChannel* CreateChannel(
+ VoiceMediaChannel* voice_channel);
const std::vector<VideoCodec>& codecs() const;
const std::vector<RtpHeaderExtension>& rtp_header_extensions() const;
@@ -214,6 +218,9 @@
WebRtcVoiceEngine* voice_engine_;
rtc::scoped_ptr<webrtc::VideoRender> render_module_;
WebRtcVideoEncoderFactory* encoder_factory_;
+ // If the engine owns the encoder factory, set it here so it will be
+ // deleted.
+ rtc::scoped_ptr<WebRtcVideoEncoderFactory> owned_encoder_factory_;
WebRtcVideoDecoderFactory* decoder_factory_;
std::vector<VideoCodec> video_codecs_;
std::vector<RtpHeaderExtension> rtp_header_extensions_;
@@ -367,9 +374,10 @@
// Returns the ssrc key corresponding to the provided local SSRC in
// |ssrc_key|. The return value is true upon success. If the local
// ssrc correspond to that of the default channel the key is
- // kDefaultChannelSsrcKey.
- // For all other channels the returned ssrc key will be the same as
- // the local ssrc.
+ // kDefaultChannelSsrcKey. For all other channels the returned ssrc
+ // key will be the same as the local ssrc. If a stream has more
+ // than one ssrc, the first (corresponding to
+ // StreamParams::first_ssrc()) is used as the key.
bool GetSendChannelSsrcKey(uint32 local_ssrc, uint32* ssrc_key);
WebRtcVideoChannelSendInfo* GetDefaultSendChannel();
WebRtcVideoChannelSendInfo* GetSendChannelBySsrcKey(uint32 ssrc_key);
diff --git a/talk/media/webrtc/webrtcvideoengine_unittest.cc b/talk/media/webrtc/webrtcvideoengine_unittest.cc
index 11edd05..c621d6d 100644
--- a/talk/media/webrtc/webrtcvideoengine_unittest.cc
+++ b/talk/media/webrtc/webrtcvideoengine_unittest.cc
@@ -26,22 +26,16 @@
*/
#include "talk/media/base/constants.h"
-#include "talk/media/base/fakemediaprocessor.h"
#include "talk/media/base/fakenetworkinterface.h"
-#include "talk/media/base/fakevideorenderer.h"
#include "talk/media/base/mediachannel.h"
#include "talk/media/base/testutils.h"
-#include "talk/media/base/videoadapter.h"
#include "talk/media/base/videoengine_unittest.h"
-#include "talk/media/webrtc/fakewebrtcvideocapturemodule.h"
#include "talk/media/webrtc/fakewebrtcvideoengine.h"
-#include "talk/media/webrtc/fakewebrtcvoiceengine.h"
#include "webrtc/base/fakecpumonitor.h"
#include "webrtc/base/gunit.h"
#include "webrtc/base/logging.h"
#include "webrtc/base/scoped_ptr.h"
#include "webrtc/base/stream.h"
-#include "talk/media/webrtc/webrtcvideocapturer.h"
#include "talk/media/webrtc/webrtcvideoengine.h"
#include "talk/media/webrtc/webrtcvideoframe.h"
#include "talk/media/webrtc/webrtcvoiceengine.h"
@@ -54,9 +48,6 @@
using cricket::kRtpAbsoluteSenderTimeHeaderExtension;
static const cricket::VideoCodec kVP8Codec720p(100, "VP8", 1280, 720, 30, 0);
-static const cricket::VideoCodec kVP8Codec360p(100, "VP8", 640, 360, 30, 0);
-static const cricket::VideoCodec kVP8Codec270p(100, "VP8", 480, 270, 30, 0);
-static const cricket::VideoCodec kVP8Codec180p(100, "VP8", 320, 180, 30, 0);
static const cricket::VideoCodec kVP8Codec(100, "VP8", 640, 400, 30, 0);
static const cricket::VideoCodec kH264Codec(127, "H264", 640, 400, 30, 0);
@@ -78,7 +69,6 @@
static const uint32 kRtxSsrcs1[] = {4};
static const uint32 kRtxSsrcs3[] = {4, 5, 6};
-
class FakeViEWrapper : public cricket::ViEWrapper {
public:
explicit FakeViEWrapper(cricket::FakeWebRtcVideoEngine* engine)
@@ -1556,7 +1546,6 @@
768, kMinBandwidthKbps, kStartBandwidthKbps);
}
-
// Test that sending screencast frames doesn't change bitrate.
TEST_F(WebRtcVideoEngineTestFake, SetBandwidthScreencast) {
EXPECT_TRUE(SetupEngine());
@@ -1576,7 +1565,6 @@
VerifyVP8SendCodec(channel_num, kVP8Codec.width, kVP8Codec.height, 0, 111);
}
-
// Test SetSendSsrc.
TEST_F(WebRtcVideoEngineTestFake, SetSendSsrcAndCname) {
EXPECT_TRUE(SetupEngine());
@@ -1597,7 +1585,6 @@
EXPECT_STREQ("cname", rtcp_cname);
}
-
// Test that the local SSRC is the same on sending and receiving channels if the
// receive channel is created before the send channel.
TEST_F(WebRtcVideoEngineTestFake, SetSendSsrcAfterCreatingReceiveChannel) {
@@ -1618,7 +1605,6 @@
EXPECT_EQ(1, vie_.GetNumSsrcs(receive_channel_num));
}
-
// Test SetOptions with denoising flag.
TEST_F(WebRtcVideoEngineTestFake, SetOptionsWithDenoising) {
EXPECT_TRUE(SetupEngine());
@@ -1707,7 +1693,6 @@
EXPECT_EQ(-1, vie_.GetIncomingFrameNum(channel1));
}
-
TEST_F(WebRtcVideoEngineTestFake, SendReceiveBitratesStats) {
EXPECT_TRUE(SetupEngine());
cricket::VideoOptions options;
@@ -1839,7 +1824,6 @@
EXPECT_EQ(high, 1.0f);
}
-
TEST_F(WebRtcVideoEngineTestFake, ResetCodecOnScreencast) {
EXPECT_TRUE(SetupEngine());
cricket::VideoOptions options;
@@ -1870,7 +1854,6 @@
EXPECT_FALSE(gcodec.codecSpecific.VP8.denoisingOn);
}
-
TEST_F(WebRtcVideoEngineTestFake, DontRegisterDecoderIfFactoryIsNotGiven) {
engine_.SetExternalDecoderFactory(NULL);
EXPECT_TRUE(SetupEngine());
@@ -2574,7 +2557,6 @@
Base::RejectEmptyStreamParams();
}
-
TEST_F(WebRtcVideoMediaChannelTest, AdaptResolution16x10) {
Base::AdaptResolution16x10();
}