WebRtcVideoCapturer: SetCaptureState(CS_STOPPED) on Stop and ensure state changes in unittest.
Related to issues discussed in the referenced bug but does not solve that bug's main problem. BUG=webrtc:4776 Review URL: https://codereview.webrtc.org/1485673003 Cr-Commit-Position: refs/heads/master@{#10852}
This commit is contained in:
parent
ec192bdb64
commit
0de97f1b74
@ -350,6 +350,7 @@ void WebRtcVideoCapturer::Stop() {
|
||||
|
||||
SetCaptureFormat(NULL);
|
||||
start_thread_ = nullptr;
|
||||
SetCaptureState(CS_STOPPED);
|
||||
}
|
||||
|
||||
bool WebRtcVideoCapturer::IsRunning() {
|
||||
|
||||
@ -111,6 +111,7 @@ TEST_F(WebRtcVideoCapturerTest, TestCapture) {
|
||||
capturer_->Stop();
|
||||
EXPECT_FALSE(capturer_->IsRunning());
|
||||
EXPECT_TRUE(capturer_->GetCaptureFormat() == NULL);
|
||||
EXPECT_EQ_WAIT(cricket::CS_STOPPED, listener_.last_capture_state(), 1000);
|
||||
}
|
||||
|
||||
TEST_F(WebRtcVideoCapturerTest, TestCaptureVcm) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user