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

Side by Side Diff: content/renderer/media/media_stream_impl.cc

Issue 11359196: Associate audio streams with their source/destination RenderView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Plus, removed CalledOnValidThread DCHECK from sampleRate() call since nothing mutates. Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/media/media_stream_impl.h" 5 #include "content/renderer/media/media_stream_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 } 545 }
546 546
547 scoped_refptr<WebRtcAudioRenderer> MediaStreamImpl::CreateRemoteAudioRenderer( 547 scoped_refptr<WebRtcAudioRenderer> MediaStreamImpl::CreateRemoteAudioRenderer(
548 webrtc::MediaStreamInterface* stream) { 548 webrtc::MediaStreamInterface* stream) {
549 if (!stream->audio_tracks() || stream->audio_tracks()->count() == 0) 549 if (!stream->audio_tracks() || stream->audio_tracks()->count() == 0)
550 return NULL; 550 return NULL;
551 551
552 DVLOG(1) << "MediaStreamImpl::CreateRemoteAudioRenderer label:" 552 DVLOG(1) << "MediaStreamImpl::CreateRemoteAudioRenderer label:"
553 << stream->label(); 553 << stream->label();
554 554
555 return new WebRtcAudioRenderer(); 555 return new WebRtcAudioRenderer(RenderViewObserver::routing_id());
556 } 556 }
557 557
558 MediaStreamSourceExtraData::MediaStreamSourceExtraData( 558 MediaStreamSourceExtraData::MediaStreamSourceExtraData(
559 const StreamDeviceInfo& device_info) 559 const StreamDeviceInfo& device_info)
560 : device_info_(device_info) { 560 : device_info_(device_info) {
561 } 561 }
562 562
563 MediaStreamSourceExtraData::~MediaStreamSourceExtraData() {} 563 MediaStreamSourceExtraData::~MediaStreamSourceExtraData() {}
564 564
565 MediaStreamExtraData::MediaStreamExtraData( 565 MediaStreamExtraData::MediaStreamExtraData(
(...skipping 13 matching lines...) Expand all
579 const StreamStopCallback& stop_callback) { 579 const StreamStopCallback& stop_callback) {
580 stream_stop_callback_ = stop_callback; 580 stream_stop_callback_ = stop_callback;
581 } 581 }
582 582
583 void MediaStreamExtraData::OnLocalStreamStop() { 583 void MediaStreamExtraData::OnLocalStreamStop() {
584 if (!stream_stop_callback_.is_null()) 584 if (!stream_stop_callback_.is_null())
585 stream_stop_callback_.Run(local_stream_->label()); 585 stream_stop_callback_.Run(local_stream_->label());
586 } 586 }
587 587
588 } // namespace content 588 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/audio_renderer_mixer_manager_unittest.cc ('k') | content/renderer/media/render_audiosourceprovider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698