Bug 1436341 - Stop() instead of Pause() device when stopping capture on Windows. r=jib
authorAndreas Pehrson <pehrsons@gmail.com>
Wed, 07 Mar 2018 10:43:23 +0100
changeset 462018 8fb4ddab47308f7daf4442cb8f65471eb67ba422
parent 462017 39f31c0be9f48cfba1f6cace2b2dadd9b8917d34
child 462019 101b62aa7767367d3d2126ae900018992ac4dcfe
push id1683
push usersfraser@mozilla.com
push dateThu, 26 Apr 2018 16:43:40 +0000
treeherdermozilla-release@5af6cb21869d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjib
bugs1436341
milestone60.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1436341 - Stop() instead of Pause() device when stopping capture on Windows. r=jib Pause() gave the benefit of another app not being able to steal the device until the next Run(). It would keep the light on for some cameras however. Stop() makes the light go out on these cameras, but put them up for another application to steal. Basically the same as on our other platforms. MozReview-Commit-ID: FPRYcZ2PEpm
media/webrtc/trunk/webrtc/modules/video_capture/windows/video_capture_ds.cc
--- a/media/webrtc/trunk/webrtc/modules/video_capture/windows/video_capture_ds.cc
+++ b/media/webrtc/trunk/webrtc/modules/video_capture/windows/video_capture_ds.cc
@@ -169,17 +169,17 @@ int32_t VideoCaptureDS::StartCapture(
     }
     return 0;
 }
 
 int32_t VideoCaptureDS::StopCapture()
 {
     CriticalSectionScoped cs(&_apiCs);
 
-    HRESULT hr = _mediaControl->Pause();
+    HRESULT hr = _mediaControl->Stop();
     if (FAILED(hr))
     {
         WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, 0,
                      "Failed to stop the capture graph. %d", hr);
         return -1;
     }
     return 0;
 }