| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 [DartPackage="mojo_services"] | 5 [DartPackage="mojo_services"] |
| 6 module mojo.media; | 6 module mojo.media; |
| 7 | 7 |
| 8 import "mojo/services/files/interfaces/types.mojom"; | |
| 9 import "mojo/services/media/common/interfaces/media_common.mojom"; | 8 import "mojo/services/media/common/interfaces/media_common.mojom"; |
| 10 | 9 |
| 11 // Reader with seek semantics. | 10 // Reader with seek semantics. |
| 12 interface SeekingReader { | 11 interface SeekingReader { |
| 13 const uint64 kUnknownSize = 0xffffffffffffffff; | 12 const uint64 kUnknownSize = 0xffffffffffffffff; |
| 14 | 13 |
| 15 // Gets the content size and whether the reader can seek. The |result| | 14 // Gets the content size and whether the reader can seek. The |result| |
| 16 // callback parameter is |OK| unless there was a problem accessing the | 15 // callback parameter is |OK| unless there was a problem accessing the |
| 17 // content to be read. Other possible values: | 16 // content to be read. Other possible values: |
| 18 // |NOT_FOUND| - The content could not be found. | 17 // |NOT_FOUND| - The content could not be found. |
| 19 // |UNKNOWN_ERROR| - Some other error occurred. | 18 // |UNKNOWN_ERROR| - Some other error occurred. |
| 20 // A |size| value of |kUnknownSize| if the size of the content isn't known. | 19 // A |size| value of |kUnknownSize| if the size of the content isn't known. |
| 21 Describe() => (MediaResult result, uint64 size, bool can_seek); | 20 Describe() => (MediaResult result, uint64 size, bool can_seek); |
| 22 | 21 |
| 23 // Reads into a data pipe starting at a specified position. If the reader | 22 // Reads into a data pipe starting at a specified position. If the reader |
| 24 // can't seek, position must be 0. The |result| callback parameter is |OK| | 23 // can't seek, position must be 0. The |result| callback parameter is |OK| |
| 25 // unless there was a problem performing the read. Other possible values: | 24 // unless there was a problem performing the read. Other possible values: |
| 26 // |NOT_FOUND| - The content could not be found. | 25 // |NOT_FOUND| - The content could not be found. |
| 27 // |INVALID_ARGUMENT| - The reader can't seek and |position| was non-zero. | 26 // |INVALID_ARGUMENT| - The reader can't seek and |position| was non-zero. |
| 28 // |UNKNOWN_ERROR| - Some other error occurred. | 27 // |UNKNOWN_ERROR| - Some other error occurred. |
| 29 ReadAt(uint64 position) => | 28 ReadAt(uint64 position) => |
| 30 (MediaResult result, handle<data_pipe_consumer>? data_pipe); | 29 (MediaResult result, handle<data_pipe_consumer>? data_pipe); |
| 31 }; | 30 }; |
| OLD | NEW |