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

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

Issue 1735803002: Implemented passing media track info from ffmpeg into blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wolenetz@ CR feedback + better track info extraction in ffmpeg Created 4 years, 9 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 | « media/base/BUILD.gn ('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 #include "media/base/ranges.h"
21 21
22 namespace media { 22 namespace media {
23 23
24 class TextTrackConfig; 24 class TextTrackConfig;
25 class MediaTracks;
25 26
26 class MEDIA_EXPORT DemuxerHost { 27 class MEDIA_EXPORT DemuxerHost {
27 public: 28 public:
28 // Notify the host that buffered time ranges have changed. Note that buffered 29 // Notify the host that buffered time ranges have changed. Note that buffered
29 // time ranges can grow (when new media data is appended), but they can also 30 // time ranges can grow (when new media data is appended), but they can also
30 // shrink (when buffering reaches limit capacity and some buffered data 31 // 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 // becomes evicted, e.g. due to MSE GC algorithm, or by explicit removal of
32 // ranges directed by MSE web app). 33 // ranges directed by MSE web app).
33 virtual void OnBufferedTimeRangesChanged( 34 virtual void OnBufferedTimeRangesChanged(
34 const Ranges<base::TimeDelta>& ranges) = 0; 35 const Ranges<base::TimeDelta>& ranges) = 0;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 virtual base::TimeDelta GetStartTime() const = 0; 92 virtual base::TimeDelta GetStartTime() const = 0;
92 93
93 // Returns Time represented by presentation timestamp 0. 94 // Returns Time represented by presentation timestamp 0.
94 // If the timstamps are not associated with a Time, then 95 // If the timstamps are not associated with a Time, then
95 // a null Time is returned. 96 // a null Time is returned.
96 virtual base::Time GetTimelineOffset() const = 0; 97 virtual base::Time GetTimelineOffset() const = 0;
97 98
98 // Returns the memory usage in bytes for the demuxer. 99 // Returns the memory usage in bytes for the demuxer.
99 virtual int64_t GetMemoryUsage() const = 0; 100 virtual int64_t GetMemoryUsage() const = 0;
100 101
102 // Notifies demuxer clients that media track configuration has been updated
103 // (e.g. the inital stream metadata has been parsed successfully, or a new
104 // init segment has been parsed successfully in MSE case).
105 typedef base::Callback<void(scoped_ptr<MediaTracks>)> MediaTracksUpdatedCB;
106
101 private: 107 private:
102 DISALLOW_COPY_AND_ASSIGN(Demuxer); 108 DISALLOW_COPY_AND_ASSIGN(Demuxer);
103 }; 109 };
104 110
105 } // namespace media 111 } // namespace media
106 112
107 #endif // MEDIA_BASE_DEMUXER_H_ 113 #endif // MEDIA_BASE_DEMUXER_H_
OLDNEW
« no previous file with comments | « media/base/BUILD.gn ('k') | media/base/demuxer_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698