Rename Start/Stop in Video{Send,Receive}Streams.

Rename {Start,Stop}{Sending,Receving} to Start/Stop. StartSending
provides no extra information in the context of a VideoSendStream, as
what it does is to send.

R=mflodman@webrtc.org
BUG=3227

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5970 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
pbos@webrtc.org 2014-04-24 11:13:21 +00:00
parent 0a2277448e
commit a5c8d2c9b3
13 changed files with 63 additions and 65 deletions

View File

@ -175,7 +175,7 @@ class BitrateEstimatorTest : public ::testing::Test {
test_->send_config_.encoder_settings.streams[0].height,
30,
Clock::GetRealTimeClock()));
send_stream_->StartSending();
send_stream_->Start();
frame_generator_capturer_->Start();
ExternalVideoDecoder decoder;
@ -186,7 +186,7 @@ class BitrateEstimatorTest : public ::testing::Test {
test_->receive_config_.external_decoders.push_back(decoder);
receive_stream_ = test_->receiver_call_->CreateVideoReceiveStream(
test_->receive_config_);
receive_stream_->StartReceiving();
receive_stream_->Start();
is_sending_receiving_ = true;
}
@ -202,8 +202,8 @@ class BitrateEstimatorTest : public ::testing::Test {
void StopSending() {
if (is_sending_receiving_) {
frame_generator_capturer_->Stop();
send_stream_->StopSending();
receive_stream_->StopReceiving();
send_stream_->Stop();
receive_stream_->Stop();
is_sending_receiving_ = false;
}
}

View File

@ -67,14 +67,14 @@ class CallPerfTest : public ::testing::Test {
scoped_ptr<test::FrameGeneratorCapturer> frame_generator_capturer(
test::FrameGeneratorCapturer::Create(
send_stream_->Input(), 320, 240, 30, Clock::GetRealTimeClock()));
send_stream_->StartSending();
send_stream_->Start();
frame_generator_capturer->Start();
EXPECT_EQ(kEventSignaled, observer->Wait());
observer->StopSending();
frame_generator_capturer->Stop();
send_stream_->StopSending();
send_stream_->Stop();
call->DestroyVideoSendStream(send_stream_);
}
@ -310,8 +310,8 @@ TEST_F(CallPerfTest, PlaysOutAudioAndVideoInSync) {
send_config.encoder_settings.streams[0].height,
30,
Clock::GetRealTimeClock()));
receive_stream->StartReceiving();
send_stream->StartSending();
receive_stream->Start();
send_stream->Start();
capturer->Start();
fake_audio_device.Start();
@ -328,8 +328,8 @@ TEST_F(CallPerfTest, PlaysOutAudioAndVideoInSync) {
fake_audio_device.Stop();
capturer->Stop();
send_stream->StopSending();
receive_stream->StopReceiving();
send_stream->Stop();
receive_stream->Stop();
observer.StopSending();
audio_observer.StopSending();
@ -477,15 +477,15 @@ void CallPerfTest::TestMinTransmitBitrate(bool pad_to_min_bitrate) {
30,
Clock::GetRealTimeClock()));
observer.SetSendStream(send_stream);
receive_stream->StartReceiving();
send_stream->StartSending();
receive_stream->Start();
send_stream->Start();
capturer->Start();
EXPECT_EQ(kEventSignaled, observer.Wait())
<< "Timeout while waiting for send-bitrate stats.";
send_stream->StopSending();
receive_stream->StopReceiving();
send_stream->Stop();
receive_stream->Stop();
observer.StopSending();
capturer->Stop();
sender_call->DestroyVideoSendStream(send_stream);

View File

