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

@@ -1,128 +0,0 @@
// Copyright (c) 2019 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=7c55cffaa1094ff7aa49e7efbe8b4780867f6538$
//
#include "libcef_dll/cpptoc/audio_handler_cpptoc.h"
#include "libcef_dll/ctocpp/browser_ctocpp.h"
#include "libcef_dll/shutdown_checker.h"
namespace {
// MEMBER FUNCTIONS - Body may be edited by hand.
void CEF_CALLBACK
audio_handler_on_audio_stream_started(struct _cef_audio_handler_t* self,
struct _cef_browser_t* browser,
int audio_stream_id,
int channels,
cef_channel_layout_t channel_layout,
int sample_rate,
int frames_per_buffer) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return;
// Execute
CefAudioHandlerCppToC::Get(self)->OnAudioStreamStarted(
CefBrowserCToCpp::Wrap(browser), audio_stream_id, channels,
channel_layout, sample_rate, frames_per_buffer);
}
void CEF_CALLBACK
audio_handler_on_audio_stream_packet(struct _cef_audio_handler_t* self,
struct _cef_browser_t* browser,
int audio_stream_id,
const float** data,
int frames,
int64 pts) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return;
// Verify param: data; type: simple_byaddr
DCHECK(data);
if (!data)
return;
// Execute
CefAudioHandlerCppToC::Get(self)->OnAudioStreamPacket(
CefBrowserCToCpp::Wrap(browser), audio_stream_id, data, frames, pts);
}
void CEF_CALLBACK
audio_handler_on_audio_stream_stopped(struct _cef_audio_handler_t* self,
struct _cef_browser_t* browser,
int audio_stream_id) {
shutdown_checker::AssertNotShutdown();
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return;
// Verify param: browser; type: refptr_diff
DCHECK(browser);
if (!browser)
return;
// Execute
CefAudioHandlerCppToC::Get(self)->OnAudioStreamStopped(
CefBrowserCToCpp::Wrap(browser), audio_stream_id);
}
} // namespace
// CONSTRUCTOR - Do not edit by hand.
CefAudioHandlerCppToC::CefAudioHandlerCppToC() {
GetStruct()->on_audio_stream_started = audio_handler_on_audio_stream_started;
GetStruct()->on_audio_stream_packet = audio_handler_on_audio_stream_packet;
GetStruct()->on_audio_stream_stopped = audio_handler_on_audio_stream_stopped;
}
// DESTRUCTOR - Do not edit by hand.
CefAudioHandlerCppToC::~CefAudioHandlerCppToC() {
shutdown_checker::AssertNotShutdown();
}
template <>
CefRefPtr<CefAudioHandler> CefCppToCRefCounted<
CefAudioHandlerCppToC,
CefAudioHandler,
cef_audio_handler_t>::UnwrapDerived(CefWrapperType type,
cef_audio_handler_t* s) {
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
template <>
CefWrapperType CefCppToCRefCounted<CefAudioHandlerCppToC,
CefAudioHandler,
cef_audio_handler_t>::kWrapperType =
WT_AUDIO_HANDLER;

View File

@@ -1,37 +0,0 @@
// Copyright (c) 2019 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=7158e06e5c71ed020f193c698a2fdfd6d0b170c8$
//
#ifndef CEF_LIBCEF_DLL_CPPTOC_AUDIO_HANDLER_CPPTOC_H_
#define CEF_LIBCEF_DLL_CPPTOC_AUDIO_HANDLER_CPPTOC_H_
#pragma once
#if !defined(WRAPPING_CEF_SHARED)
#error This file can be included wrapper-side only
#endif
#include "include/capi/cef_audio_handler_capi.h"
#include "include/cef_audio_handler.h"
#include "libcef_dll/cpptoc/cpptoc_ref_counted.h"
// Wrap a C++ class with a C structure.
// This class may be instantiated and accessed wrapper-side only.
class CefAudioHandlerCppToC : public CefCppToCRefCounted<CefAudioHandlerCppToC,
CefAudioHandler,
cef_audio_handler_t> {
public:
CefAudioHandlerCppToC();
virtual ~CefAudioHandlerCppToC();
};
#endif // CEF_LIBCEF_DLL_CPPTOC_AUDIO_HANDLER_CPPTOC_H_

View File

@@ -9,11 +9,10 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=64b2576447d3776b829e06007036acf579b2c47c$
// $hash=376e1cc8d7296348282ac0e9f74a1149bbb97780$
//
#include "libcef_dll/cpptoc/client_cpptoc.h"
#include "libcef_dll/cpptoc/audio_handler_cpptoc.h"
#include "libcef_dll/cpptoc/context_menu_handler_cpptoc.h"
#include "libcef_dll/cpptoc/dialog_handler_cpptoc.h"
#include "libcef_dll/cpptoc/display_handler_cpptoc.h"
@@ -35,22 +34,6 @@ namespace {
// MEMBER FUNCTIONS - Body may be edited by hand.
cef_audio_handler_t* CEF_CALLBACK
client_get_audio_handler(struct _cef_client_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
if (!self)
return NULL;
// Execute
CefRefPtr<CefAudioHandler> _retval =
CefClientCppToC::Get(self)->GetAudioHandler();
// Return type: refptr_same
return CefAudioHandlerCppToC::Wrap(_retval);
}
struct _cef_context_menu_handler_t* CEF_CALLBACK
client_get_context_menu_handler(struct _cef_client_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
@@ -297,7 +280,6 @@ client_on_process_message_received(struct _cef_client_t* self,
// CONSTRUCTOR - Do not edit by hand.
CefClientCppToC::CefClientCppToC() {
GetStruct()->get_audio_handler = client_get_audio_handler;
GetStruct()->get_context_menu_handler = client_get_context_menu_handler;
GetStruct()->get_dialog_handler = client_get_dialog_handler;
GetStruct()->get_display_handler = client_get_display_handler;

View File

@@ -1,120 +0,0 @@
// Copyright (c) 2019 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=c23055c6f30177626f9bf7946c6afed6c481d021$
//
#include "libcef_dll/ctocpp/audio_handler_ctocpp.h"
#include "libcef_dll/cpptoc/browser_cpptoc.h"
#include "libcef_dll/shutdown_checker.h"
// VIRTUAL METHODS - Body may be edited by hand.
NO_SANITIZE("cfi-icall")
void CefAudioHandlerCToCpp::OnAudioStreamStarted(CefRefPtr<CefBrowser> browser,
int audio_stream_id,
int channels,
ChannelLayout channel_layout,
int sample_rate,
int frames_per_buffer) {
shutdown_checker::AssertNotShutdown();
cef_audio_handler_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, on_audio_stream_started))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: browser; type: refptr_diff
DCHECK(browser.get());
if (!browser.get())
return;
// Execute
_struct->on_audio_stream_started(_struct, CefBrowserCppToC::Wrap(browser),
audio_stream_id, channels, channel_layout,
sample_rate, frames_per_buffer);
}
NO_SANITIZE("cfi-icall")
void CefAudioHandlerCToCpp::OnAudioStreamPacket(CefRefPtr<CefBrowser> browser,
int audio_stream_id,
const float** data,
int frames,
int64 pts) {
shutdown_checker::AssertNotShutdown();
cef_audio_handler_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, on_audio_stream_packet))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: browser; type: refptr_diff
DCHECK(browser.get());
if (!browser.get())
return;
// Verify param: data; type: simple_byaddr
DCHECK(data);
if (!data)
return;
// Execute
_struct->on_audio_stream_packet(_struct, CefBrowserCppToC::Wrap(browser),
audio_stream_id, data, frames, pts);
}
NO_SANITIZE("cfi-icall")
void CefAudioHandlerCToCpp::OnAudioStreamStopped(CefRefPtr<CefBrowser> browser,
int audio_stream_id) {
shutdown_checker::AssertNotShutdown();
cef_audio_handler_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, on_audio_stream_stopped))
return;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Verify param: browser; type: refptr_diff
DCHECK(browser.get());
if (!browser.get())
return;
// Execute
_struct->on_audio_stream_stopped(_struct, CefBrowserCppToC::Wrap(browser),
audio_stream_id);
}
// CONSTRUCTOR - Do not edit by hand.
CefAudioHandlerCToCpp::CefAudioHandlerCToCpp() {}
// DESTRUCTOR - Do not edit by hand.
CefAudioHandlerCToCpp::~CefAudioHandlerCToCpp() {
shutdown_checker::AssertNotShutdown();
}
template <>
cef_audio_handler_t*
CefCToCppRefCounted<CefAudioHandlerCToCpp,
CefAudioHandler,
cef_audio_handler_t>::UnwrapDerived(CefWrapperType type,
CefAudioHandler* c) {
NOTREACHED() << "Unexpected class type: " << type;
return NULL;
}
template <>
CefWrapperType CefCToCppRefCounted<CefAudioHandlerCToCpp,
CefAudioHandler,
cef_audio_handler_t>::kWrapperType =
WT_AUDIO_HANDLER;

