Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(744)

Side by Side Diff: media/base/demuxer.h

Issue 1526303004: Fix buffered range updates in media::Pipeline (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Android buildfix Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/media/android/media_source_delegate.cc ('k') | media/base/demuxer_perftest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 #include "media/base/data_source.h" 14 #include "media/base/data_source.h"
15 #include "media/base/demuxer_stream.h" 15 #include "media/base/demuxer_stream.h"
16 #include "media/base/demuxer_stream_provider.h" 16 #include "media/base/demuxer_stream_provider.h"
17 #include "media/base/eme_constants.h" 17 #include "media/base/eme_constants.h"
18 #include "media/base/media_export.h" 18 #include "media/base/media_export.h"
19 #include "media/base/pipeline_status.h" 19 #include "media/base/pipeline_status.h"
20 #include "media/base/ranges.h"
20 21
21 namespace media { 22 namespace media {
22 23
23 class TextTrackConfig; 24 class TextTrackConfig;
24 25
25 class MEDIA_EXPORT DemuxerHost { 26 class MEDIA_EXPORT DemuxerHost {
26 public: 27 public:
27 // Notify the host that time range [start,end] has been buffered. 28 // Notify the host that buffered time ranges have changed. Note that buffered
28 virtual void AddBufferedTimeRange(base::TimeDelta start, 29 // time ranges can grow (when new media data is appended), but they can also
29 base::TimeDelta end) = 0; 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
32 // ranges directed by MSE web app).
33 virtual void OnBufferedTimeRangesChanged(
34 const Ranges<base::TimeDelta>& ranges) = 0;
30 35
31 // Sets the duration of the media in microseconds. 36 // Sets the duration of the media in microseconds.
32 // Duration may be kInfiniteDuration() if the duration is not known. 37 // Duration may be kInfiniteDuration() if the duration is not known.
33 virtual void SetDuration(base::TimeDelta duration) = 0; 38 virtual void SetDuration(base::TimeDelta duration) = 0;
34 39
35 // 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
36 // method with PIPELINE_OK. 41 // method with PIPELINE_OK.
37 virtual void OnDemuxerError(PipelineStatus error) = 0; 42 virtual void OnDemuxerError(PipelineStatus error) = 0;
38 43
39 // Add |text_stream| to the collection managed by the text renderer. 44 // Add |text_stream| to the collection managed by the text renderer.
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 // Returns the memory usage in bytes for the demuxer. 98 // Returns the memory usage in bytes for the demuxer.
94 virtual int64_t GetMemoryUsage() const = 0; 99 virtual int64_t GetMemoryUsage() const = 0;
95 100
96 private: 101 private:
97 DISALLOW_COPY_AND_ASSIGN(Demuxer); 102 DISALLOW_COPY_AND_ASSIGN(Demuxer);
98 }; 103 };
99 104
100 } // namespace media 105 } // namespace media
101 106
102 #endif // MEDIA_BASE_DEMUXER_H_ 107 #endif // MEDIA_BASE_DEMUXER_H_
OLDNEW
« no previous file with comments | « content/renderer/media/android/media_source_delegate.cc ('k') | media/base/demuxer_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698