@ -106,8 +106,8 @@ class CallTest : public ::testing::Test {
}
void StartSending() {
receive_stream_->StartReceiving();
send_stream_->StartSending();
receive_stream_->Start();
send_stream_->Start();
if (frame_generator_capturer_.get() != NULL)
frame_generator_capturer_->Start();
}
@ -116,9 +116,9 @@ class CallTest : public ::testing::Test {
if (frame_generator_capturer_.get() != NULL)
frame_generator_capturer_->Stop();
if (send_stream_ != NULL)
send_stream_->StopSending();
send_stream_->Stop();
if (receive_stream_ != NULL)
receive_stream_->StopReceiving();
receive_stream_->Stop();
}
void DestroyStreams() {
@ -286,8 +286,8 @@ TEST_F(CallTest, ReceiverCanBeStartedTwice) {
CreateTestConfigs();
CreateStreams();
receive_stream_->StartReceiving();
receive_stream_->StartReceiving();
receive_stream_->Start();
receive_stream_->Start();
DestroyStreams();
}
@ -299,8 +299,8 @@ TEST_F(CallTest, ReceiverCanBeStoppedTwice) {
CreateTestConfigs();
CreateStreams();
receive_stream_->StopReceiving();
receive_stream_->StopReceiving();
receive_stream_->Stop();
receive_stream_->Stop();
DestroyStreams();
}
@ -1116,7 +1116,7 @@ TEST_F(CallTest, SendsAndReceivesMultipleStreams) {
stream->min_bitrate_bps = stream->target_bitrate_bps =
stream->max_bitrate_bps = 100000;
send_streams[i] = sender_call->CreateVideoSendStream(send_config);
send_streams[i]->StartSending();
send_streams[i]->Start();
VideoReceiveStream::Config receive_config =
receiver_call->GetDefaultReceiveConfig();
@ -1128,7 +1128,7 @@ TEST_F(CallTest, SendsAndReceivesMultipleStreams) {
receive_config.codecs.push_back(codec);
receive_streams[i] =
receiver_call->CreateVideoReceiveStream(receive_config);
receive_streams[i]->StartReceiving();
receive_streams[i]->Start();
frame_generators[i] = test::FrameGeneratorCapturer::Create(
send_streams[i]->Input(), width, height, 30, Clock::GetRealTimeClock());

View File

@ -437,16 +437,15 @@ TEST_P(FullStackTest, NoPacketLoss) {
VideoReceiveStream* receive_stream =
call->CreateVideoReceiveStream(receive_config);
receive_stream->StartReceiving();
send_stream->StartSending();
receive_stream->Start();
send_stream->Start();
file_capturer->Start();
analyzer.Wait();
file_capturer->Stop();
send_stream->StopSending();
receive_stream->StopReceiving();
send_stream->Stop();
receive_stream->Stop();
call->DestroyVideoReceiveStream(receive_stream);
call->DestroyVideoSendStream(send_stream);

View File

@ -91,15 +91,15 @@ TEST_F(LoopbackTest, Test) {
VideoReceiveStream* receive_stream =
call->CreateVideoReceiveStream(receive_config);
receive_stream->StartReceiving();
send_stream->StartSending();
receive_stream->Start();
send_stream->Start();
camera->Start();
test::PressEnterToContinue();
camera->Stop();
send_stream->StopSending();
receive_stream->StopReceiving();
send_stream->Stop();
receive_stream->Stop();
call->DestroyVideoReceiveStream(receive_stream);
call->DestroyVideoSendStream(send_stream);

View File

@ -469,13 +469,13 @@ class RampUpTest : public ::testing::Test {
send_config.encoder_settings.streams.back().max_framerate,
Clock::GetRealTimeClock()));
send_stream->StartSending();
send_stream->Start();
frame_generator_capturer->Start();
EXPECT_EQ(kEventSignaled, stream_observer.Wait());
frame_generator_capturer->Stop();
send_stream->StopSending();
send_stream->Stop();
call->DestroyVideoSendStream(send_stream);
}
@ -528,7 +528,7 @@ class RampUpTest : public ::testing::Test {
30,
Clock::GetRealTimeClock()));
send_stream->StartSending();
send_stream->Start();
frame_generator_capturer->Start();
EXPECT_EQ(kEventSignaled, stream_observer.Wait());
@ -536,7 +536,7 @@ class RampUpTest : public ::testing::Test {
stream_observer.StopSending();
receiver_transport.StopSending();
frame_generator_capturer->Stop();
send_stream->StopSending();
send_stream->Stop();
call->DestroyVideoSendStream(send_stream);
}

View File

@ -212,7 +212,7 @@ VideoReceiveStream::~VideoReceiveStream() {
rtp_rtcp_->Release();
}
void VideoReceiveStream::StartReceiving() {
void VideoReceiveStream::Start() {
transport_adapter_.Enable();
if (render_->StartRender(channel_) != 0)
abort();
@ -220,7 +220,7 @@ void VideoReceiveStream::StartReceiving() {
abort();
}
void VideoReceiveStream::StopReceiving() {
void VideoReceiveStream::Stop() {
if (render_->StopRender(channel_) != 0)
abort();
if (video_engine_base_->StopReceive(channel_) != 0)

View File

@ -49,8 +49,8 @@ class VideoReceiveStream : public webrtc::VideoReceiveStream,
int base_channel);
virtual ~VideoReceiveStream();
virtual void StartReceiving() OVERRIDE;
virtual void StopReceiving() OVERRIDE;
virtual void Start() OVERRIDE;
virtual void Stop() OVERRIDE;
virtual Stats GetStats() const OVERRIDE;
virtual void GetCurrentReceiveCodec(VideoCodec* receive_codec) OVERRIDE;

View File

@ -210,13 +210,13 @@ void VideoSendStream::SwapFrame(I420VideoFrame* frame) {
VideoSendStreamInput* VideoSendStream::Input() { return this; }
void VideoSendStream::StartSending() {
void VideoSendStream::Start() {
transport_adapter_.Enable();
video_engine_base_->StartSend(channel_);
video_engine_base_->StartReceive(channel_);
}
void VideoSendStream::StopSending() {
void VideoSendStream::Stop() {
video_engine_base_->StopSend(channel_);
video_engine_base_->StopReceive(channel_);
transport_adapter_.Disable();

View File

@ -46,9 +46,8 @@ class VideoSendStream : public webrtc::VideoSendStream,
virtual ~VideoSendStream();
virtual void StartSending() OVERRIDE;
virtual void StopSending() OVERRIDE;
virtual void Start() OVERRIDE;
virtual void Stop() OVERRIDE;
virtual bool ReconfigureVideoEncoder(const std::vector<VideoStream>& streams,
void* encoder_settings) OVERRIDE;

View File

@ -51,14 +51,14 @@ class VideoSendStreamTest : public ::testing::Test {
scoped_ptr<test::FrameGeneratorCapturer> frame_generator_capturer(
test::FrameGeneratorCapturer::Create(
send_stream_->Input(), 320, 240, 30, Clock::GetRealTimeClock()));
send_stream_->StartSending();
send_stream_->Start();
frame_generator_capturer->Start();
EXPECT_EQ(kEventSignaled, observer->Wait());
observer->StopSending();
frame_generator_capturer->Stop();
send_stream_->StopSending();
send_stream_->Stop();
call->DestroyVideoSendStream(send_stream_);
}
@ -179,7 +179,7 @@ void VideoSendStreamTest::SendsSetSsrcs(size_t num_ssrcs,
scoped_ptr<test::FrameGeneratorCapturer> frame_generator_capturer(
test::FrameGeneratorCapturer::Create(
send_stream_->Input(), 320, 240, 30, Clock::GetRealTimeClock()));
send_stream_->StartSending();
send_stream_->Start();
frame_generator_capturer->Start();
EXPECT_EQ(kEventSignaled, observer.Wait())
@ -195,7 +195,7 @@ void VideoSendStreamTest::SendsSetSsrcs(size_t num_ssrcs,
observer.StopSending();
frame_generator_capturer->Stop();
send_stream_->StopSending();
send_stream_->Stop();
call->DestroyVideoSendStream(send_stream_);
}
@ -206,8 +206,8 @@ TEST_F(VideoSendStreamTest, CanStartStartedStream) {
VideoSendStream::Config config = GetSendTestConfig(call.get(), 1);
VideoSendStream* stream = call->CreateVideoSendStream(config);
stream->StartSending();
stream->StartSending();
stream->Start();
stream->Start();
call->DestroyVideoSendStream(stream);
}
@ -218,8 +218,8 @@ TEST_F(VideoSendStreamTest, CanStopStoppedStream) {
VideoSendStream::Config config = GetSendTestConfig(call.get(), 1);
VideoSendStream* stream = call->CreateVideoSendStream(config);
stream->StopSending();
stream->StopSending();
stream->Stop();
stream->Stop();
call->DestroyVideoSendStream(stream);
}
@ -415,7 +415,7 @@ TEST_F(VideoSendStreamTest, SwapsI420VideoFrames) {
VideoSendStream::Config send_config = GetSendTestConfig(call.get(), 1);
VideoSendStream* video_send_stream = call->CreateVideoSendStream(send_config);
video_send_stream->StartSending();
video_send_stream->Start();
I420VideoFrame frame;
frame.CreateEmptyFrame(
@ -1020,7 +1020,7 @@ TEST_F(VideoSendStreamTest, NoPaddingWhenVideoIsMuted) {
test::FrameGeneratorCapturer::Create(
send_stream_->Input(), 320, 240, 30, Clock::GetRealTimeClock()));
observer.SetCapturer(frame_generator_capturer.get());
send_stream_->StartSending();
send_stream_->Start();
frame_generator_capturer->Start();
EXPECT_EQ(kEventSignaled, observer.Wait())
@ -1028,7 +1028,7 @@ TEST_F(VideoSendStreamTest, NoPaddingWhenVideoIsMuted) {
observer.StopSending();
frame_generator_capturer->Stop();
send_stream_->StopSending();
send_stream_->Stop();
call->DestroyVideoSendStream(send_stream_);
}
@ -1107,7 +1107,7 @@ TEST_F(VideoSendStreamTest, ProducesStats) {
scoped_ptr<test::FrameGeneratorCapturer> frame_generator_capturer(
test::FrameGeneratorCapturer::Create(
send_stream_->Input(), 320, 240, 30, Clock::GetRealTimeClock()));
send_stream_->StartSending();
send_stream_->Start();
frame_generator_capturer->Start();
EXPECT_TRUE(observer.WaitForFilledStats())
@ -1115,7 +1115,7 @@ TEST_F(VideoSendStreamTest, ProducesStats) {
observer.StopSending();
frame_generator_capturer->Stop();
send_stream_->StopSending();
send_stream_->Stop();
call->DestroyVideoSendStream(send_stream_);
}
@ -1200,7 +1200,7 @@ TEST_F(VideoSendStreamTest, MinTransmitBitrateRespectsRemb) {
scoped_ptr<test::FrameGeneratorCapturer> frame_generator_capturer(
test::FrameGeneratorCapturer::Create(
send_stream_->Input(), 320, 240, 30, Clock::GetRealTimeClock()));
send_stream_->StartSending();
send_stream_->Start();
frame_generator_capturer->Start();
EXPECT_EQ(kEventSignaled, observer.Wait())
@ -1208,7 +1208,7 @@ TEST_F(VideoSendStreamTest, MinTransmitBitrateRespectsRemb) {
observer.StopSending();
frame_generator_capturer->Stop();
send_stream_->StopSending();
send_stream_->Stop();
call->DestroyVideoSendStream(send_stream_);
}

View File

@ -171,8 +171,8 @@ class VideoReceiveStream {
int target_delay_ms;
};
virtual void StartReceiving() = 0;
virtual void StopReceiving() = 0;
virtual void Start() = 0;
virtual void Stop() = 0;
virtual Stats GetStats() const = 0;
// TODO(mflodman) Replace this with callback.

View File

@ -159,8 +159,8 @@ class VideoSendStream {
// VideoSendStream is valid.
virtual VideoSendStreamInput* Input() = 0;
virtual void StartSending() = 0;
virtual void StopSending() = 0;
virtual void Start() = 0;
virtual void Stop() = 0;
// Set which streams to send. Must have at least as many SSRCs as configured
// in the config. Encoder settings are passed on to the encoder instance along