| OLD | NEW |
| (Empty) | |
| 1 module media; |
| 2 |
| 3 enum MidiResultMojo { |
| 4 NOT_INITIALIZED = -1, |
| 5 OK = 0, |
| 6 NOT_SUPPORTED, |
| 7 INITIALIZATION_ERROR, |
| 8 }; |
| 9 |
| 10 struct MidiPortInfoMojo { |
| 11 string id; |
| 12 string manufacturer; |
| 13 string name; |
| 14 string version; |
| 15 }; |
| 16 |
| 17 // Renderer -> Browser |
| 18 interface MidiService { |
| 19 StartSession(MidiServiceClient client) => (MidiResultMojo result); |
| 20 EndSession(); |
| 21 SendData(uint32 port, array<uint8> data, double timestamp); |
| 22 }; |
| 23 |
| 24 // Browser -> Renderer |
| 25 interface MidiServiceClient { |
| 26 AcknowledgeSentData(uint32 bytes_sent); |
| 27 AddInputPort(MidiPortInfoMojo input_port); |
| 28 AddOutputPort(MidiPortInfoMojo input_port); |
| 29 DataReceived(uint32 port, array<uint8> data, double timestamp); |
| 30 }; |
| OLD | NEW |