View File

@@ -1,52 +0,0 @@
// Copyright (c) 2019 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
//
// ---------------------------------------------------------------------------
//
// This file was generated by the CEF translator tool. If making changes by
// hand only do so within the body of existing method and function
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=1ef8824abe88f3c6258ae3e9cb513c7f52b28899$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_AUDIO_HANDLER_CTOCPP_H_
#define CEF_LIBCEF_DLL_CTOCPP_AUDIO_HANDLER_CTOCPP_H_
#pragma once
#if !defined(BUILDING_CEF_SHARED)
#error This file can be included DLL-side only
#endif
#include "include/capi/cef_audio_handler_capi.h"
#include "include/cef_audio_handler.h"
#include "libcef_dll/ctocpp/ctocpp_ref_counted.h"
// Wrap a C structure with a C++ class.
// This class may be instantiated and accessed DLL-side only.
class CefAudioHandlerCToCpp : public CefCToCppRefCounted<CefAudioHandlerCToCpp,
CefAudioHandler,
cef_audio_handler_t> {
public:
CefAudioHandlerCToCpp();
virtual ~CefAudioHandlerCToCpp();
// CefAudioHandler methods.
void OnAudioStreamStarted(CefRefPtr<CefBrowser> browser,
int audio_stream_id,
int channels,
ChannelLayout channel_layout,
int sample_rate,
int frames_per_buffer) override;
void OnAudioStreamPacket(CefRefPtr<CefBrowser> browser,
int audio_stream_id,
const float** data,
int frames,
int64 pts) override;
void OnAudioStreamStopped(CefRefPtr<CefBrowser> browser,
int audio_stream_id) override;
};
#endif // CEF_LIBCEF_DLL_CTOCPP_AUDIO_HANDLER_CTOCPP_H_

