Remove restart method from VideoTrackSourceInterface.

This method is no longer needed.

Review-Url: https://codereview.webrtc.org/2306013002
Cr-Commit-Position: refs/heads/master@{#14060}
This commit is contained in:
sakal 2016-09-03 10:29:07 -07:00 committed by Commit bot
parent 3db7fe8a16
commit a973f95386
7 changed files with 0 additions and 44 deletions

View File

@ -37,9 +37,6 @@ class AndroidVideoTrackSource : public Notifier<VideoTrackSourceInterface> {
// Not used on Android.
// TODO(sakal/magjed): Try to remove this from the interface.
void Stop() override { RTC_NOTREACHED(); };
// Not used on Android.
// TODO(sakal/magjed): Try to remove this from the interface.
void Restart() override { RTC_NOTREACHED(); }
bool is_screencast() const override { return is_screencast_; }

View File

@ -107,7 +107,6 @@ class VideoTrackSourceInterface
};
virtual void Stop() = 0;
virtual void Restart() = 0;
// Indicates that parameters suitable for screencasts should be automatically
// applied to RtpSenders.

View File

@ -376,19 +376,6 @@ void VideoCapturerTrackSource::Stop() {
rtc::Bind(&cricket::VideoCapturer::Stop, video_capturer_.get()));
}
void VideoCapturerTrackSource::Restart() {
if (started_) {
return;
}
if (!worker_thread_->Invoke<bool>(
RTC_FROM_HERE, rtc::Bind(&cricket::VideoCapturer::StartCapturing,
video_capturer_.get(), format_))) {
SetState(kEnded);
return;
}
started_ = true;
}
// OnStateChange listens to the cricket::VideoCapturer::SignalStateChange.
void VideoCapturerTrackSource::OnStateChange(
cricket::VideoCapturer* capturer,

View File

@ -58,7 +58,6 @@ class VideoCapturerTrackSource : public VideoTrackSource,
bool GetStats(Stats* stats) override;
void Stop() override;
void Restart() override;
protected:
VideoCapturerTrackSource(rtc::Thread* worker_thread,

View File

@ -157,30 +157,6 @@ TEST_F(VideoCapturerTrackSourceTest, CapturerStartStop) {
kMaxWaitMs);
}
// Test that a VideoSource can be stopped and restarted.
TEST_F(VideoCapturerTrackSourceTest, StopRestart) {
// Initialize without constraints.
CreateVideoCapturerSource();
EXPECT_EQ_WAIT(MediaSourceInterface::kLive, state_observer_->state(),
kMaxWaitMs);
ASSERT_TRUE(capturer_->CaptureFrame());
EXPECT_EQ(1, renderer_.num_rendered_frames());
source_->Stop();
EXPECT_EQ_WAIT(MediaSourceInterface::kEnded, state_observer_->state(),
kMaxWaitMs);
source_->Restart();
EXPECT_EQ_WAIT(MediaSourceInterface::kLive, state_observer_->state(),
kMaxWaitMs);
ASSERT_TRUE(capturer_->CaptureFrame());
EXPECT_EQ(2, renderer_.num_rendered_frames());
source_->Stop();
}
// Test that a VideoSource transition to kEnded if the capture device
// fails.
TEST_F(VideoCapturerTrackSourceTest, CameraFailed) {

View File

@ -24,7 +24,6 @@ BEGIN_PROXY_MAP(VideoTrackSource)
PROXY_CONSTMETHOD0(SourceState, state)
PROXY_CONSTMETHOD0(bool, remote)
PROXY_METHOD0(void, Stop)
PROXY_METHOD0(void, Restart)
PROXY_CONSTMETHOD0(bool, is_screencast)
PROXY_CONSTMETHOD0(rtc::Optional<bool>, needs_denoising)
PROXY_METHOD1(bool, GetStats, Stats*)

View File

@ -34,7 +34,6 @@ class VideoTrackSource : public Notifier<VideoTrackSourceInterface> {
bool remote() const override { return remote_; }
void Stop() override{};
void Restart() override{};
bool is_screencast() const override { return false; }
rtc::Optional<bool> needs_denoising() const override {