OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 MEDIA_BASE_MOCK_READER_H_ | 5 #ifndef MEDIA_BASE_MOCK_READER_H_ |
6 #define MEDIA_BASE_MOCK_READER_H_ | 6 #define MEDIA_BASE_MOCK_READER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/ref_counted.h" | 11 #include "base/ref_counted.h" |
12 #include "base/waitable_event.h" | |
13 #include "media/base/filters.h" | 12 #include "media/base/filters.h" |
14 | 13 |
15 namespace media { | 14 namespace media { |
16 | 15 |
17 // Ref counted object so we can create callbacks for asynchronous Read() | 16 // Ref counted object so we can create callbacks for asynchronous Read() |
18 // methods for any filter type. | 17 // methods for any filter type. |
19 template <class FilterType, class BufferType> | 18 template <class FilterType, class BufferType> |
20 class MockReader : | 19 class MockReader : |
21 public base::RefCountedThreadSafe<MockReader<FilterType, BufferType> > { | 20 public base::RefCountedThreadSafe<MockReader<FilterType, BufferType> > { |
22 public: | 21 public: |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 }; | 70 }; |
72 | 71 |
73 // Commonly used reader types. | 72 // Commonly used reader types. |
74 typedef MockReader<DemuxerStream, Buffer> DemuxerStreamReader; | 73 typedef MockReader<DemuxerStream, Buffer> DemuxerStreamReader; |
75 typedef MockReader<AudioDecoder, Buffer> AudioDecoderReader; | 74 typedef MockReader<AudioDecoder, Buffer> AudioDecoderReader; |
76 typedef MockReader<VideoDecoder, VideoFrame> VideoDecoderReader; | 75 typedef MockReader<VideoDecoder, VideoFrame> VideoDecoderReader; |
77 | 76 |
78 } // namespace media | 77 } // namespace media |
79 | 78 |
80 #endif // MEDIA_BASE_MOCK_READER_H_ | 79 #endif // MEDIA_BASE_MOCK_READER_H_ |
OLD | NEW |