OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |