Chromium Code Reviews| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 60 class MEDIA_EXPORT Demuxer : public DemuxerStreamProvider { | 60 class MEDIA_EXPORT Demuxer : public DemuxerStreamProvider { |
| 61 public: | 61 public: |
| 62 // A new potentially encrypted stream has been parsed. | 62 // A new potentially encrypted stream has been parsed. |
| 63 // First parameter - The type of initialization data. | 63 // First parameter - The type of initialization data. |
| 64 // Second parameter - The initialization data associated with the stream. | 64 // Second parameter - The initialization data associated with the stream. |
| 65 typedef base::Callback<void(EmeInitDataType type, | 65 typedef base::Callback<void(EmeInitDataType type, |
| 66 const std::vector<uint8_t>& init_data)> | 66 const std::vector<uint8_t>& init_data)> |
| 67 EncryptedMediaInitDataCB; | 67 EncryptedMediaInitDataCB; |
| 68 | 68 |
| 69 // Notifies demuxer clients that media track configuration has been updated | 69 // Notifies demuxer clients that media track configuration has been updated |
| 70 // (e.g. the inital stream metadata has been parsed successfully, or a new | 70 // (e.g. the initial stream metadata has been parsed successfully, or a new |
| 71 // init segment has been parsed successfully in MSE case). | 71 // init segment has been parsed successfully in MSE case). |
| 72 typedef base::Callback<void(scoped_ptr<MediaTracks>)> MediaTracksUpdatedCB; | 72 typedef base::Callback<void(scoped_ptr<MediaTracks>)> MediaTracksUpdatedCB; |
| 73 | 73 |
| 74 Demuxer(); | 74 Demuxer(); |
| 75 ~Demuxer() override; | 75 ~Demuxer() override; |
| 76 | 76 |
| 77 // Returns the name of the demuxer for logging purpose. | 77 // Returns the name of the demuxer for logging purpose. |
| 78 virtual std::string GetDisplayName() const = 0; | 78 virtual std::string GetDisplayName() const = 0; |
| 79 | 79 |
| 80 // Completes initialization of the demuxer. | 80 // Completes initialization of the demuxer. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 127 virtual base::TimeDelta GetStartTime() const = 0; | 127 virtual base::TimeDelta GetStartTime() const = 0; |
| 128 | 128 |
| 129 // Returns Time represented by presentation timestamp 0. | 129 // Returns Time represented by presentation timestamp 0. |
| 130 // If the timstamps are not associated with a Time, then | 130 // If the timstamps are not associated with a Time, then |
| 131 // a null Time is returned. | 131 // a null Time is returned. |
| 132 virtual base::Time GetTimelineOffset() const = 0; | 132 virtual base::Time GetTimelineOffset() const = 0; |
| 133 | 133 |
| 134 // Returns the memory usage in bytes for the demuxer. | 134 // Returns the memory usage in bytes for the demuxer. |
| 135 virtual int64_t GetMemoryUsage() const = 0; | 135 virtual int64_t GetMemoryUsage() const = 0; |
| 136 | 136 |
| 137 // Notifies the demuxer that track ids has been assigned to a media tracks. | |
|
wolenetz
2016/04/08 23:32:31
nit: blink track ids, right?
nits: Also, s/has/hav
servolk
2016/04/08 23:47:20
Done.
| |
| 138 virtual void OnTrackIdsAssigned(const MediaTracks& tracks, | |
| 139 const std::vector<unsigned>& track_ids) = 0; | |
|
wolenetz
2016/04/08 23:32:31
Comment is needed to describe that |tracks|.tracks
servolk
2016/04/08 23:47:20
Done.
| |
| 140 | |
| 141 // Finds a DemuxerStream corresponding to the given blink |track_id|. Note | |
| 142 // that the input track id is blink track id and not bytestream track id. | |
| 143 virtual const DemuxerStream* GetDemuxerStreamByTrackId( | |
| 144 unsigned track_id) const = 0; | |
| 145 | |
| 137 private: | 146 private: |
| 138 DISALLOW_COPY_AND_ASSIGN(Demuxer); | 147 DISALLOW_COPY_AND_ASSIGN(Demuxer); |
| 139 }; | 148 }; |
| 140 | 149 |
| 141 } // namespace media | 150 } // namespace media |
| 142 | 151 |
| 143 #endif // MEDIA_BASE_DEMUXER_H_ | 152 #endif // MEDIA_BASE_DEMUXER_H_ |
| OLD | NEW |