| 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/local_media_stream_audio_source.h" | 5 #include "content/renderer/media/local_media_stream_audio_source.h" |
| 6 | 6 |
| 7 #include "content/common/media/media_stream_options.h" | 7 #include "content/common/media/media_stream_options.h" |
| 8 #include "content/renderer/media/audio_device_factory.h" | 8 #include "content/renderer/media/audio_device_factory.h" |
| 9 #include "content/renderer/render_frame_impl.h" | 9 #include "content/renderer/render_frame_impl.h" |
| 10 | 10 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 // TODO(miu): Plumbing is needed to determine the actual capture timestamp | 92 // TODO(miu): Plumbing is needed to determine the actual capture timestamp |
| 93 // of the audio, instead of just snapshotting TimeTicks::Now(), for proper | 93 // of the audio, instead of just snapshotting TimeTicks::Now(), for proper |
| 94 // audio/video sync. http://crbug.com/335335 | 94 // audio/video sync. http://crbug.com/335335 |
| 95 MediaStreamAudioSource::DeliverDataToTracks( | 95 MediaStreamAudioSource::DeliverDataToTracks( |
| 96 *audio_bus, | 96 *audio_bus, |
| 97 base::TimeTicks::Now() - | 97 base::TimeTicks::Now() - |
| 98 base::TimeDelta::FromMilliseconds(audio_delay_milliseconds)); | 98 base::TimeDelta::FromMilliseconds(audio_delay_milliseconds)); |
| 99 } | 99 } |
| 100 | 100 |
| 101 void LocalMediaStreamAudioSource::OnCaptureError(const std::string& why) { | 101 void LocalMediaStreamAudioSource::OnCaptureError(const std::string& why) { |
| 102 // As of this writing, this method doesn't get called for anything useful, | 102 OnAudioCaptureError(why); |
| 103 // and all other implementors just log the message, but don't disconnect sinks | |
| 104 // or take any other action. So, just log the error. | |
| 105 LOG(ERROR) << why; | |
| 106 } | 103 } |
| 107 | 104 |
| 108 } // namespace content | 105 } // namespace content |
| OLD | NEW |