Revert "Add ability to capture audio output to buffer (see issue #2381)"

This reverts commit 9f41a27e58.

This needs to be reimplemented to support out of process audio (see issue #2755).
This commit is contained in:
Marshall Greenblatt
2019-09-20 16:56:57 +03:00
parent 46d3a81ba0
commit e3723dcda5
27 changed files with 11 additions and 2116 deletions

View File

@ -8,7 +8,6 @@
#include <string>
#include <utility>
#include "libcef/browser/audio_mirror_destination.h"
#include "libcef/browser/browser_context.h"
#include "libcef/browser/browser_info.h"
#include "libcef/browser/browser_info_manager.h"
@ -49,7 +48,6 @@
#include "chrome/browser/ui/prefs/prefs_tab_helper.h"
#include "components/zoom/zoom_controller.h"
#include "content/browser/gpu/compositor_util.h"
#include "content/browser/media/capture/audio_mirroring_manager.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/common/widget_messages.h"
#include "content/public/browser/desktop_media_id.h"
@ -1543,8 +1541,6 @@ void CefBrowserHostImpl::DestroyBrowser() {
menu_manager_->Destroy();
DestroyExtensionHost();
StopAudioMirroring();
// Notify any observers that may have state associated with this browser.
for (auto& observer : observers_)
observer.OnBrowserDestroyed(this);
@ -2768,28 +2764,6 @@ bool CefBrowserHostImpl::HasObserver(Observer* observer) const {
return observers_.HasObserver(observer);
}
bool CefBrowserHostImpl::StartAudioMirroring() {
if (client_.get()) {
CefRefPtr<CefAudioHandler> audio_handler = client_->GetAudioHandler();
if (audio_handler.get()) {
audio_mirror_destination_ = new CefAudioMirrorDestination(
this, audio_handler, content::AudioMirroringManager::GetInstance());
audio_mirror_destination_->Start();
return true;
}
}
return false;
}
bool CefBrowserHostImpl::StopAudioMirroring() {
if (audio_mirror_destination_.get()) {
audio_mirror_destination_->Stop();
audio_mirror_destination_.reset();
return true;
}
return false;
}
CefBrowserHostImpl::NavigationLock::NavigationLock(
CefRefPtr<CefBrowserHostImpl> browser)
: browser_(browser) {
@ -2913,8 +2887,6 @@ CefBrowserHostImpl::CefBrowserHostImpl(
// Make sure RenderViewCreated is called at least one time.
RenderViewCreated(web_contents->GetRenderViewHost());
StartAudioMirroring();
// Associate the platform delegate with this browser.
platform_delegate_->BrowserCreated(this);
}