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 "base/time/time.h" | 8 #include "base/time/time.h" |
9 #include "media/base/data_source.h" | 9 #include "media/base/data_source.h" |
10 #include "media/base/demuxer_stream.h" | 10 #include "media/base/demuxer_stream.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 // Stops execution of the pipeline due to a fatal error. Do not call this | 22 // Stops execution of the pipeline due to a fatal error. Do not call this |
23 // method with PIPELINE_OK. | 23 // method with PIPELINE_OK. |
24 virtual void OnDemuxerError(PipelineStatus error) = 0; | 24 virtual void OnDemuxerError(PipelineStatus error) = 0; |
25 | 25 |
26 protected: | 26 protected: |
27 virtual ~DemuxerHost(); | 27 virtual ~DemuxerHost(); |
28 }; | 28 }; |
29 | 29 |
30 class MEDIA_EXPORT Demuxer { | 30 class MEDIA_EXPORT Demuxer { |
31 public: | 31 public: |
| 32 // A new potentially encrypted stream has been parsed. |
| 33 // First parameter - The type of initialization data. |
| 34 // Second parameter - The initialization data associated with the stream. |
| 35 typedef base::Callback<void(const std::string& type, |
| 36 const std::vector<uint8>& init_data)> NeedKeyCB; |
| 37 |
32 Demuxer(); | 38 Demuxer(); |
33 virtual ~Demuxer(); | 39 virtual ~Demuxer(); |
34 | 40 |
35 // Completes initialization of the demuxer. | 41 // Completes initialization of the demuxer. |
36 // | 42 // |
37 // The demuxer does not own |host| as it is guaranteed to outlive the | 43 // The demuxer does not own |host| as it is guaranteed to outlive the |
38 // lifetime of the demuxer. Don't delete it! | 44 // lifetime of the demuxer. Don't delete it! |
39 virtual void Initialize(DemuxerHost* host, | 45 virtual void Initialize(DemuxerHost* host, |
40 const PipelineStatusCB& status_cb) = 0; | 46 const PipelineStatusCB& status_cb) = 0; |
41 | 47 |
(...skipping 25 matching lines...) Expand all Loading... |
67 // Returns the starting time for the media file. | 73 // Returns the starting time for the media file. |
68 virtual base::TimeDelta GetStartTime() const = 0; | 74 virtual base::TimeDelta GetStartTime() const = 0; |
69 | 75 |
70 private: | 76 private: |
71 DISALLOW_COPY_AND_ASSIGN(Demuxer); | 77 DISALLOW_COPY_AND_ASSIGN(Demuxer); |
72 }; | 78 }; |
73 | 79 |
74 } // namespace media | 80 } // namespace media |
75 | 81 |
76 #endif // MEDIA_BASE_DEMUXER_H_ | 82 #endif // MEDIA_BASE_DEMUXER_H_ |
OLD | NEW |