| 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_H_ | 5 #ifndef MEDIA_BASE_DEMUXER_H_ |
| 6 #define MEDIA_BASE_DEMUXER_H_ | 6 #define MEDIA_BASE_DEMUXER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 // shrink (when buffering reaches limit capacity and some buffered data | 30 // shrink (when buffering reaches limit capacity and some buffered data |
| 31 // becomes evicted, e.g. due to MSE GC algorithm, or by explicit removal of | 31 // becomes evicted, e.g. due to MSE GC algorithm, or by explicit removal of |
| 32 // ranges directed by MSE web app). | 32 // ranges directed by MSE web app). |
| 33 virtual void OnBufferedTimeRangesChanged( | 33 virtual void OnBufferedTimeRangesChanged( |
| 34 const Ranges<base::TimeDelta>& ranges) = 0; | 34 const Ranges<base::TimeDelta>& ranges) = 0; |
| 35 | 35 |
| 36 // Sets the duration of the media in microseconds. | 36 // Sets the duration of the media in microseconds. |
| 37 // Duration may be kInfiniteDuration() if the duration is not known. | 37 // Duration may be kInfiniteDuration() if the duration is not known. |
| 38 virtual void SetDuration(base::TimeDelta duration) = 0; | 38 virtual void SetDuration(base::TimeDelta duration) = 0; |
| 39 | 39 |
| 40 // Stops execution of the pipeline due to a fatal error. Do not call this | 40 // Stops execution of the pipeline due to a fatal error. Do not call this |
| 41 // method with PIPELINE_OK. | 41 // method with PIPELINE_OK. Stopping is not immediate so demuxers must be |
| 42 // prepared to soft fail on subsequent calls. E.g., if Demuxer::Seek() is |
| 43 // called after an unrecoverable error the provided PipelineStatusCB must be |
| 44 // called with an error. |
| 42 virtual void OnDemuxerError(PipelineStatus error) = 0; | 45 virtual void OnDemuxerError(PipelineStatus error) = 0; |
| 43 | 46 |
| 44 // Add |text_stream| to the collection managed by the text renderer. | 47 // Add |text_stream| to the collection managed by the text renderer. |
| 45 virtual void AddTextStream(DemuxerStream* text_stream, | 48 virtual void AddTextStream(DemuxerStream* text_stream, |
| 46 const TextTrackConfig& config) = 0; | 49 const TextTrackConfig& config) = 0; |
| 47 | 50 |
| 48 // Remove |text_stream| from the presentation. | 51 // Remove |text_stream| from the presentation. |
| 49 virtual void RemoveTextStream(DemuxerStream* text_stream) = 0; | 52 virtual void RemoveTextStream(DemuxerStream* text_stream) = 0; |
| 50 | 53 |
| 51 protected: | 54 protected: |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 // Returns the memory usage in bytes for the demuxer. | 101 // Returns the memory usage in bytes for the demuxer. |
| 99 virtual int64_t GetMemoryUsage() const = 0; | 102 virtual int64_t GetMemoryUsage() const = 0; |
| 100 | 103 |
| 101 private: | 104 private: |
| 102 DISALLOW_COPY_AND_ASSIGN(Demuxer); | 105 DISALLOW_COPY_AND_ASSIGN(Demuxer); |
| 103 }; | 106 }; |
| 104 | 107 |
| 105 } // namespace media | 108 } // namespace media |
| 106 | 109 |
| 107 #endif // MEDIA_BASE_DEMUXER_H_ | 110 #endif // MEDIA_BASE_DEMUXER_H_ |
| OLD | NEW |