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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 26 matching lines...) Expand all Loading... | |
37 | 37 |
38 // Remove |text_stream| from the presentation. | 38 // Remove |text_stream| from the presentation. |
39 virtual void RemoveTextStream(DemuxerStream* text_stream) = 0; | 39 virtual void RemoveTextStream(DemuxerStream* text_stream) = 0; |
40 | 40 |
41 protected: | 41 protected: |
42 virtual ~DemuxerHost(); | 42 virtual ~DemuxerHost(); |
43 }; | 43 }; |
44 | 44 |
45 class MEDIA_EXPORT Demuxer { | 45 class MEDIA_EXPORT Demuxer { |
46 public: | 46 public: |
47 enum Liveness { | |
48 LIVENESS_UNKNOWN, | |
49 LIVENESS_RECORDED, | |
50 LIVENESS_LIVE, | |
51 }; | |
52 | |
47 // A new potentially encrypted stream has been parsed. | 53 // A new potentially encrypted stream has been parsed. |
48 // First parameter - The type of initialization data. | 54 // First parameter - The type of initialization data. |
49 // Second parameter - The initialization data associated with the stream. | 55 // Second parameter - The initialization data associated with the stream. |
50 typedef base::Callback<void(const std::string& type, | 56 typedef base::Callback<void(const std::string& type, |
51 const std::vector<uint8>& init_data)> NeedKeyCB; | 57 const std::vector<uint8>& init_data)> NeedKeyCB; |
52 | 58 |
53 Demuxer(); | 59 Demuxer(); |
54 virtual ~Demuxer(); | 60 virtual ~Demuxer(); |
55 | 61 |
56 // Completes initialization of the demuxer. | 62 // Completes initialization of the demuxer. |
(...skipping 28 matching lines...) Expand all Loading... | |
85 virtual DemuxerStream* GetStream(DemuxerStream::Type type) = 0; | 91 virtual DemuxerStream* GetStream(DemuxerStream::Type type) = 0; |
86 | 92 |
87 // Returns the starting time for the media file. | 93 // Returns the starting time for the media file. |
88 virtual base::TimeDelta GetStartTime() const = 0; | 94 virtual base::TimeDelta GetStartTime() const = 0; |
89 | 95 |
90 // Returns Time represented by presentation timestamp 0. | 96 // Returns Time represented by presentation timestamp 0. |
91 // If the timstamps are not associated with a Time, then | 97 // If the timstamps are not associated with a Time, then |
92 // a null Time is returned. | 98 // a null Time is returned. |
93 virtual base::Time GetTimelineOffset() const = 0; | 99 virtual base::Time GetTimelineOffset() const = 0; |
94 | 100 |
101 // Returns liveness of the stream, i.e. whether it recorded or live. | |
acolwell GONE FROM CHROMIUM
2014/04/25 23:30:52
nit: s/it/it is/
Sergey Ulanov
2014/04/26 01:51:03
Done.
| |
102 virtual Liveness GetLiveness() const = 0; | |
103 | |
95 private: | 104 private: |
96 DISALLOW_COPY_AND_ASSIGN(Demuxer); | 105 DISALLOW_COPY_AND_ASSIGN(Demuxer); |
97 }; | 106 }; |
98 | 107 |
99 } // namespace media | 108 } // namespace media |
100 | 109 |
101 #endif // MEDIA_BASE_DEMUXER_H_ | 110 #endif // MEDIA_BASE_DEMUXER_H_ |
OLD | NEW |