Chromium Code Reviews| 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 TextTrackConfig; | |
| 16 class VideoDecoderConfig; | 17 class VideoDecoderConfig; |
| 17 | 18 |
| 18 class MEDIA_EXPORT DemuxerStream { | 19 class MEDIA_EXPORT DemuxerStream { |
| 19 public: | 20 public: |
| 20 enum Type { | 21 enum Type { |
| 21 UNKNOWN, | 22 UNKNOWN, |
| 22 AUDIO, | 23 AUDIO, |
| 23 VIDEO, | 24 VIDEO, |
| 25 TEXT, | |
| 24 NUM_TYPES, // Always keep this entry as the last one! | 26 NUM_TYPES, // Always keep this entry as the last one! |
| 25 }; | 27 }; |
| 26 | 28 |
| 27 // Status returned in the Read() callback. | 29 // Status returned in the Read() callback. |
| 28 // kOk : Indicates the second parameter is Non-NULL and contains media data | 30 // kOk : Indicates the second parameter is Non-NULL and contains media data |
| 29 // or the end of the stream. | 31 // or the end of the stream. |
| 30 // kAborted : Indicates an aborted Read(). This can happen if the | 32 // kAborted : Indicates an aborted Read(). This can happen if the |
| 31 // DemuxerStream gets flushed and doesn't have any more data to | 33 // DemuxerStream gets flushed and doesn't have any more data to |
| 32 // return. The second parameter MUST be NULL when this status is | 34 // return. The second parameter MUST be NULL when this status is |
| 33 // returned. | 35 // returned. |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 55 virtual void Read(const ReadCB& read_cb) = 0; | 57 virtual void Read(const ReadCB& read_cb) = 0; |
| 56 | 58 |
| 57 // Returns the audio decoder configuration. It is an error to call this method | 59 // Returns the audio decoder configuration. It is an error to call this method |
| 58 // if type() != AUDIO. | 60 // if type() != AUDIO. |
| 59 virtual AudioDecoderConfig audio_decoder_config() = 0; | 61 virtual AudioDecoderConfig audio_decoder_config() = 0; |
| 60 | 62 |
| 61 // Returns the video decoder configuration. It is an error to call this method | 63 // Returns the video decoder configuration. It is an error to call this method |
| 62 // if type() != VIDEO. | 64 // if type() != VIDEO. |
| 63 virtual VideoDecoderConfig video_decoder_config() = 0; | 65 virtual VideoDecoderConfig video_decoder_config() = 0; |
| 64 | 66 |
| 67 // Returns the text track configuration. It is an error to call this method | |
| 68 // if type() != TEXT. | |
| 69 virtual TextTrackConfig text_track_config() = 0; | |
|
acolwell GONE FROM CHROMIUM
2013/10/21 20:10:40
nit: Is this really needed on the DemuxerStream in
Matthew Heaney (Chromium)
2013/10/23 05:09:01
Done.
| |
| 70 | |
| 65 // Returns the type of stream. | 71 // Returns the type of stream. |
| 66 virtual Type type() = 0; | 72 virtual Type type() = 0; |
| 67 | 73 |
| 68 virtual void EnableBitstreamConverter() = 0; | 74 virtual void EnableBitstreamConverter() = 0; |
| 69 | 75 |
| 70 protected: | 76 protected: |
| 71 // Only allow concrete implementations to get deleted. | 77 // Only allow concrete implementations to get deleted. |
| 72 virtual ~DemuxerStream(); | 78 virtual ~DemuxerStream(); |
| 73 }; | 79 }; |
| 74 | 80 |
| 75 } // namespace media | 81 } // namespace media |
| 76 | 82 |
| 77 #endif // MEDIA_BASE_DEMUXER_STREAM_H_ | 83 #endif // MEDIA_BASE_DEMUXER_STREAM_H_ |
| OLD | NEW |