Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1711)

Unified Diff: content/renderer/media/media_stream_audio_track_sink.h

Issue 1834323002: MediaStream audio: Refactor 3 separate "glue" implementations into one. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE + Workaround to ensure MediaStreamAudioProcessor is destroyed on the main thread. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/media_stream_audio_track_sink.h
diff --git a/content/renderer/media/media_stream_audio_track_sink.h b/content/renderer/media/media_stream_audio_track_sink.h
deleted file mode 100644
index 778c93c3fe5e9ce7460fa20279120066ba4f8706..0000000000000000000000000000000000000000
--- a/content/renderer/media/media_stream_audio_track_sink.h
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2013 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 CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_TRACK_SINK_H_
-#define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_TRACK_SINK_H_
-
-#include <vector>
-
-#include "base/logging.h"
-#include "base/memory/ref_counted.h"
-#include "base/time/time.h"
-#include "media/base/audio_parameters.h"
-#include "third_party/WebKit/public/platform/WebMediaStreamSource.h"
-
-namespace media {
-class AudioBus;
-}
-
-namespace content {
-
-class MediaStreamAudioSink;
-
-// Interface for reference counted holder of audio stream audio track sink.
-class MediaStreamAudioTrackSink
- : public base::RefCountedThreadSafe<MediaStreamAudioTrackSink> {
- public:
- // Note: OnData() and OnSetFormat() have the same meaning and semantics as in
- // content::MediaStreamAudioSink. See comments there for usage info.
- virtual void OnData(const media::AudioBus& audio_bus,
- base::TimeTicks estimated_capture_time) = 0;
- virtual void OnSetFormat(const media::AudioParameters& params) = 0;
-
- virtual void OnReadyStateChanged(
- blink::WebMediaStreamSource::ReadyState state) = 0;
-
- virtual void Reset() = 0;
-
- virtual bool IsEqual(const MediaStreamAudioSink* other) const = 0;
-
- // Wrapper which allows to use std::find_if() when adding and removing
- // sinks to/from the list.
- struct WrapsMediaStreamSink {
- WrapsMediaStreamSink(MediaStreamAudioSink* sink) : sink_(sink) {}
- bool operator()(
- const scoped_refptr<MediaStreamAudioTrackSink>& owner) const {
- return owner->IsEqual(sink_);
- }
- MediaStreamAudioSink* sink_;
- };
-
- protected:
- virtual ~MediaStreamAudioTrackSink() {}
-
- private:
- friend class base::RefCountedThreadSafe<MediaStreamAudioTrackSink>;
-};
-
-} // namespace content
-
-#endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_TRACK_SINK_H_
« no previous file with comments | « content/renderer/media/media_stream_audio_track.cc ('k') | content/renderer/media/media_stream_audio_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698