toyoshim@chromium.org | a97eebf | 2014-01-03 07:52:39 +0000 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
dnicoara@chromium.org | 9f2a6f0 | 2014-01-03 21:25:00 +0000 | [diff] [blame] | 5 | #ifndef MEDIA_MIDI_MIDI_MANAGER_ALSA_H_ |
| 6 | #define MEDIA_MIDI_MIDI_MANAGER_ALSA_H_ |
toyoshim@chromium.org | a97eebf | 2014-01-03 07:52:39 +0000 | [diff] [blame] | 7 | |
| 8 | #include <vector> |
| 9 | |
| 10 | #include "base/basictypes.h" |
| 11 | #include "base/memory/scoped_ptr.h" |
| 12 | #include "base/threading/thread.h" |
| 13 | #include "media/midi/midi_manager.h" |
| 14 | |
| 15 | namespace media { |
| 16 | |
dnicoara@chromium.org | 9f2a6f0 | 2014-01-03 21:25:00 +0000 | [diff] [blame] | 17 | class MIDIManagerAlsa : public MIDIManager { |
toyoshim@chromium.org | a97eebf | 2014-01-03 07:52:39 +0000 | [diff] [blame] | 18 | public: |
dnicoara@chromium.org | 9f2a6f0 | 2014-01-03 21:25:00 +0000 | [diff] [blame] | 19 | MIDIManagerAlsa(); |
| 20 | virtual ~MIDIManagerAlsa(); |
toyoshim@chromium.org | a97eebf | 2014-01-03 07:52:39 +0000 | [diff] [blame] | 21 | |
| 22 | // MIDIManager implementation. |
| 23 | virtual bool Initialize() OVERRIDE; |
| 24 | virtual void DispatchSendMIDIData(MIDIManagerClient* client, |
| 25 | uint32 port_index, |
| 26 | const std::vector<uint8>& data, |
| 27 | double timestamp) OVERRIDE; |
| 28 | |
| 29 | private: |
| 30 | class MIDIDeviceInfo; |
| 31 | std::vector<scoped_refptr<MIDIDeviceInfo> > in_devices_; |
| 32 | std::vector<scoped_refptr<MIDIDeviceInfo> > out_devices_; |
| 33 | base::Thread send_thread_; |
dnicoara@chromium.org | 9f2a6f0 | 2014-01-03 21:25:00 +0000 | [diff] [blame] | 34 | DISALLOW_COPY_AND_ASSIGN(MIDIManagerAlsa); |
toyoshim@chromium.org | a97eebf | 2014-01-03 07:52:39 +0000 | [diff] [blame] | 35 | }; |
| 36 | |
| 37 | } // namespace media |
| 38 | |
dnicoara@chromium.org | 9f2a6f0 | 2014-01-03 21:25:00 +0000 | [diff] [blame] | 39 | #endif // MEDIA_MIDI_MIDI_MANAGER_ALSA_H_ |