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

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

Issue 90743004: Add generic interfaces for the sinks of the media stream audio track (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed the nits. Created 7 years 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/webrtc_audio_capturer_sink_owner.h
diff --git a/content/renderer/media/webrtc_audio_capturer_sink_owner.h b/content/renderer/media/webrtc_audio_capturer_sink_owner.h
deleted file mode 100644
index f338209224daf6401e84206dfe9058d5c624db2d..0000000000000000000000000000000000000000
--- a/content/renderer/media/webrtc_audio_capturer_sink_owner.h
+++ /dev/null
@@ -1,66 +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_WEBRTC_AUDIO_CAPTURER_SINK_OWNER_H_
-#define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_SINK_OWNER_H_
-
-#include <vector>
-
-#include "base/memory/ref_counted.h"
-#include "base/synchronization/lock.h"
-#include "content/renderer/media/webrtc_audio_device_impl.h"
-#include "media/audio/audio_parameters.h"
-
-namespace content {
-
-class WebRtcAudioCapturerSink;
-
-// Reference counted container of WebRtcAudioCapturerSink delegates.
-class WebRtcAudioCapturerSinkOwner
- : public base::RefCountedThreadSafe<WebRtcAudioCapturerSinkOwner>,
- public WebRtcAudioCapturerSink {
- public:
- explicit WebRtcAudioCapturerSinkOwner(WebRtcAudioCapturerSink* sink);
-
- // WebRtcAudioCapturerSink implementation.
- virtual int CaptureData(const std::vector<int>& channels,
- const int16* audio_data,
- int sample_rate,
- int number_of_channels,
- int number_of_frames,
- int audio_delay_milliseconds,
- int current_volume,
- bool need_audio_processing,
- bool key_pressed) OVERRIDE;
-
- virtual void SetCaptureFormat(const media::AudioParameters& params) OVERRIDE;
-
- bool IsEqual(const WebRtcAudioCapturerSink* other) const;
- void Reset();
-
- // Wrapper which allows to use std::find_if() when adding and removing
- // sinks to/from the list.
- struct WrapsSink {
- WrapsSink(WebRtcAudioCapturerSink* sink) : sink_(sink) {}
- bool operator()(
- const scoped_refptr<WebRtcAudioCapturerSinkOwner>& owner) {
- return owner->IsEqual(sink_);
- }
- WebRtcAudioCapturerSink* sink_;
- };
-
- protected:
- virtual ~WebRtcAudioCapturerSinkOwner() {}
-
- private:
- friend class base::RefCountedThreadSafe<WebRtcAudioCapturerSinkOwner>;
- WebRtcAudioCapturerSink* delegate_;
- mutable base::Lock lock_;
-
- DISALLOW_COPY_AND_ASSIGN(WebRtcAudioCapturerSinkOwner);
-};
-
-} // namespace content
-
-#endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_CAPTURER_SINK_OWNER_H_
« no previous file with comments | « content/renderer/media/webrtc_audio_capturer.cc ('k') | content/renderer/media/webrtc_audio_capturer_sink_owner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698