| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/external_media_stream_audio_source.h" | 5 #include "content/renderer/media/external_media_stream_audio_source.h" |
| 6 | 6 |
| 7 namespace content { | 7 namespace content { |
| 8 | 8 |
| 9 ExternalMediaStreamAudioSource::ExternalMediaStreamAudioSource( | 9 ExternalMediaStreamAudioSource::ExternalMediaStreamAudioSource( |
| 10 scoped_refptr<media::AudioCapturerSource> source, | 10 scoped_refptr<media::AudioCapturerSource> source, |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 // TODO(miu): Plumbing is needed to determine the actual capture timestamp | 65 // TODO(miu): Plumbing is needed to determine the actual capture timestamp |
| 66 // of the audio, instead of just snapshotting TimeTicks::Now(), for proper | 66 // of the audio, instead of just snapshotting TimeTicks::Now(), for proper |
| 67 // audio/video sync. http://crbug.com/335335 | 67 // audio/video sync. http://crbug.com/335335 |
| 68 MediaStreamAudioSource::DeliverDataToTracks( | 68 MediaStreamAudioSource::DeliverDataToTracks( |
| 69 *audio_bus, | 69 *audio_bus, |
| 70 base::TimeTicks::Now() - | 70 base::TimeTicks::Now() - |
| 71 base::TimeDelta::FromMilliseconds(audio_delay_milliseconds)); | 71 base::TimeDelta::FromMilliseconds(audio_delay_milliseconds)); |
| 72 } | 72 } |
| 73 | 73 |
| 74 void ExternalMediaStreamAudioSource::OnCaptureError(const std::string& why) { | 74 void ExternalMediaStreamAudioSource::OnCaptureError(const std::string& why) { |
| 75 // As of this writing, this method doesn't get called for anything useful, | 75 StopSourceOnError(why); |
| 76 // and all other implementors just log the message, but don't disconnect sinks | |
| 77 // or take any other action. So, just log the error. | |
| 78 LOG(ERROR) << why; | |
| 79 } | 76 } |
| 80 | 77 |
| 81 } // namespace content | 78 } // namespace content |
| OLD | NEW |