mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
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:
@ -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;
|
@ -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_
|
@ -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;
|
||||
|
Reference in New Issue
Block a user