Commit edbcd5e7 authored by Takeshi Yoshino's avatar Takeshi Yoshino Committed by Commit Bot

Revert "Enable video capture service by default on platforms where it is rolling"

This reverts commit 1e2e99ef.

Reason for revert: Suspected to be the cause of fast/mediastream/MediaStreamTrack-gc-no-crash.html failure

Original change's description:
> Enable video capture service by default on platforms where it is rolling
> out with M61.
> 
> Bug: 721812
> Change-Id: I1de0f625a1fb106e2dea664675e94267e66fc2fd
> Reviewed-on: https://chromium-review.googlesource.com/719416
> Commit-Queue: Christian Fremerey <chfremer@chromium.org>
> Reviewed-by: Emircan Uysaler <emircan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#517761}

TBR=emircan@chromium.org,chfremer@chromium.org

Change-Id: Icdb2af1cf68e1774d57c1d8b3c529e86e0a2a48e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 721812
Reviewed-on: https://chromium-review.googlesource.com/778603Reviewed-by: default avatarTakeshi Yoshino <tyoshino@chromium.org>
Commit-Queue: Takeshi Yoshino <tyoshino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517776}
parent 36991ee1
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include "content/browser/browser_thread_impl.h" #include "content/browser/browser_thread_impl.h"
#include "content/browser/renderer_host/media/media_stream_manager.h" #include "content/browser/renderer_host/media/media_stream_manager.h"
#include "content/browser/renderer_host/media/media_stream_ui_proxy.h" #include "content/browser/renderer_host/media/media_stream_ui_proxy.h"
#include "content/browser/renderer_host/media/mock_video_capture_provider.h"
#include "content/public/common/content_switches.h" #include "content/public/common/content_switches.h"
#include "content/public/test/test_browser_thread_bundle.h" #include "content/public/test/test_browser_thread_bundle.h"
#include "media/audio/audio_device_description.h" #include "media/audio/audio_device_description.h"
...@@ -44,7 +43,6 @@ ...@@ -44,7 +43,6 @@
#endif #endif
using testing::_; using testing::_;
using testing::Invoke;
namespace content { namespace content {
...@@ -140,19 +138,9 @@ class MediaStreamManagerTest : public ::testing::Test { ...@@ -140,19 +138,9 @@ class MediaStreamManagerTest : public ::testing::Test {
audio_manager_ = std::make_unique<MockAudioManager>(); audio_manager_ = std::make_unique<MockAudioManager>();
audio_system_ = audio_system_ =
std::make_unique<media::AudioSystemImpl>(audio_manager_.get()); std::make_unique<media::AudioSystemImpl>(audio_manager_.get());
auto video_capture_provider = std::make_unique<MockVideoCaptureProvider>();
video_capture_provider_ = video_capture_provider.get();
media_stream_manager_ = std::make_unique<MediaStreamManager>( media_stream_manager_ = std::make_unique<MediaStreamManager>(
audio_system_.get(), audio_manager_->GetTaskRunner(), audio_system_.get(), audio_manager_->GetTaskRunner());
std::move(video_capture_provider));
base::RunLoop().RunUntilIdle(); base::RunLoop().RunUntilIdle();
ON_CALL(*video_capture_provider_, DoGetDeviceInfosAsync(_))
.WillByDefault(Invoke(
[](VideoCaptureProvider::GetDeviceInfosCallback& result_callback) {
std::vector<media::VideoCaptureDeviceInfo> stub_results;
base::ResetAndReturn(&result_callback).Run(stub_results);
}));
} }
~MediaStreamManagerTest() override { audio_manager_->Shutdown(); } ~MediaStreamManagerTest() override { audio_manager_->Shutdown(); }
...@@ -188,7 +176,6 @@ class MediaStreamManagerTest : public ::testing::Test { ...@@ -188,7 +176,6 @@ class MediaStreamManagerTest : public ::testing::Test {
content::TestBrowserThreadBundle thread_bundle_; content::TestBrowserThreadBundle thread_bundle_;
std::unique_ptr<MockAudioManager> audio_manager_; std::unique_ptr<MockAudioManager> audio_manager_;
std::unique_ptr<media::AudioSystem> audio_system_; std::unique_ptr<media::AudioSystem> audio_system_;
MockVideoCaptureProvider* video_capture_provider_;
base::RunLoop run_loop_; base::RunLoop run_loop_;
private: private:
......
...@@ -20,28 +20,20 @@ class ServiceConnectorImpl ...@@ -20,28 +20,20 @@ class ServiceConnectorImpl
public: public:
ServiceConnectorImpl() { ServiceConnectorImpl() {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
// In unit test environments, there may not be any connector. connector_ = content::ServiceManagerConnection::GetForProcess()
auto* connection = content::ServiceManagerConnection::GetForProcess(); ->GetConnector()
if (!connection) ->Clone();
return; DETACH_FROM_SEQUENCE(sequence_checker_);
auto* connector = connection->GetConnector();
if (!connector)
return;
connector_ = connector->Clone();
} }
void BindFactoryProvider( void BindFactoryProvider(
video_capture::mojom::DeviceFactoryProviderPtr* provider) override { video_capture::mojom::DeviceFactoryProviderPtr* provider) override {
if (!connector_) {
CHECK(false) << "Attempted to connect to the video capture service from "
"a process that does not provide a "
"ServiceManagerConnection";
}
connector_->BindInterface(video_capture::mojom::kServiceName, provider); connector_->BindInterface(video_capture::mojom::kServiceName, provider);
} }
private: private:
std::unique_ptr<service_manager::Connector> connector_; std::unique_ptr<service_manager::Connector> connector_;
SEQUENCE_CHECKER(sequence_checker_);
}; };
} // anonymous namespace } // anonymous namespace
......
...@@ -4,18 +4,9 @@ ...@@ -4,18 +4,9 @@
#include "services/video_capture/public/cpp/constants.h" #include "services/video_capture/public/cpp/constants.h"
#include "build/build_config.h"
namespace video_capture { namespace video_capture {
const base::Feature kMojoVideoCapture { const base::Feature kMojoVideoCapture{"MojoVideoCapture",
"MojoVideoCapture", base::FEATURE_DISABLED_BY_DEFAULT};
#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX) || \
defined(OS_WIN)
base::FEATURE_ENABLED_BY_DEFAULT
#else
base::FEATURE_DISABLED_BY_DEFAULT
#endif
};
} // namespace video_capture } // namespace video_capture
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment