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 <memory> | 10 #include <memory> |
(...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 using EncryptedMediaInitDataCB = | 65 using EncryptedMediaInitDataCB = |
66 base::Callback<void(EmeInitDataType type, | 66 base::Callback<void(EmeInitDataType type, |
67 const std::vector<uint8_t>& init_data)>; | 67 const std::vector<uint8_t>& init_data)>; |
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 using MediaTracksUpdatedCB = | 72 using MediaTracksUpdatedCB = |
73 base::Callback<void(std::unique_ptr<MediaTracks>)>; | 73 base::Callback<void(std::unique_ptr<MediaTracks>)>; |
74 | 74 |
75 Demuxer(); | 75 Demuxer(); |
76 ~Demuxer() override; | 76 ~Demuxer() override; |
77 | 77 |
78 // Returns the name of the demuxer for logging purpose. | 78 // Returns the name of the demuxer for logging purpose. |
79 virtual std::string GetDisplayName() const = 0; | 79 virtual std::string GetDisplayName() const = 0; |
80 | 80 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
128 virtual base::TimeDelta GetStartTime() const = 0; | 128 virtual base::TimeDelta GetStartTime() const = 0; |
129 | 129 |
130 // Returns Time represented by presentation timestamp 0. | 130 // Returns Time represented by presentation timestamp 0. |
131 // If the timstamps are not associated with a Time, then | 131 // If the timstamps are not associated with a Time, then |
132 // a null Time is returned. | 132 // a null Time is returned. |
133 virtual base::Time GetTimelineOffset() const = 0; | 133 virtual base::Time GetTimelineOffset() const = 0; |
134 | 134 |
135 // Returns the memory usage in bytes for the demuxer. | 135 // Returns the memory usage in bytes for the demuxer. |
136 virtual int64_t GetMemoryUsage() const = 0; | 136 virtual int64_t GetMemoryUsage() const = 0; |
137 | 137 |
138 virtual const DemuxerStream* GetDemuxerStreamByTrackId( | |
xhwang
2016/06/09 06:06:02
This is actually not used in this CL. Also, in you
servolk
2016/06/09 19:14:46
At the moment I'm inclined to think it's better to
xhwang
2016/06/09 21:04:16
In general we don't add an API because it's generi
| |
139 std::string track_id) const = 0; | |
xhwang
2016/06/09 06:06:02
const ref
servolk
2016/06/09 19:14:46
Done.
| |
140 | |
138 private: | 141 private: |
139 DISALLOW_COPY_AND_ASSIGN(Demuxer); | 142 DISALLOW_COPY_AND_ASSIGN(Demuxer); |
140 }; | 143 }; |
141 | 144 |
142 } // namespace media | 145 } // namespace media |
143 | 146 |
144 #endif // MEDIA_BASE_DEMUXER_H_ | 147 #endif // MEDIA_BASE_DEMUXER_H_ |
OLD | NEW |