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 #ifndef SERVICES_MEDIA_FRAMEWORK_PARTS_READER_H_ | 5 #ifndef SERVICES_MEDIA_FRAMEWORK_PARTS_READER_H_ |
6 #define SERVICES_MEDIA_FRAMEWORK_PARTS_READER_H_ | 6 #define SERVICES_MEDIA_FRAMEWORK_PARTS_READER_H_ |
7 | 7 |
8 #include <limits> | 8 #include <limits> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
11 #include "mojo/public/cpp/application/application_impl.h" | |
12 #include "services/media/framework/result.h" | 11 #include "services/media/framework/result.h" |
13 | 12 |
14 namespace mojo { | 13 namespace mojo { |
15 namespace media { | 14 namespace media { |
16 | 15 |
17 // Abstract base class for objects that read raw data on behalf of demuxes. | 16 // Abstract base class for objects that read raw data on behalf of demuxes. |
18 class Reader { | 17 class Reader { |
19 public: | 18 public: |
20 using DescribeCallback = | 19 using DescribeCallback = |
21 std::function<void(Result result, size_t size, bool can_seek)>; | 20 std::function<void(Result result, size_t size, bool can_seek)>; |
(...skipping 14 matching lines...) Expand all Loading... |
36 virtual void ReadAt(size_t position, | 35 virtual void ReadAt(size_t position, |
37 uint8_t* buffer, | 36 uint8_t* buffer, |
38 size_t bytes_to_read, | 37 size_t bytes_to_read, |
39 const ReadAtCallback& callback) = 0; | 38 const ReadAtCallback& callback) = 0; |
40 }; | 39 }; |
41 | 40 |
42 } // namespace media | 41 } // namespace media |
43 } // namespace mojo | 42 } // namespace mojo |
44 | 43 |
45 #endif // MOJO_SERVICES_MEDIA_READER_H_ | 44 #endif // MOJO_SERVICES_MEDIA_READER_H_ |
OLD | NEW |