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

Issue 993273002: device/bluetooth: Add I/O watcher for audio data retrieval triggered by state change. (Closed)

Created:
5 years, 9 months ago by Miao
Modified:
5 years, 9 months ago
Reviewers:
armansito, Ben Chan
CC:
chromium-reviews, stevenjb+watch_chromium.org, hashimoto+watch_chromium.org, oshima+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

device/bluetooth: Add I/O watcher for audio data retrieval triggered by state change. This CL implements the state change handling and data retrieval during BT audio streaming. BluetoothAudioSinkDataAvailable() is added in order to deliver audio data to the user application. File descriptor watcher operations are bound to state change events from BluetoothMediaTransportClient. Note that the ownership of the output file descriptor is transferred from BlueZ to BluetoothAudioSinkChromeOS. This CL also implements Acquire/ TryAcquire of FakeBluetoothMediaTransportClient. Corresponding tests are added to address new changes and TODOs. BUG=441581 TEST=device_unittests --gtest_filter=*AudioSink* Committed: https://crrev.com/512445e1c5fd77acfbce6d5540b8e938d1702f29 Cr-Commit-Position: refs/heads/master@{#320571}

Patch Set 1 #

Total comments: 54

Patch Set 2 : Moved some overrides of BluetoothAudioSinkChromeOS to its private section and fixed nits. #

Total comments: 2

Patch Set 3 : Added AcquireDelegate function and refactored Acquire/TryAcquire. #

Total comments: 2

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+755 lines, -181 lines) Patch
M chromeos/dbus/bluetooth_media_endpoint_service_provider.cc View 1 chunk +1 line, -1 line 0 comments Download
M chromeos/dbus/bluetooth_media_transport_client.h View 1 1 chunk +1 line, -1 line 0 comments Download
M chromeos/dbus/bluetooth_media_transport_client.cc View 1 1 chunk +10 lines, -1 line 0 comments Download
M chromeos/dbus/fake_bluetooth_media_transport_client.h View 1 2 3 4 chunks +28 lines, -9 lines 0 comments Download
M chromeos/dbus/fake_bluetooth_media_transport_client.cc View 1 2 3 6 chunks +124 lines, -35 lines 0 comments Download
M device/bluetooth/bluetooth_audio_sink.h View 1 1 chunk +8 lines, -3 lines 0 comments Download
M device/bluetooth/bluetooth_audio_sink_chromeos.h View 1 6 chunks +67 lines, -21 lines 0 comments Download
M device/bluetooth/bluetooth_audio_sink_chromeos.cc View 1 15 chunks +195 lines, -78 lines 0 comments Download
M device/bluetooth/bluetooth_audio_sink_chromeos_unittest.cc View 1 28 chunks +321 lines, -32 lines 0 comments Download

Messages

Total messages: 14 (3 generated)
Miao
This CL is ready for review.
5 years, 9 months ago (2015-03-11 07:16:32 UTC) #2
armansito
Mostly nits, looks good overall! https://codereview.chromium.org/993273002/diff/1/chromeos/dbus/bluetooth_media_transport_client.cc File chromeos/dbus/bluetooth_media_transport_client.cc (right): https://codereview.chromium.org/993273002/diff/1/chromeos/dbus/bluetooth_media_transport_client.cc#newcode253 chromeos/dbus/bluetooth_media_transport_client.cc:253: callback.Run(fd.TakeValue(), read_mtu, write_mtu); You ...
5 years, 9 months ago (2015-03-12 03:42:55 UTC) #3
Miao
https://codereview.chromium.org/993273002/diff/1/chromeos/dbus/bluetooth_media_transport_client.cc File chromeos/dbus/bluetooth_media_transport_client.cc (right): https://codereview.chromium.org/993273002/diff/1/chromeos/dbus/bluetooth_media_transport_client.cc#newcode253 chromeos/dbus/bluetooth_media_transport_client.cc:253: callback.Run(fd.TakeValue(), read_mtu, write_mtu); On 2015/03/12 03:42:54, armansito wrote: > ...
5 years, 9 months ago (2015-03-12 22:33:32 UTC) #4
armansito
https://codereview.chromium.org/993273002/diff/1/chromeos/dbus/fake_bluetooth_media_transport_client.cc File chromeos/dbus/fake_bluetooth_media_transport_client.cc (right): https://codereview.chromium.org/993273002/diff/1/chromeos/dbus/fake_bluetooth_media_transport_client.cc#newcode197 chromeos/dbus/fake_bluetooth_media_transport_client.cc:197: SetState(endpoint_path, "active"); On 2015/03/12 22:33:31, Miao wrote: > On ...
5 years, 9 months ago (2015-03-12 23:59:08 UTC) #5
armansito
https://codereview.chromium.org/993273002/diff/20001/chromeos/dbus/fake_bluetooth_media_transport_client.cc File chromeos/dbus/fake_bluetooth_media_transport_client.cc (right): https://codereview.chromium.org/993273002/diff/20001/chromeos/dbus/fake_bluetooth_media_transport_client.cc#newcode199 chromeos/dbus/fake_bluetooth_media_transport_client.cc:199: callback.Run(new dbus::FileDescriptor(fds[1]), kReadMtu, kWriteMtu); You're potentially leaking memory here, ...
5 years, 9 months ago (2015-03-13 00:00:31 UTC) #6
Miao
https://codereview.chromium.org/993273002/diff/20001/chromeos/dbus/fake_bluetooth_media_transport_client.cc File chromeos/dbus/fake_bluetooth_media_transport_client.cc (right): https://codereview.chromium.org/993273002/diff/20001/chromeos/dbus/fake_bluetooth_media_transport_client.cc#newcode199 chromeos/dbus/fake_bluetooth_media_transport_client.cc:199: callback.Run(new dbus::FileDescriptor(fds[1]), kReadMtu, kWriteMtu); On 2015/03/13 00:00:31, armansito wrote: ...
5 years, 9 months ago (2015-03-13 00:41:41 UTC) #7
armansito
Looks a lot better, lgtm with one comment. https://codereview.chromium.org/993273002/diff/40001/chromeos/dbus/fake_bluetooth_media_transport_client.h File chromeos/dbus/fake_bluetooth_media_transport_client.h (right): https://codereview.chromium.org/993273002/diff/40001/chromeos/dbus/fake_bluetooth_media_transport_client.h#newcode122 chromeos/dbus/fake_bluetooth_media_transport_client.h:122: void ...
5 years, 9 months ago (2015-03-13 01:31:42 UTC) #8
Miao
https://codereview.chromium.org/993273002/diff/40001/chromeos/dbus/fake_bluetooth_media_transport_client.h File chromeos/dbus/fake_bluetooth_media_transport_client.h (right): https://codereview.chromium.org/993273002/diff/40001/chromeos/dbus/fake_bluetooth_media_transport_client.h#newcode122 chromeos/dbus/fake_bluetooth_media_transport_client.h:122: void AcquireDelegate(bool try_flag, On 2015/03/13 01:31:42, armansito wrote: > ...
5 years, 9 months ago (2015-03-13 19:21:00 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/993273002/60001
5 years, 9 months ago (2015-03-13 19:21:36 UTC) #12
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 9 months ago (2015-03-13 21:00:13 UTC) #13
commit-bot: I haz the power
5 years, 9 months ago (2015-03-13 21:01:09 UTC) #14
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/512445e1c5fd77acfbce6d5540b8e938d1702f29
Cr-Commit-Position: refs/heads/master@{#320571}

Powered by Google App Engine
This is Rietveld 408576698