| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // Implements a Demuxer that can switch among different data sources mid-stream. | 5 // Implements a Demuxer that can switch among different data sources mid-stream. |
| 6 // Uses FFmpegDemuxer under the covers, so see the caveats at the top of | 6 // Uses FFmpegDemuxer under the covers, so see the caveats at the top of |
| 7 // ffmpeg_demuxer.h. | 7 // ffmpeg_demuxer.h. |
| 8 | 8 |
| 9 #ifndef MEDIA_FILTERS_ADAPTIVE_DEMUXER_H_ | 9 #ifndef MEDIA_FILTERS_ADAPTIVE_DEMUXER_H_ |
| 10 #define MEDIA_FILTERS_ADAPTIVE_DEMUXER_H_ | 10 #define MEDIA_FILTERS_ADAPTIVE_DEMUXER_H_ |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 // referenced pointer must not be NULL. The SeekFunction parameter | 63 // referenced pointer must not be NULL. The SeekFunction parameter |
| 64 // provides a way to seek |streams_[index]| to a specific time. | 64 // provides a way to seek |streams_[index]| to a specific time. |
| 65 void ChangeCurrentStream(int index, const SeekFunction& seek_function, | 65 void ChangeCurrentStream(int index, const SeekFunction& seek_function, |
| 66 const PipelineStatusCB& cb); | 66 const PipelineStatusCB& cb); |
| 67 | 67 |
| 68 // DemuxerStream methods. | 68 // DemuxerStream methods. |
| 69 virtual void Read(const ReadCallback& read_callback); | 69 virtual void Read(const ReadCallback& read_callback); |
| 70 virtual Type type(); | 70 virtual Type type(); |
| 71 virtual void EnableBitstreamConverter(); | 71 virtual void EnableBitstreamConverter(); |
| 72 virtual AVStream* GetAVStream(); | 72 virtual AVStream* GetAVStream(); |
| 73 virtual const AudioDecoderConfig& audio_decoder_config(); |
| 73 | 74 |
| 74 private: | 75 private: |
| 75 // Returns a pointer to the current stream. | 76 // Returns a pointer to the current stream. |
| 76 DemuxerStream* current_stream(); | 77 DemuxerStream* current_stream(); |
| 77 | 78 |
| 78 // DEBUG_MODE-only CHECK that the data members are in a reasonable state. | 79 // DEBUG_MODE-only CHECK that the data members are in a reasonable state. |
| 79 void DCheckSanity(); | 80 void DCheckSanity(); |
| 80 | 81 |
| 81 void OnReadDone(Buffer* buffer); | 82 void OnReadDone(Buffer* buffer); |
| 82 | 83 |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 }; | 261 }; |
| 261 | 262 |
| 262 // See AdaptiveDemuxerFactory's class-level comment for |url|'s format. | 263 // See AdaptiveDemuxerFactory's class-level comment for |url|'s format. |
| 263 MEDIA_EXPORT bool ParseAdaptiveUrl( | 264 MEDIA_EXPORT bool ParseAdaptiveUrl( |
| 264 const std::string& url, int* audio_index, int* video_index, | 265 const std::string& url, int* audio_index, int* video_index, |
| 265 std::vector<std::string>* urls); | 266 std::vector<std::string>* urls); |
| 266 | 267 |
| 267 } // namespace media | 268 } // namespace media |
| 268 | 269 |
| 269 #endif // MEDIA_FILTERS_ADAPTIVE_DEMUXER_H_ | 270 #endif // MEDIA_FILTERS_ADAPTIVE_DEMUXER_H_ |
| OLD | NEW |