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,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;