diff --git a/webrtc/video_engine/internal/video_call.cc b/webrtc/video_engine/internal/call.cc similarity index 81% rename from webrtc/video_engine/internal/video_call.cc rename to webrtc/video_engine/internal/call.cc index 6e50395c0..acb65bf03 100644 --- a/webrtc/video_engine/internal/video_call.cc +++ b/webrtc/video_engine/internal/call.cc @@ -8,7 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "webrtc/video_engine/internal/video_call.h" +#include "webrtc/video_engine/internal/call.h" #include #include @@ -24,17 +24,16 @@ namespace webrtc { -VideoCall* VideoCall::Create(const VideoCall::Config& config) { - webrtc::VideoEngine* video_engine = webrtc::VideoEngine::Create(); +Call* Call::Create(const Call::Config& config) { + VideoEngine* video_engine = VideoEngine::Create(); assert(video_engine != NULL); - return new internal::VideoCall(video_engine, config); + return new internal::Call(video_engine, config); } namespace internal { -VideoCall::VideoCall(webrtc::VideoEngine* video_engine, - const VideoCall::Config& config) +Call::Call(webrtc::VideoEngine* video_engine, const Call::Config& config) : config_(config), receive_lock_(RWLockWrapper::CreateRWLock()), send_lock_(RWLockWrapper::CreateRWLock()), @@ -50,15 +49,15 @@ VideoCall::VideoCall(webrtc::VideoEngine* video_engine, assert(codec_ != NULL); } -VideoCall::~VideoCall() { +Call::~Call() { codec_->Release(); rtp_rtcp_->Release(); webrtc::VideoEngine::Delete(video_engine_); } -PacketReceiver* VideoCall::Receiver() { return this; } +PacketReceiver* Call::Receiver() { return this; } -std::vector VideoCall::GetVideoCodecs() { +std::vector Call::GetVideoCodecs() { std::vector codecs; VideoCodec codec; @@ -70,14 +69,13 @@ std::vector VideoCall::GetVideoCodecs() { return codecs; } -VideoSendStream::Config VideoCall::GetDefaultSendConfig() { +VideoSendStream::Config Call::GetDefaultSendConfig() { VideoSendStream::Config config; codec_->GetCodec(0, config.codec); return config; } -VideoSendStream* VideoCall::CreateSendStream( - const VideoSendStream::Config& config) { +VideoSendStream* Call::CreateSendStream(const VideoSendStream::Config& config) { assert(config.rtp.ssrcs.size() > 0); assert(config.codec.numberOfSimulcastStreams == 0 || config.codec.numberOfSimulcastStreams == config.rtp.ssrcs.size()); @@ -93,8 +91,7 @@ VideoSendStream* VideoCall::CreateSendStream( return send_stream; } -SendStreamState* VideoCall::DestroySendStream( - webrtc::VideoSendStream* send_stream) { +SendStreamState* Call::DestroySendStream(webrtc::VideoSendStream* send_stream) { assert(send_stream != NULL); VideoSendStream* send_stream_impl = NULL; @@ -119,11 +116,11 @@ SendStreamState* VideoCall::DestroySendStream( return NULL; } -VideoReceiveStream::Config VideoCall::GetDefaultReceiveConfig() { +VideoReceiveStream::Config Call::GetDefaultReceiveConfig() { return VideoReceiveStream::Config(); } -VideoReceiveStream* VideoCall::CreateReceiveStream( +VideoReceiveStream* Call::CreateReceiveStream( const VideoReceiveStream::Config& config) { VideoReceiveStream* receive_stream = new VideoReceiveStream(video_engine_, config, config_.send_transport); @@ -134,8 +131,7 @@ VideoReceiveStream* VideoCall::CreateReceiveStream( return receive_stream; } -void VideoCall::DestroyReceiveStream( - webrtc::VideoReceiveStream* receive_stream) { +void Call::DestroyReceiveStream(webrtc::VideoReceiveStream* receive_stream) { assert(receive_stream != NULL); VideoReceiveStream* receive_stream_impl = NULL; @@ -157,17 +153,17 @@ void VideoCall::DestroyReceiveStream( delete receive_stream_impl; } -uint32_t VideoCall::SendBitrateEstimate() { +uint32_t Call::SendBitrateEstimate() { // TODO(pbos): Return send-bitrate estimate return 0; } -uint32_t VideoCall::ReceiveBitrateEstimate() { +uint32_t Call::ReceiveBitrateEstimate() { // TODO(pbos): Return receive-bitrate estimate return 0; } -bool VideoCall::DeliverRtcp(const uint8_t* packet, size_t length) { +bool Call::DeliverRtcp(const uint8_t* packet, size_t length) { // TODO(pbos): Figure out what channel needs it actually. // Do NOT broadcast! Also make sure it's a valid packet. bool rtcp_delivered = false; @@ -199,9 +195,9 @@ bool VideoCall::DeliverRtcp(const uint8_t* packet, size_t length) { return rtcp_delivered; } -bool VideoCall::DeliverRtp(const RTPHeader& header, - const uint8_t* packet, - size_t length) { +bool Call::DeliverRtp(const RTPHeader& header, + const uint8_t* packet, + size_t length) { VideoReceiveStream* receiver; { ReadLockScoped read_lock(*receive_lock_); @@ -217,7 +213,7 @@ bool VideoCall::DeliverRtp(const RTPHeader& header, return receiver->DeliverRtp(static_cast(packet), length); } -bool VideoCall::DeliverPacket(const uint8_t* packet, size_t length) { +bool Call::DeliverPacket(const uint8_t* packet, size_t length) { // TODO(pbos): ExtensionMap if there are extensions. if (RtpHeaderParser::IsRtcp(packet, static_cast(length))) return DeliverRtcp(packet, length); diff --git a/webrtc/video_engine/internal/video_call.h b/webrtc/video_engine/internal/call.h similarity index 80% rename from webrtc/video_engine/internal/video_call.h rename to webrtc/video_engine/internal/call.h index a271d4827..13cdd893b 100644 --- a/webrtc/video_engine/internal/video_call.h +++ b/webrtc/video_engine/internal/call.h @@ -7,8 +7,8 @@ * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ -#ifndef WEBRTC_VIDEO_ENGINE_VIDEO_CALL_IMPL_H_ -#define WEBRTC_VIDEO_ENGINE_VIDEO_CALL_IMPL_H_ +#ifndef WEBRTC_VIDEO_ENGINE_CALL_IMPL_H_ +#define WEBRTC_VIDEO_ENGINE_CALL_IMPL_H_ #include #include @@ -18,7 +18,7 @@ #include "webrtc/system_wrappers/interface/scoped_ptr.h" #include "webrtc/video_engine/internal/video_receive_stream.h" #include "webrtc/video_engine/internal/video_send_stream.h" -#include "webrtc/video_engine/new_include/video_call.h" +#include "webrtc/video_engine/new_include/call.h" namespace webrtc { @@ -30,11 +30,10 @@ namespace internal { // TODO(pbos): Split out the packet receiver, should be sharable between // VideoEngine and VoiceEngine. -class VideoCall : public webrtc::VideoCall, public PacketReceiver { +class Call : public webrtc::Call, public PacketReceiver { public: - VideoCall(webrtc::VideoEngine* video_engine, - const VideoCall::Config& config); - virtual ~VideoCall(); + Call(webrtc::VideoEngine* video_engine, const Call::Config& config); + virtual ~Call(); virtual PacketReceiver* Receiver() OVERRIDE; virtual std::vector GetVideoCodecs() OVERRIDE; @@ -52,8 +51,8 @@ class VideoCall : public webrtc::VideoCall, public PacketReceiver { virtual VideoReceiveStream* CreateReceiveStream( const VideoReceiveStream::Config& config) OVERRIDE; - virtual void DestroyReceiveStream(webrtc::VideoReceiveStream* receive_stream) - OVERRIDE; + virtual void DestroyReceiveStream( + webrtc::VideoReceiveStream* receive_stream) OVERRIDE; virtual uint32_t SendBitrateEstimate() OVERRIDE; virtual uint32_t ReceiveBitrateEstimate() OVERRIDE; @@ -66,7 +65,7 @@ class VideoCall : public webrtc::VideoCall, public PacketReceiver { const uint8_t* packet, size_t length); - VideoCall::Config config_; + Call::Config config_; std::map receive_ssrcs_; scoped_ptr receive_lock_; @@ -80,9 +79,9 @@ class VideoCall : public webrtc::VideoCall, public PacketReceiver { ViERTP_RTCP* rtp_rtcp_; ViECodec* codec_; - DISALLOW_COPY_AND_ASSIGN(VideoCall); + DISALLOW_COPY_AND_ASSIGN(Call); }; } // namespace internal } // namespace webrtc -#endif // WEBRTC_VIDEO_ENGINE_INTERNAL_VIDEO_CALL_H_ +#endif // WEBRTC_VIDEO_ENGINE_INTERNAL_CALL_H_ diff --git a/webrtc/video_engine/new_include/video_call.h b/webrtc/video_engine/new_include/call.h similarity index 84% rename from webrtc/video_engine/new_include/video_call.h rename to webrtc/video_engine/new_include/call.h index 96a93e5c6..665021631 100644 --- a/webrtc/video_engine/new_include/video_call.h +++ b/webrtc/video_engine/new_include/call.h @@ -7,8 +7,8 @@ * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ -#ifndef WEBRTC_VIDEO_ENGINE_NEW_INCLUDE_VIDEO_CALL_H_ -#define WEBRTC_VIDEO_ENGINE_NEW_INCLUDE_VIDEO_CALL_H_ +#ifndef WEBRTC_VIDEO_ENGINE_NEW_INCLUDE_CALL_H_ +#define WEBRTC_VIDEO_ENGINE_NEW_INCLUDE_CALL_H_ #include #include @@ -31,10 +31,10 @@ class PacketReceiver { virtual ~PacketReceiver() {} }; -// A VideoCall instance can contain several send and/or receive streams. All -// streams are assumed to have the same remote endpoint and will share bitrate -// estimates etc. -class VideoCall { +// A Call instance can contain several send and/or receive streams. All streams +// are assumed to have the same remote endpoint and will share bitrate estimates +// etc. +class Call { public: struct Config { explicit Config(newapi::Transport* send_transport) @@ -47,14 +47,14 @@ class VideoCall { newapi::Transport* send_transport; bool overuse_detection; - // VoiceEngine used for audio/video synchronization for this VideoCall. + // VoiceEngine used for audio/video synchronization for this Call. VoiceEngine* voice_engine; TraceCallback* trace_callback; uint32_t trace_filter; }; - static VideoCall* Create(const VideoCall::Config& config); + static Call* Create(const Call::Config& config); virtual std::vector GetVideoCodecs() = 0; @@ -76,7 +76,7 @@ class VideoCall { // All received RTP and RTCP packets for the call should be inserted to this // PacketReceiver. The PacketReceiver pointer is valid as long as the - // VideoCall instance exists. + // Call instance exists. virtual PacketReceiver* Receiver() = 0; // Returns the estimated total send bandwidth. Note: this can differ from the @@ -87,8 +87,8 @@ class VideoCall { // differ from the actual receive bitrate. virtual uint32_t ReceiveBitrateEstimate() = 0; - virtual ~VideoCall() {} + virtual ~Call() {} }; } // namespace webrtc -#endif // WEBRTC_VIDEO_ENGINE_NEW_INCLUDE_VIDEO_CALL_H_ +#endif // WEBRTC_VIDEO_ENGINE_NEW_INCLUDE_CALL_H_ diff --git a/webrtc/video_engine/test/common/direct_transport.cc b/webrtc/video_engine/test/common/direct_transport.cc index 732440181..f4f364b14 100644 --- a/webrtc/video_engine/test/common/direct_transport.cc +++ b/webrtc/video_engine/test/common/direct_transport.cc @@ -10,7 +10,7 @@ #include "webrtc/video_engine/test/common/direct_transport.h" #include "testing/gtest/include/gtest/gtest.h" -#include "webrtc/video_engine/new_include/video_call.h" +#include "webrtc/video_engine/new_include/call.h" namespace webrtc { namespace test { diff --git a/webrtc/video_engine/test/engine_tests.cc b/webrtc/video_engine/test/engine_tests.cc index 3978c5241..4ba659ae2 100644 --- a/webrtc/video_engine/test/engine_tests.cc +++ b/webrtc/video_engine/test/engine_tests.cc @@ -21,7 +21,7 @@ #include "webrtc/system_wrappers/interface/critical_section_wrapper.h" #include "webrtc/system_wrappers/interface/scoped_ptr.h" #include "webrtc/system_wrappers/interface/event_wrapper.h" -#include "webrtc/video_engine/new_include/video_call.h" +#include "webrtc/video_engine/new_include/call.h" #include "webrtc/video_engine/test/common/direct_transport.h" #include "webrtc/video_engine/test/common/fake_decoder.h" #include "webrtc/video_engine/test/common/fake_encoder.h" @@ -35,7 +35,8 @@ namespace webrtc { class StreamObserver : public newapi::Transport, public RemoteBitrateObserver { public: typedef std::map BytesSentMap; - StreamObserver(int num_expected_ssrcs, newapi::Transport* feedback_transport, + StreamObserver(int num_expected_ssrcs, + newapi::Transport* feedback_transport, Clock* clock) : critical_section_(CriticalSectionWrapper::CreateCriticalSection()), all_ssrcs_sent_(EventWrapper::Create()), @@ -65,21 +66,19 @@ class StreamObserver : public newapi::Transport, public RemoteBitrateObserver { CriticalSectionScoped lock(critical_section_.get()); if (ssrcs.size() == num_expected_ssrcs_ && bitrate >= kExpectedBitrateBps) all_ssrcs_sent_->Set(); - rtp_rtcp_->SetREMBData(bitrate, static_cast(ssrcs.size()), - &ssrcs[0]); + rtp_rtcp_->SetREMBData( + bitrate, static_cast(ssrcs.size()), &ssrcs[0]); rtp_rtcp_->Process(); } virtual bool SendRTP(const uint8_t* packet, size_t length) OVERRIDE { CriticalSectionScoped lock(critical_section_.get()); RTPHeader header; - EXPECT_TRUE(rtp_parser_->Parse(packet, static_cast(length), - &header)); + EXPECT_TRUE(rtp_parser_->Parse(packet, static_cast(length), &header)); receive_stats_->IncomingPacket(header, length, false); rtp_rtcp_->SetRemoteSSRC(header.ssrc); - remote_bitrate_estimator_->IncomingPacket(clock_->TimeInMilliseconds(), - static_cast(length - 12), - header); + remote_bitrate_estimator_->IncomingPacket( + clock_->TimeInMilliseconds(), static_cast(length - 12), header); if (remote_bitrate_estimator_->TimeUntilNextProcess() <= 0) { remote_bitrate_estimator_->Process(); } @@ -90,9 +89,7 @@ class StreamObserver : public newapi::Transport, public RemoteBitrateObserver { return true; } - EventTypeWrapper Wait() { - return all_ssrcs_sent_->Wait(120 * 1000); - } + EventTypeWrapper Wait() { return all_ssrcs_sent_->Wait(120 * 1000); } private: class TransportWrapper : public webrtc::Transport { @@ -100,15 +97,18 @@ class StreamObserver : public newapi::Transport, public RemoteBitrateObserver { explicit TransportWrapper(newapi::Transport* new_transport) : new_transport_(new_transport) {} - virtual int SendPacket(int channel, const void *data, int len) OVERRIDE { - return new_transport_->SendRTP(static_cast(data), len) ? - len : -1; + virtual int SendPacket(int channel, const void* data, int len) OVERRIDE { + return new_transport_->SendRTP(static_cast(data), len) + ? len + : -1; } - virtual int SendRTCPPacket(int channel, const void *data, + virtual int SendRTCPPacket(int channel, + const void* data, int len) OVERRIDE { - return new_transport_->SendRTCP(static_cast(data), len) ? - len : -1; + return new_transport_->SendRTCP(static_cast(data), len) + ? len + : -1; } private: @@ -130,9 +130,7 @@ class StreamObserver : public newapi::Transport, public RemoteBitrateObserver { class RampUpTest : public ::testing::TestWithParam { public: - virtual void SetUp() { - reserved_ssrcs_.clear(); - } + virtual void SetUp() { reserved_ssrcs_.clear(); } protected: std::map reserved_ssrcs_; @@ -140,12 +138,11 @@ class RampUpTest : public ::testing::TestWithParam { TEST_P(RampUpTest, RampUpWithPadding) { test::DirectTransport receiver_transport; - StreamObserver stream_observer(3, &receiver_transport, - Clock::GetRealTimeClock()); - VideoCall::Config call_config(&stream_observer); - scoped_ptr call(VideoCall::Create(call_config)); - VideoSendStream::Config send_config = - call->GetDefaultSendConfig(); + StreamObserver stream_observer( + 3, &receiver_transport, Clock::GetRealTimeClock()); + Call::Config call_config(&stream_observer); + scoped_ptr call(Call::Create(call_config)); + VideoSendStream::Config send_config = call->GetDefaultSendConfig(); receiver_transport.SetReceiver(call->Receiver()); @@ -157,22 +154,20 @@ TEST_P(RampUpTest, RampUpWithPadding) { test::GenerateRandomSsrcs(&send_config, &reserved_ssrcs_); - VideoSendStream* send_stream = - call->CreateSendStream(send_config); + VideoSendStream* send_stream = call->CreateSendStream(send_config); VideoReceiveStream::Config receive_config; receive_config.rtp.ssrc = send_config.rtp.ssrcs[0]; - receive_config.rtp.nack.rtp_history_ms = - send_config.rtp.nack.rtp_history_ms; - VideoReceiveStream* receive_stream = call->CreateReceiveStream( - receive_config); + receive_config.rtp.nack.rtp_history_ms = send_config.rtp.nack.rtp_history_ms; + VideoReceiveStream* receive_stream = + call->CreateReceiveStream(receive_config); scoped_ptr frame_generator_capturer( test::FrameGeneratorCapturer::Create( send_stream->Input(), - test::FrameGenerator::Create( - send_config.codec.width, send_config.codec.height, - Clock::GetRealTimeClock()), + test::FrameGenerator::Create(send_config.codec.width, + send_config.codec.height, + Clock::GetRealTimeClock()), 30)); receive_stream->StartReceive(); @@ -213,10 +208,10 @@ class EngineTest : public ::testing::TestWithParam { protected: void CreateCalls(newapi::Transport* sender_transport, newapi::Transport* receiver_transport) { - VideoCall::Config sender_config(sender_transport); - VideoCall::Config receiver_config(receiver_transport); - sender_call_.reset(VideoCall::Create(sender_config)); - receiver_call_.reset(VideoCall::Create(receiver_config)); + Call::Config sender_config(sender_transport); + Call::Config receiver_config(receiver_transport); + sender_call_.reset(Call::Create(sender_config)); + receiver_call_.reset(Call::Create(receiver_config)); } void CreateTestConfigs() { @@ -273,14 +268,14 @@ class EngineTest : public ::testing::TestWithParam { sender_call_->DestroySendStream(send_stream_); if (receive_stream_ != NULL) receiver_call_->DestroyReceiveStream(receive_stream_); - send_stream_= NULL; + send_stream_ = NULL; receive_stream_ = NULL; } void ReceivesPliAndRecovers(int rtp_history_ms); - scoped_ptr sender_call_; - scoped_ptr receiver_call_; + scoped_ptr sender_call_; + scoped_ptr receiver_call_; VideoSendStream::Config send_config_; VideoReceiveStream::Config receive_config_; @@ -310,6 +305,7 @@ class NackObserver : public test::RtpRtcpObserver { static const int kNumberOfNacksToObserve = 4; static const int kInverseProbabilityToStartLossBurst = 20; static const int kMaxLossBurst = 10; + public: NackObserver() : received_all_retransmissions_(EventWrapper::Create()), @@ -444,9 +440,10 @@ TEST_P(EngineTest, ReceivesAndRetransmitsNack) { class PliObserver : public test::RtpRtcpObserver { static const int kInverseDropProbability = 16; + public: - PliObserver(bool nack_enabled) : - renderer_(this), + PliObserver(bool nack_enabled) + : renderer_(this), rtp_header_parser_(RtpHeaderParser::Create()), nack_enabled_(nack_enabled), first_retransmitted_timestamp_(0), @@ -572,9 +569,7 @@ TEST_P(EngineTest, SurvivesIncomingRtpPacketsToDestroyedReceiveStream) { explicit PacketInputObserver(PacketReceiver* receiver) : receiver_(receiver), delivered_packet_(EventWrapper::Create()) {} - EventTypeWrapper Wait() { - return delivered_packet_->Wait(30 * 1000); - } + EventTypeWrapper Wait() { return delivered_packet_->Wait(30 * 1000); } private: virtual bool DeliverPacket(const uint8_t* packet, size_t length) { diff --git a/webrtc/video_engine/test/full_stack.cc b/webrtc/video_engine/test/full_stack.cc index 8c9e75541..365423f2c 100644 --- a/webrtc/video_engine/test/full_stack.cc +++ b/webrtc/video_engine/test/full_stack.cc @@ -23,7 +23,7 @@ #include "webrtc/system_wrappers/interface/scoped_ptr.h" #include "webrtc/test/testsupport/fileutils.h" #include "webrtc/typedefs.h" -#include "webrtc/video_engine/new_include/video_call.h" +#include "webrtc/video_engine/new_include/call.h" #include "webrtc/video_engine/test/common/direct_transport.h" #include "webrtc/video_engine/test/common/file_capturer.h" #include "webrtc/video_engine/test/common/frame_generator_capturer.h" @@ -47,14 +47,16 @@ struct FullStackTestParams { double avg_ssim_threshold; }; -FullStackTestParams paris_qcif = {"net_delay_0_0_plr_0", - {"paris_qcif", 176, 144, 30}, 300, 36.0, - 0.96}; +FullStackTestParams paris_qcif = { + "net_delay_0_0_plr_0", {"paris_qcif", 176, 144, 30}, 300, 36.0, 0.96}; // TODO(pbos): Decide on psnr/ssim thresholds for foreman_cif. -FullStackTestParams foreman_cif = {"foreman_cif_net_delay_0_0_plr_0", - {"foreman_cif", 352, 288, 30}, 700, 0.0, - 0.0}; +FullStackTestParams foreman_cif = { + "foreman_cif_net_delay_0_0_plr_0", + {"foreman_cif", 352, 288, 30}, + 700, + 0.0, + 0.0}; class FullStackTest : public ::testing::TestWithParam { protected: @@ -280,9 +282,9 @@ TEST_P(FullStackTest, DISABLED_NoPacketLoss) { params.avg_ssim_threshold, static_cast(FLAGS_seconds * params.clip.fps)); - VideoCall::Config call_config(&analyzer); + Call::Config call_config(&analyzer); - scoped_ptr call(VideoCall::Create(call_config)); + scoped_ptr call(Call::Create(call_config)); analyzer.receiver_ = call->Receiver(); transport.SetReceiver(&analyzer); @@ -314,8 +316,7 @@ TEST_P(FullStackTest, DISABLED_NoPacketLoss) { test_clock), params.clip.fps)); - VideoReceiveStream::Config receive_config = - call->GetDefaultReceiveConfig(); + VideoReceiveStream::Config receive_config = call->GetDefaultReceiveConfig(); receive_config.rtp.ssrc = send_config.rtp.ssrcs[0]; receive_config.renderer = &analyzer; diff --git a/webrtc/video_engine/test/loopback.cc b/webrtc/video_engine/test/loopback.cc index 19d99c19f..93f2d839b 100644 --- a/webrtc/video_engine/test/loopback.cc +++ b/webrtc/video_engine/test/loopback.cc @@ -17,7 +17,7 @@ #include "webrtc/system_wrappers/interface/clock.h" #include "webrtc/system_wrappers/interface/scoped_ptr.h" #include "webrtc/typedefs.h" -#include "webrtc/video_engine/new_include/video_call.h" +#include "webrtc/video_engine/new_include/call.h" #include "webrtc/video_engine/test/common/direct_transport.h" #include "webrtc/video_engine/test/common/flags.h" #include "webrtc/video_engine/test/common/generate_ssrcs.h" @@ -40,9 +40,9 @@ TEST_F(LoopbackTest, Test) { "Loopback Video", test::flags::Width(), test::flags::Height())); test::DirectTransport transport; - VideoCall::Config call_config(&transport); + Call::Config call_config(&transport); call_config.overuse_detection = true; - scoped_ptr call(VideoCall::Create(call_config)); + scoped_ptr call(Call::Create(call_config)); // Loopback, call sends to itself. transport.SetReceiver(call->Receiver()); @@ -74,8 +74,7 @@ TEST_F(LoopbackTest, Test) { test::flags::Fps(), test_clock)); - VideoReceiveStream::Config receive_config = - call->GetDefaultReceiveConfig(); + VideoReceiveStream::Config receive_config = call->GetDefaultReceiveConfig(); receive_config.rtp.ssrc = send_config.rtp.ssrcs[0]; receive_config.renderer = loopback_video.get(); diff --git a/webrtc/video_engine/test/send_stream_tests.cc b/webrtc/video_engine/test/send_stream_tests.cc index 1e1ac27c3..dcf2ec168 100644 --- a/webrtc/video_engine/test/send_stream_tests.cc +++ b/webrtc/video_engine/test/send_stream_tests.cc @@ -16,7 +16,7 @@ #include "webrtc/video_engine/test/common/frame_generator.h" #include "webrtc/video_engine/test/common/frame_generator_capturer.h" #include "webrtc/video_engine/test/common/null_transport.h" -#include "webrtc/video_engine/new_include/video_call.h" +#include "webrtc/video_engine/new_include/call.h" #include "webrtc/video_engine/new_include/video_send_stream.h" namespace webrtc { @@ -28,9 +28,7 @@ class SendTransportObserver : public test::NullTransport { send_test_complete_(EventWrapper::Create()), timeout_ms_(timeout_ms) {} - EventTypeWrapper Wait() { - return send_test_complete_->Wait(timeout_ms_); - } + EventTypeWrapper Wait() { return send_test_complete_->Wait(timeout_ms_); } protected: scoped_ptr rtp_header_parser_; @@ -43,9 +41,10 @@ class SendTransportObserver : public test::NullTransport { class VideoSendStreamTest : public ::testing::Test { public: VideoSendStreamTest() : fake_encoder_(Clock::GetRealTimeClock()) {} + protected: static const uint32_t kSendSsrc; - void RunSendTest(VideoCall* call, + void RunSendTest(Call* call, const VideoSendStream::Config& config, SendTransportObserver* observer) { VideoSendStream* send_stream = call->CreateSendStream(config); @@ -64,7 +63,7 @@ class VideoSendStreamTest : public ::testing::Test { call->DestroySendStream(send_stream); } - VideoSendStream::Config GetSendTestConfig(VideoCall* call) { + VideoSendStream::Config GetSendTestConfig(Call* call) { VideoSendStream::Config config = call->GetDefaultSendConfig(); config.encoder = &fake_encoder_; config.internal_source = false; @@ -94,8 +93,8 @@ TEST_F(VideoSendStreamTest, SendsSetSsrc) { } } observer; - VideoCall::Config call_config(&observer); - scoped_ptr call(VideoCall::Create(call_config)); + Call::Config call_config(&observer); + scoped_ptr call(Call::Create(call_config)); VideoSendStream::Config send_config = GetSendTestConfig(call.get()); send_config.rtp.ssrcs.push_back(kSendSsrc); @@ -127,8 +126,8 @@ TEST_F(VideoSendStreamTest, SupportsCName) { } } observer; - VideoCall::Config call_config(&observer); - scoped_ptr call(VideoCall::Create(call_config)); + Call::Config call_config(&observer); + scoped_ptr call(Call::Create(call_config)); VideoSendStream::Config send_config = GetSendTestConfig(call.get()); send_config.rtp.ssrcs.push_back(kSendSsrc); diff --git a/webrtc/video_engine/video_engine_core.gypi b/webrtc/video_engine/video_engine_core.gypi index 29849fa8c..5c7876ab4 100644 --- a/webrtc/video_engine/video_engine_core.gypi +++ b/webrtc/video_engine/video_engine_core.gypi @@ -115,16 +115,16 @@ 'vie_sync_module.cc', # New VideoEngine API - 'internal/video_call.cc', - 'internal/video_call.h', + 'internal/call.cc', + 'internal/call.h', 'internal/video_receive_stream.cc', 'internal/video_receive_stream.h', 'internal/video_send_stream.cc', 'internal/video_send_stream.h', + 'new_include/call.h', 'new_include/config.h', 'new_include/frame_callback.h', 'new_include/transport.h', - 'new_include/video_call.h', 'new_include/video_receive_stream.h', 'new_include/video_renderer.h', 'new_include/video_send_stream.h',