| 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 blink track ids have been assigned to |tracks|. |
| 138 // The |track_ids| collection must contain blink track ids in the same |
| 139 // sequence as media tracks in |tracks|. The collection sizes must be the |
| 140 // same. |
| 141 virtual void OnTrackIdsAssigned(const MediaTracks& tracks, |
| 142 const std::vector<unsigned>& track_ids) = 0; |
| 143 |
| 144 // Finds a DemuxerStream corresponding to the given blink |track_id|. Note |
| 145 // that the input track id is blink track id and not bytestream track id. |
| 146 virtual const DemuxerStream* GetDemuxerStreamByTrackId( |
| 147 unsigned track_id) const = 0; |
| 148 |
| 137 private: | 149 private: |
| 138 DISALLOW_COPY_AND_ASSIGN(Demuxer); | 150 DISALLOW_COPY_AND_ASSIGN(Demuxer); |
| 139 }; | 151 }; |
| 140 | 152 |
| 141 } // namespace media | 153 } // namespace media |
| 142 | 154 |
| 143 #endif // MEDIA_BASE_DEMUXER_H_ | 155 #endif // MEDIA_BASE_DEMUXER_H_ |
| OLD | NEW |