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

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

Issue 212803004: Separate DemuxerHost from DataSourceHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
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 <vector> 8 #include <vector>
9 9
10 #include "base/time/time.h" 10 #include "base/time/time.h"
11 #include "media/base/data_source.h" 11 #include "media/base/data_source.h"
12 #include "media/base/demuxer_stream.h" 12 #include "media/base/demuxer_stream.h"
13 #include "media/base/media_export.h" 13 #include "media/base/media_export.h"
14 #include "media/base/pipeline_status.h" 14 #include "media/base/pipeline_status.h"
15 15
16 namespace media { 16 namespace media {
17 17
18 class TextTrackConfig; 18 class TextTrackConfig;
19 19
20 class MEDIA_EXPORT DemuxerHost : public DataSourceHost { 20 class MEDIA_EXPORT DemuxerHost {
21 public: 21 public:
22 // Notify the host that time range [start,end] has been buffered.
23 virtual void AddBufferedTimeRange(base::TimeDelta start,
24 base::TimeDelta end) = 0;
25
22 // Sets the duration of the media in microseconds. 26 // Sets the duration of the media in microseconds.
23 // Duration may be kInfiniteDuration() if the duration is not known. 27 // Duration may be kInfiniteDuration() if the duration is not known.
24 virtual void SetDuration(base::TimeDelta duration) = 0; 28 virtual void SetDuration(base::TimeDelta duration) = 0;
25 29
26 // Stops execution of the pipeline due to a fatal error. Do not call this 30 // Stops execution of the pipeline due to a fatal error. Do not call this
27 // method with PIPELINE_OK. 31 // method with PIPELINE_OK.
28 virtual void OnDemuxerError(PipelineStatus error) = 0; 32 virtual void OnDemuxerError(PipelineStatus error) = 0;
29 33
30 // Add |text_stream| to the collection managed by the text renderer. 34 // Add |text_stream| to the collection managed by the text renderer.
31 virtual void AddTextStream(DemuxerStream* text_stream, 35 virtual void AddTextStream(DemuxerStream* text_stream,
32 const TextTrackConfig& config) = 0; 36 const TextTrackConfig& config) = 0;
33 37
34 // Remove |text_stream| from the presentation.
35 virtual void RemoveTextStream(DemuxerStream* text_stream) = 0;
scherkus (not reviewing) 2014/03/26 21:50:12 what happened to this method?
sandersd (OOO until July 31) 2014/03/26 22:11:12 It's never called, but this is the right place for
36
37 protected: 38 protected:
38 virtual ~DemuxerHost(); 39 virtual ~DemuxerHost();
39 }; 40 };
40 41
41 class MEDIA_EXPORT Demuxer { 42 class MEDIA_EXPORT Demuxer {
42 public: 43 public:
43 // A new potentially encrypted stream has been parsed. 44 // A new potentially encrypted stream has been parsed.
44 // First parameter - The type of initialization data. 45 // First parameter - The type of initialization data.
45 // Second parameter - The initialization data associated with the stream. 46 // Second parameter - The initialization data associated with the stream.
46 typedef base::Callback<void(const std::string& type, 47 typedef base::Callback<void(const std::string& type,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // Returns the starting time for the media file. 84 // Returns the starting time for the media file.
84 virtual base::TimeDelta GetStartTime() const = 0; 85 virtual base::TimeDelta GetStartTime() const = 0;
85 86
86 private: 87 private:
87 DISALLOW_COPY_AND_ASSIGN(Demuxer); 88 DISALLOW_COPY_AND_ASSIGN(Demuxer);
88 }; 89 };
89 90
90 } // namespace media 91 } // namespace media
91 92
92 #endif // MEDIA_BASE_DEMUXER_H_ 93 #endif // MEDIA_BASE_DEMUXER_H_
OLDNEW
« no previous file with comments | « media/base/data_source.h ('k') | media/base/pipeline.h » ('j') | media/base/pipeline.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698