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

Side by Side Diff: media/midi/midi_manager_alsa.cc

Issue 2135903002: Fix initialization of udev in MidiManagerAlsa. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "media/midi/midi_manager_alsa.h" 5 #include "media/midi/midi_manager_alsa.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <poll.h> 8 #include <poll.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <stdlib.h> 10 #include <stdlib.h>
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 } 262 }
263 263
264 // Success! Now, initialize members from the temporaries. Do not 264 // Success! Now, initialize members from the temporaries. Do not
265 // initialize these earlier, since they need to be destroyed by the 265 // initialize these earlier, since they need to be destroyed by the
266 // thread that calls Finalize(), not the destructor thread (and we 266 // thread that calls Finalize(), not the destructor thread (and we
267 // check this in the destructor). 267 // check this in the destructor).
268 in_client_.reset(in_client.release()); 268 in_client_.reset(in_client.release());
269 out_client_.reset(out_client.release()); 269 out_client_.reset(out_client.release());
270 decoder_.reset(decoder.release()); 270 decoder_.reset(decoder.release());
271 udev_.reset(udev.release()); 271 udev_.reset(udev.release());
272 udev_monitor_.reset(udev_monitor_.release()); 272 udev_monitor_.reset(udev_monitor.release());
273 273
274 // Generate hotplug events for existing ports. 274 // Generate hotplug events for existing ports.
275 // TODO(agoode): Check the return value for failure. 275 // TODO(agoode): Check the return value for failure.
276 EnumerateAlsaPorts(); 276 EnumerateAlsaPorts();
277 277
278 // Generate hotplug events for existing udev devices. This must be done 278 // Generate hotplug events for existing udev devices. This must be done
279 // after udev_monitor_enable_receiving() is called. See the algorithm 279 // after udev_monitor_enable_receiving() is called. See the algorithm
280 // at http://www.signal11.us/oss/udev/. 280 // at http://www.signal11.us/oss/udev/.
281 EnumerateUdevCards(); 281 EnumerateUdevCards();
282 282
(...skipping 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after
1394 source_map_[AddrToInt(client_id, port_id)] = port_index; 1394 source_map_[AddrToInt(client_id, port_id)] = port_index;
1395 return true; 1395 return true;
1396 } 1396 }
1397 1397
1398 MidiManager* MidiManager::Create() { 1398 MidiManager* MidiManager::Create() {
1399 return new MidiManagerAlsa(); 1399 return new MidiManagerAlsa();
1400 } 1400 }
1401 1401
1402 } // namespace midi 1402 } // namespace midi
1403 } // namespace media 1403 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698