OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "device/bluetooth/bluetooth_audio_sink_chromeos.h" | 5 #include "device/bluetooth/bluetooth_audio_sink_chromeos.h" |
6 | 6 |
7 #include <unistd.h> | 7 #include <unistd.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <sstream> | 10 #include <sstream> |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 if (size == -1) { | 393 if (size == -1) { |
394 // To reduce the number of logs, log only once for multiple failures. | 394 // To reduce the number of logs, log only once for multiple failures. |
395 if (!read_has_failed_) { | 395 if (!read_has_failed_) { |
396 VLOG(1) << "ReadFromFile - failed"; | 396 VLOG(1) << "ReadFromFile - failed"; |
397 read_has_failed_ = true; | 397 read_has_failed_ = true; |
398 } | 398 } |
399 return; | 399 return; |
400 } | 400 } |
401 | 401 |
402 VLOG(1) << "ReadFromFile - read " << size << " bytes"; | 402 VLOG(1) << "ReadFromFile - read " << size << " bytes"; |
403 FOR_EACH_OBSERVER(BluetoothAudioSink::Observer, observers_, | 403 FOR_EACH_OBSERVER( |
404 BluetoothAudioSinkDataAvailable(this, data_.get(), size)); | 404 BluetoothAudioSink::Observer, observers_, |
| 405 BluetoothAudioSinkDataAvailable(this, data_.get(), size, read_mtu_)); |
405 } | 406 } |
406 | 407 |
407 void BluetoothAudioSinkChromeOS::StateChanged( | 408 void BluetoothAudioSinkChromeOS::StateChanged( |
408 BluetoothAudioSink::State state) { | 409 BluetoothAudioSink::State state) { |
409 if (state == state_) | 410 if (state == state_) |
410 return; | 411 return; |
411 | 412 |
412 VLOG(1) << "StateChanged - state: " << StateToString(state); | 413 VLOG(1) << "StateChanged - state: " << StateToString(state); |
413 | 414 |
414 switch (state) { | 415 switch (state) { |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 } | 560 } |
560 | 561 |
561 void BluetoothAudioSinkChromeOS::ResetEndpoint() { | 562 void BluetoothAudioSinkChromeOS::ResetEndpoint() { |
562 VLOG(1) << "ResetEndpoint"; | 563 VLOG(1) << "ResetEndpoint"; |
563 | 564 |
564 endpoint_path_ = ObjectPath(""); | 565 endpoint_path_ = ObjectPath(""); |
565 media_endpoint_ = nullptr; | 566 media_endpoint_ = nullptr; |
566 } | 567 } |
567 | 568 |
568 } // namespace chromeos | 569 } // namespace chromeos |
OLD | NEW |