OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_DEMUXER_STREAM_H_ | 5 #ifndef MEDIA_BASE_DEMUXER_STREAM_H_ |
6 #define MEDIA_BASE_DEMUXER_STREAM_H_ | 6 #define MEDIA_BASE_DEMUXER_STREAM_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "media/base/media_export.h" | 10 #include "media/base/media_export.h" |
11 | 11 |
12 namespace media { | 12 namespace media { |
13 | 13 |
14 class AudioDecoderConfig; | 14 class AudioDecoderConfig; |
15 class DecoderBuffer; | 15 class DecoderBuffer; |
16 class VideoDecoderConfig; | 16 class VideoDecoderConfig; |
17 | 17 |
18 class MEDIA_EXPORT DemuxerStream { | 18 class MEDIA_EXPORT DemuxerStream { |
19 public: | 19 public: |
20 enum Type { | 20 enum Type { |
21 UNKNOWN, | 21 UNKNOWN, |
22 AUDIO, | 22 AUDIO, |
23 VIDEO, | 23 VIDEO, |
| 24 TEXT, |
24 NUM_TYPES, // Always keep this entry as the last one! | 25 NUM_TYPES, // Always keep this entry as the last one! |
25 }; | 26 }; |
26 | 27 |
27 // Status returned in the Read() callback. | 28 // Status returned in the Read() callback. |
28 // kOk : Indicates the second parameter is Non-NULL and contains media data | 29 // kOk : Indicates the second parameter is Non-NULL and contains media data |
29 // or the end of the stream. | 30 // or the end of the stream. |
30 // kAborted : Indicates an aborted Read(). This can happen if the | 31 // kAborted : Indicates an aborted Read(). This can happen if the |
31 // DemuxerStream gets flushed and doesn't have any more data to | 32 // DemuxerStream gets flushed and doesn't have any more data to |
32 // return. The second parameter MUST be NULL when this status is | 33 // return. The second parameter MUST be NULL when this status is |
33 // returned. | 34 // returned. |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 virtual void EnableBitstreamConverter() = 0; | 69 virtual void EnableBitstreamConverter() = 0; |
69 | 70 |
70 protected: | 71 protected: |
71 // Only allow concrete implementations to get deleted. | 72 // Only allow concrete implementations to get deleted. |
72 virtual ~DemuxerStream(); | 73 virtual ~DemuxerStream(); |
73 }; | 74 }; |
74 | 75 |
75 } // namespace media | 76 } // namespace media |
76 | 77 |
77 #endif // MEDIA_BASE_DEMUXER_STREAM_H_ | 78 #endif // MEDIA_BASE_DEMUXER_STREAM_H_ |
OLD | NEW |