mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium version 88.0.4324.0 (#827102)
- Mac: Xcode 12.2 and the MacOS 11.0 SDK are now required for building. - MacOS 10.10 (Yosemite) is no longer supported (see https://crbug.com/1126056). - Flash is no longer supported (see https://www.chromium.org/flash-roadmap).
This commit is contained in:
51
libcef/browser/audio_loopback_stream_creator.h
Normal file
51
libcef/browser/audio_loopback_stream_creator.h
Normal file
@@ -0,0 +1,51 @@
|
||||
// Copyright 2018 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef CEF_LIBCEF_BROWSER_AUDIO_LOOPBACK_STREAM_CREATOR_H_
|
||||
#define CEF_LIBCEF_BROWSER_AUDIO_LOOPBACK_STREAM_CREATOR_H_
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/macros.h"
|
||||
#include "content/browser/media/forwarding_audio_stream_factory.h"
|
||||
#include "content/common/content_export.h"
|
||||
#include "media/mojo/mojom/audio_data_pipe.mojom.h"
|
||||
#include "media/mojo/mojom/audio_input_stream.mojom.h"
|
||||
#include "mojo/public/cpp/bindings/pending_remote.h"
|
||||
|
||||
namespace media {
|
||||
class AudioParameters;
|
||||
}
|
||||
|
||||
// This class handles creating a loopback stream that either captures audio from
|
||||
// a WebContents or the system-wide loopback through the Audio Service.
|
||||
// This class is operated on the UI thread.
|
||||
// Based on InProcessAudioLoopbackStreamCreator which was deleted in
|
||||
// https://crrev.com/a5af2468cf.
|
||||
class CefAudioLoopbackStreamCreator final {
|
||||
public:
|
||||
CefAudioLoopbackStreamCreator();
|
||||
~CefAudioLoopbackStreamCreator();
|
||||
|
||||
// The callback that is called when the requested stream is created.
|
||||
using StreamCreatedCallback = base::RepeatingCallback<void(
|
||||
mojo::PendingRemote<media::mojom::AudioInputStream> stream,
|
||||
mojo::PendingReceiver<media::mojom::AudioInputStreamClient>
|
||||
client_receiver,
|
||||
media::mojom::ReadOnlyAudioDataPipePtr data_pipe)>;
|
||||
|
||||
// Creates a loopback stream that captures the audio from |loopback_source|,
|
||||
// or the default system playback if |loopback_source| is null. Local output
|
||||
// of the source/system audio is muted during capturing.
|
||||
void CreateLoopbackStream(content::WebContents* loopback_source,
|
||||
const media::AudioParameters& params,
|
||||
uint32_t total_segments,
|
||||
const StreamCreatedCallback& callback);
|
||||
|
||||
private:
|
||||
content::ForwardingAudioStreamFactory factory_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefAudioLoopbackStreamCreator);
|
||||
};
|
||||
|
||||
#endif // CEF_LIBCEF_BROWSER_AUDIO_LOOPBACK_STREAM_CREATOR_H_
|
Reference in New Issue
Block a user