| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 virtual ~AdaptiveDemuxer(); | 75 virtual ~AdaptiveDemuxer(); |
| 76 | 76 |
| 77 // Change which demuxers the streams will use. | 77 // Change which demuxers the streams will use. |
| 78 void ChangeCurrentDemuxer(int audio_index, int video_index); | 78 void ChangeCurrentDemuxer(int audio_index, int video_index); |
| 79 | 79 |
| 80 // Filter implementation. | 80 // Filter implementation. |
| 81 virtual void Stop(FilterCallback* callback); | 81 virtual void Stop(FilterCallback* callback); |
| 82 virtual void Seek(base::TimeDelta time, FilterCallback* callback); | 82 virtual void Seek(base::TimeDelta time, FilterCallback* callback); |
| 83 virtual void OnAudioRendererDisabled(); | 83 virtual void OnAudioRendererDisabled(); |
| 84 virtual void set_host(FilterHost* filter_host); | 84 virtual void set_host(FilterHost* filter_host); |
| 85 virtual void SetPreload(Preload preload); |
| 85 // TODO(fischman): add support for SetPlaybackRate(). | 86 // TODO(fischman): add support for SetPlaybackRate(). |
| 86 | 87 |
| 87 // Demuxer implementation. | 88 // Demuxer implementation. |
| 88 virtual scoped_refptr<DemuxerStream> GetStream(DemuxerStream::Type type); | 89 virtual scoped_refptr<DemuxerStream> GetStream(DemuxerStream::Type type); |
| 89 | 90 |
| 90 private: | 91 private: |
| 91 // Returns a pointer to the currently active demuxer of the given type. | 92 // Returns a pointer to the currently active demuxer of the given type. |
| 92 Demuxer* current_demuxer(DemuxerStream::Type type); | 93 Demuxer* current_demuxer(DemuxerStream::Type type); |
| 93 | 94 |
| 94 DemuxerVector demuxers_; | 95 DemuxerVector demuxers_; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 | 127 |
| 127 private: | 128 private: |
| 128 scoped_ptr<DemuxerFactory> delegate_factory_; | 129 scoped_ptr<DemuxerFactory> delegate_factory_; |
| 129 | 130 |
| 130 DISALLOW_IMPLICIT_CONSTRUCTORS(AdaptiveDemuxerFactory); | 131 DISALLOW_IMPLICIT_CONSTRUCTORS(AdaptiveDemuxerFactory); |
| 131 }; | 132 }; |
| 132 | 133 |
| 133 } // namespace media | 134 } // namespace media |
| 134 | 135 |
| 135 #endif // MEDIA_FILTERS_ADAPTIVE_DEMUXER_H_ | 136 #endif // MEDIA_FILTERS_ADAPTIVE_DEMUXER_H_ |
| OLD | NEW |