Rename VideoCall to Call.

Call should encompass more than video, there's no point in calling it
VideoCall.

BUG=
R=mflodman@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/2191005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@4704 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
pbos@webrtc.org 2013-09-09 15:04:25 +00:00
parent 86136a0e8f
commit 841c8a44bb
9 changed files with 115 additions and 126 deletions

View File

@ -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 <assert.h>
#include <string.h>
@ -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<VideoCodec> VideoCall::GetVideoCodecs() {
std::vector<VideoCodec> Call::GetVideoCodecs() {
std::vector<VideoCodec> codecs;
VideoCodec codec;
@ -70,14 +69,13 @@ std::vector<VideoCodec> 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,7 +195,7 @@ bool VideoCall::DeliverRtcp(const uint8_t* packet, size_t length) {
return rtcp_delivered;
}
bool VideoCall::DeliverRtp(const RTPHeader& header,
bool Call::DeliverRtp(const RTPHeader& header,
const uint8_t* packet,
size_t length) {
VideoReceiveStream* receiver;
@ -217,7 +213,7 @@ bool VideoCall::DeliverRtp(const RTPHeader& header,
return receiver->DeliverRtp(static_cast<const uint8_t*>(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<int>(length)))
return DeliverRtcp(packet, length);

View File

@ -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 <map>
#include <vector>
@ -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<VideoCodec> 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<uint32_t, VideoReceiveStream*> receive_ssrcs_;
scoped_ptr<RWLockWrapper> 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_

View File

@ -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 <string>
#include <vector>
@ -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<VideoCodec> 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_

View File

@ -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 {

View File

@ -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<uint32_t, int> 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<uint8_t>(ssrcs.size()),
&ssrcs[0]);
rtp_rtcp_->SetREMBData(
bitrate, static_cast<uint8_t>(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<int>(length),
&header));
EXPECT_TRUE(rtp_parser_->Parse(packet, static_cast<int>(length), &header));
receive_stats_->IncomingPacket(header, length, false);
rtp_rtcp_->SetRemoteSSRC(header.ssrc);
remote_bitrate_estimator_->IncomingPacket(clock_->TimeInMilliseconds(),
static_cast<int>(length - 12),
header);
remote_bitrate_estimator_->IncomingPacket(
clock_->TimeInMilliseconds(), static_cast<int>(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 {
@ -101,14 +98,17 @@ class StreamObserver : public newapi::Transport, public RemoteBitrateObserver {
: new_transport_(new_transport) {}
virtual int SendPacket(int channel, const void* data, int len) OVERRIDE {
return new_transport_->SendRTP(static_cast<const uint8_t*>(data), len) ?
len : -1;
return new_transport_->SendRTP(static_cast<const uint8_t*>(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<const uint8_t*>(data), len) ?
len : -1;
return new_transport_->SendRTCP(static_cast<const uint8_t*>(data), len)
? len
: -1;
}
private:
@ -130,9 +130,7 @@ class StreamObserver : public newapi::Transport, public RemoteBitrateObserver {
class RampUpTest : public ::testing::TestWithParam<bool> {
public:
virtual void SetUp() {
reserved_ssrcs_.clear();
}
virtual void SetUp() { reserved_ssrcs_.clear(); }
protected:
std::map<uint32_t, bool> reserved_ssrcs_;
@ -140,12 +138,11 @@ class RampUpTest : public ::testing::TestWithParam<bool> {
TEST_P(RampUpTest, RampUpWithPadding) {
test::DirectTransport receiver_transport;
StreamObserver stream_observer(3, &receiver_transport,
Clock::GetRealTimeClock());
VideoCall::Config call_config(&stream_observer);
scoped_ptr<VideoCall> 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(Call::Create(call_config));
VideoSendStream::Config send_config = call->GetDefaultSendConfig();
receiver_transport.SetReceiver(call->Receiver());
@ -157,21 +154,19 @@ 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<test::FrameGeneratorCapturer> frame_generator_capturer(
test::FrameGeneratorCapturer::Create(
send_stream->Input(),
test::FrameGenerator::Create(
send_config.codec.width, send_config.codec.height,
test::FrameGenerator::Create(send_config.codec.width,
send_config.codec.height,
Clock::GetRealTimeClock()),
30));
@ -213,10 +208,10 @@ class EngineTest : public ::testing::TestWithParam<EngineTestParams> {
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() {
@ -279,8 +274,8 @@ class EngineTest : public ::testing::TestWithParam<EngineTestParams> {
void ReceivesPliAndRecovers(int rtp_history_ms);
scoped_ptr<VideoCall> sender_call_;
scoped_ptr<VideoCall> receiver_call_;
scoped_ptr<Call> sender_call_;
scoped_ptr<Call> 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) {

View File

@ -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,13 +47,15 @@ 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,
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<FullStackTestParams> {
@ -280,9 +282,9 @@ TEST_P(FullStackTest, DISABLED_NoPacketLoss) {
params.avg_ssim_threshold,
static_cast<uint64_t>(FLAGS_seconds * params.clip.fps));
VideoCall::Config call_config(&analyzer);
Call::Config call_config(&analyzer);
scoped_ptr<VideoCall> call(VideoCall::Create(call_config));
scoped_ptr<Call> 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;

View File

@ -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<VideoCall> call(VideoCall::Create(call_config));
scoped_ptr<Call> 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();

View File

@ -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<RtpHeaderParser> 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<VideoCall> call(VideoCall::Create(call_config));
Call::Config call_config(&observer);
scoped_ptr<Call> 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<VideoCall> call(VideoCall::Create(call_config));
Call::Config call_config(&observer);
scoped_ptr<Call> call(Call::Create(call_config));
VideoSendStream::Config send_config = GetSendTestConfig(call.get());
send_config.rtp.ssrcs.push_back(kSendSsrc);

View File

@ -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',