// Copyright 2016 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIASTREAM_MEDIA_STREAM_AUDIO_DELIVERER_H_ #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIASTREAM_MEDIA_STREAM_AUDIO_DELIVERER_H_ #include "base/containers/contains.h" #include "base/ranges/algorithm.h" #include "base/synchronization/lock.h" #include "base/threading/thread_checker.h" #include "base/trace_event/trace_event.h" #include "media/base/audio_bus.h" #include "media/base/audio_parameters.h" #include "third_party/blink/public/platform/modules/webrtc/webrtc_logging.h" #include "third_party/blink/renderer/platform/wtf/text/wtf_string.h" #include "third_party/blink/renderer/platform/wtf/vector.h" namespace media { struct AudioGlitchInfo; } namespace blink { // Template containing functionality common to both MediaStreamAudioSource and // MediaStreamAudioTrack. This is used for managing the connections between // objects through which audio data flows, and doing so in a thread-safe manner. // // The Consumer parameter of the template is the type of the objects to which // audio data is delivered: MediaStreamAudioTrack or MediaStreamAudioSink. It's // assumed the Consumer class defines methods named OnSetFormat() and OnData() // that have the same signature as the ones defined in this template. // MediaStreamAudioDeliverer will always guarantee the Consumer's OnSetFormat() // and OnData() methods are called sequentially. template <typename Consumer> class MediaStreamAudioDeliverer { … }; } // namespace blink #endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_MEDIASTREAM_MEDIA_STREAM_AUDIO_DELIVERER_H_