View File

@@ -9,14 +9,13 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=4cf201c5e2c106fe4054cb3704114f937e763295$
// $hash=464799ae4e604aaadcf51130683e72e72ac0ea64$
//
#include "libcef_dll/ctocpp/client_ctocpp.h"
#include "libcef_dll/cpptoc/browser_cpptoc.h"
#include "libcef_dll/cpptoc/frame_cpptoc.h"
#include "libcef_dll/cpptoc/process_message_cpptoc.h"
#include "libcef_dll/ctocpp/audio_handler_ctocpp.h"
#include "libcef_dll/ctocpp/context_menu_handler_ctocpp.h"
#include "libcef_dll/ctocpp/dialog_handler_ctocpp.h"
#include "libcef_dll/ctocpp/display_handler_ctocpp.h"
@@ -33,21 +32,6 @@
// VIRTUAL METHODS - Body may be edited by hand.
NO_SANITIZE("cfi-icall")
CefRefPtr<CefAudioHandler> CefClientCToCpp::GetAudioHandler() {
cef_client_t* _struct = GetStruct();
if (CEF_MEMBER_MISSING(_struct, get_audio_handler))
return NULL;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
cef_audio_handler_t* _retval = _struct->get_audio_handler(_struct);
// Return type: refptr_same
return CefAudioHandlerCToCpp::Wrap(_retval);
}
NO_SANITIZE("cfi-icall")
CefRefPtr<CefContextMenuHandler> CefClientCToCpp::GetContextMenuHandler() {
cef_client_t* _struct = GetStruct();

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=bbac20a2027ea623832f37512f716092f29eef3f$
// $hash=5d6b9cf99d27d848177db25cb9953b8d9c0e2ff0$
//
#ifndef CEF_LIBCEF_DLL_CTOCPP_CLIENT_CTOCPP_H_
@@ -33,7 +33,6 @@ class CefClientCToCpp
virtual ~CefClientCToCpp();
// CefClient methods.
CefRefPtr<CefAudioHandler> GetAudioHandler() override;
CefRefPtr<CefContextMenuHandler> GetContextMenuHandler() override;
CefRefPtr<CefDialogHandler> GetDialogHandler() override;
CefRefPtr<CefDisplayHandler> GetDisplayHandler() override;

View File

@@ -9,7 +9,7 @@
// implementations. See the translator.README.txt file in the tools directory
// for more information.
//
// $hash=98cdfe3302019e8169a9db0371a64ec7b3ad419b$
// $hash=d256b13437952652b8121ea7d7e10eddfebf8552$
//
#ifndef CEF_LIBCEF_DLL_WRAPPER_TYPES_H_
@@ -21,7 +21,6 @@ enum CefWrapperType {
WT_BASE_SCOPED,
WT_ACCESSIBILITY_HANDLER,
WT_APP,
WT_AUDIO_HANDLER,
WT_AUTH_CALLBACK,
WT_BEFORE_DOWNLOAD_CALLBACK,
WT_BINARY_VALUE,