| OLD | NEW |
| 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/usb_midi_descriptor_parser.h" | 5 #include "media/midi/usb_midi_descriptor_parser.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| 11 | 11 |
| 12 namespace media { | 12 namespace media { |
| 13 namespace midi { |
| 13 | 14 |
| 14 namespace { | 15 namespace { |
| 15 | 16 |
| 16 // The constants below are specified in USB spec, USB audio spec | 17 // The constants below are specified in USB spec, USB audio spec |
| 17 // and USB midi spec. | 18 // and USB midi spec. |
| 18 | 19 |
| 19 enum DescriptorType { | 20 enum DescriptorType { |
| 20 TYPE_DEVICE = 1, | 21 TYPE_DEVICE = 1, |
| 21 TYPE_CONFIGURATION = 2, | 22 TYPE_CONFIGURATION = 2, |
| 22 TYPE_STRING = 3, | 23 TYPE_STRING = 3, |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 return true; | 279 return true; |
| 279 } | 280 } |
| 280 | 281 |
| 281 void UsbMidiDescriptorParser::Clear() { | 282 void UsbMidiDescriptorParser::Clear() { |
| 282 is_parsing_usb_midi_interface_ = false; | 283 is_parsing_usb_midi_interface_ = false; |
| 283 current_endpoint_address_ = 0; | 284 current_endpoint_address_ = 0; |
| 284 current_cable_number_ = 0; | 285 current_cable_number_ = 0; |
| 285 incomplete_jacks_.clear(); | 286 incomplete_jacks_.clear(); |
| 286 } | 287 } |
| 287 | 288 |
| 289 } // namespace midi |
| 288 } // namespace media | 290 } // namespace media |
| OLD | NEW |