OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CONTENT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_H_ |
6 #define CONTENT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_H_ | 6 #define CONTENT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_H_ |
7 | 7 |
| 8 #include <stddef.h> |
| 9 #include <stdint.h> |
| 10 |
8 #include <string> | 11 #include <string> |
9 #include <vector> | 12 #include <vector> |
10 | 13 |
11 #include "base/callback.h" | 14 #include "base/callback.h" |
| 15 #include "base/macros.h" |
12 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
13 #include "base/memory/scoped_ptr.h" | 17 #include "base/memory/scoped_ptr.h" |
14 #include "base/memory/weak_ptr.h" | 18 #include "base/memory/weak_ptr.h" |
15 #include "base/time/time.h" | 19 #include "base/time/time.h" |
16 #include "media/base/cdm_context.h" | 20 #include "media/base/cdm_context.h" |
17 #include "media/base/demuxer.h" | 21 #include "media/base/demuxer.h" |
18 #include "media/base/media_keys.h" | 22 #include "media/base/media_keys.h" |
19 #include "media/base/pipeline_status.h" | 23 #include "media/base/pipeline_status.h" |
20 #include "media/base/ranges.h" | 24 #include "media/base/ranges.h" |
21 #include "media/base/text_track.h" | 25 #include "media/base/text_track.h" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 // decrypted audio/video streams if present. | 136 // decrypted audio/video streams if present. |
133 // | 137 // |
134 // Runs on the media thread. | 138 // Runs on the media thread. |
135 void OnDemuxerSeekDone(media::PipelineStatus status); | 139 void OnDemuxerSeekDone(media::PipelineStatus status); |
136 void ResetAudioDecryptingDemuxerStream(); | 140 void ResetAudioDecryptingDemuxerStream(); |
137 void ResetVideoDecryptingDemuxerStream(); | 141 void ResetVideoDecryptingDemuxerStream(); |
138 void FinishResettingDecryptingDemuxerStreams(); | 142 void FinishResettingDecryptingDemuxerStreams(); |
139 | 143 |
140 void OnDemuxerOpened(); | 144 void OnDemuxerOpened(); |
141 void OnEncryptedMediaInitData(media::EmeInitDataType init_data_type, | 145 void OnEncryptedMediaInitData(media::EmeInitDataType init_data_type, |
142 const std::vector<uint8>& init_data); | 146 const std::vector<uint8_t>& init_data); |
143 void NotifyDemuxerReady(); | 147 void NotifyDemuxerReady(); |
144 | 148 |
145 // Stops and clears objects on the media thread. | 149 // Stops and clears objects on the media thread. |
146 void StopDemuxer(const base::Closure& stop_cb); | 150 void StopDemuxer(const base::Closure& stop_cb); |
147 | 151 |
148 void InitializeDemuxer(); | 152 void InitializeDemuxer(); |
149 void SeekInternal(const base::TimeDelta& seek_time); | 153 void SeekInternal(const base::TimeDelta& seek_time); |
150 // Reads an access unit from the demuxer stream |stream| and stores it in | 154 // Reads an access unit from the demuxer stream |stream| and stores it in |
151 // the |index|th access unit in |params|. | 155 // the |index|th access unit in |params|. |
152 void ReadFromDemuxerStream(media::DemuxerStream::Type type, | 156 void ReadFromDemuxerStream(media::DemuxerStream::Type type, |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 base::WeakPtr<MediaSourceDelegate> main_weak_this_; | 232 base::WeakPtr<MediaSourceDelegate> main_weak_this_; |
229 base::WeakPtrFactory<MediaSourceDelegate> main_weak_factory_; | 233 base::WeakPtrFactory<MediaSourceDelegate> main_weak_factory_; |
230 base::WeakPtrFactory<MediaSourceDelegate> media_weak_factory_; | 234 base::WeakPtrFactory<MediaSourceDelegate> media_weak_factory_; |
231 | 235 |
232 DISALLOW_COPY_AND_ASSIGN(MediaSourceDelegate); | 236 DISALLOW_COPY_AND_ASSIGN(MediaSourceDelegate); |
233 }; | 237 }; |
234 | 238 |
235 } // namespace content | 239 } // namespace content |
236 | 240 |
237 #endif // CONTENT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_H_ | 241 #endif // CONTENT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_H_ |
OLD | NEW |