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

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

Issue 2491043003: MediaResource refactoring to support multiple streams (Closed)
Patch Set: rebase Created 3 years, 10 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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "media/base/data_source.h" 15 #include "media/base/data_source.h"
16 #include "media/base/demuxer_stream.h" 16 #include "media/base/demuxer_stream.h"
17 #include "media/base/demuxer_stream_provider.h"
18 #include "media/base/eme_constants.h" 17 #include "media/base/eme_constants.h"
19 #include "media/base/media_export.h" 18 #include "media/base/media_export.h"
19 #include "media/base/media_resource.h"
20 #include "media/base/media_track.h" 20 #include "media/base/media_track.h"
21 #include "media/base/pipeline_status.h" 21 #include "media/base/pipeline_status.h"
22 #include "media/base/ranges.h" 22 #include "media/base/ranges.h"
23 23
24 namespace media { 24 namespace media {
25 25
26 class TextTrackConfig; 26 class TextTrackConfig;
27 class MediaTracks; 27 class MediaTracks;
28 28
29 class MEDIA_EXPORT DemuxerHost { 29 class MEDIA_EXPORT DemuxerHost {
(...skipping 21 matching lines...) Expand all
51 virtual void AddTextStream(DemuxerStream* text_stream, 51 virtual void AddTextStream(DemuxerStream* text_stream,
52 const TextTrackConfig& config) = 0; 52 const TextTrackConfig& config) = 0;
53 53
54 // Remove |text_stream| from the presentation. 54 // Remove |text_stream| from the presentation.
55 virtual void RemoveTextStream(DemuxerStream* text_stream) = 0; 55 virtual void RemoveTextStream(DemuxerStream* text_stream) = 0;
56 56
57 protected: 57 protected:
58 virtual ~DemuxerHost(); 58 virtual ~DemuxerHost();
59 }; 59 };
60 60
61 class MEDIA_EXPORT Demuxer : public DemuxerStreamProvider { 61 class MEDIA_EXPORT Demuxer : public MediaResource {
62 public: 62 public:
63 // A new potentially encrypted stream has been parsed. 63 // A new potentially encrypted stream has been parsed.
64 // First parameter - The type of initialization data. 64 // First parameter - The type of initialization data.
65 // Second parameter - The initialization data associated with the stream. 65 // Second parameter - The initialization data associated with the stream.
66 using EncryptedMediaInitDataCB = 66 using EncryptedMediaInitDataCB =
67 base::Callback<void(EmeInitDataType type, 67 base::Callback<void(EmeInitDataType type,
68 const std::vector<uint8_t>& init_data)>; 68 const std::vector<uint8_t>& init_data)>;
69 69
70 // Notifies demuxer clients that media track configuration has been updated 70 // Notifies demuxer clients that media track configuration has been updated
71 // (e.g. the initial stream metadata has been parsed successfully, or a new 71 // (e.g. the initial stream metadata has been parsed successfully, or a new
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 const std::vector<MediaTrack::Id>& track_ids, 150 const std::vector<MediaTrack::Id>& track_ids,
151 base::TimeDelta currTime) = 0; 151 base::TimeDelta currTime) = 0;
152 152
153 private: 153 private:
154 DISALLOW_COPY_AND_ASSIGN(Demuxer); 154 DISALLOW_COPY_AND_ASSIGN(Demuxer);
155 }; 155 };
156 156
157 } // namespace media 157 } // namespace media
158 158
159 #endif // MEDIA_BASE_DEMUXER_H_ 159 #endif // MEDIA_BASE_DEMUXER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698