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

Unified Diff: content/renderer/media/peer_connection_audio_sink_owner.cc

Issue 671793004: Clean up the media stream audio track code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 6 years, 1 month 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/peer_connection_audio_sink_owner.cc
diff --git a/content/renderer/media/peer_connection_audio_sink_owner.cc b/content/renderer/media/peer_connection_audio_sink_owner.cc
deleted file mode 100644
index 4073ac614258baf3afb0b509b7ddd4e1855b6a37..0000000000000000000000000000000000000000
--- a/content/renderer/media/peer_connection_audio_sink_owner.cc
+++ /dev/null
@@ -1,71 +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.
-
-#include "content/renderer/media/peer_connection_audio_sink_owner.h"
-
-#include "content/renderer/media/webrtc_audio_device_impl.h"
-
-namespace content {
-
-PeerConnectionAudioSinkOwner::PeerConnectionAudioSinkOwner(
- PeerConnectionAudioSink* sink)
- : delegate_(sink) {
-}
-
-int PeerConnectionAudioSinkOwner::OnData(const int16* audio_data,
- int sample_rate,
- int number_of_channels,
- int number_of_frames,
- const std::vector<int>& channels,
- int audio_delay_milliseconds,
- int current_volume,
- bool need_audio_processing,
- bool key_pressed) {
- base::AutoLock lock(lock_);
- if (delegate_) {
- return delegate_->OnData(audio_data,
- sample_rate,
- number_of_channels,
- number_of_frames,
- channels,
- audio_delay_milliseconds,
- current_volume,
- need_audio_processing,
- key_pressed);
- }
-
- return 0;
-}
-
-void PeerConnectionAudioSinkOwner::OnSetFormat(
- const media::AudioParameters& params) {
- base::AutoLock lock(lock_);
- if (delegate_)
- delegate_->OnSetFormat(params);
-}
-
-void PeerConnectionAudioSinkOwner::OnReadyStateChanged(
- blink::WebMediaStreamSource::ReadyState state) {
- // Not forwarded at the moment.
-}
-
-void PeerConnectionAudioSinkOwner::Reset() {
- base::AutoLock lock(lock_);
- delegate_ = NULL;
-}
-
-bool PeerConnectionAudioSinkOwner::IsEqual(
- const MediaStreamAudioSink* other) const {
- DCHECK(other);
- return false;
-}
-
-bool PeerConnectionAudioSinkOwner::IsEqual(
- const PeerConnectionAudioSink* other) const {
- DCHECK(other);
- base::AutoLock lock(lock_);
- return (other == delegate_);
-}
-
-} // namespace content

Powered by Google App Engine
This is Rietveld 408576698