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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 | 60 |
61 // Initialize the MediaSourceDelegate. |media_source| will be owned by | 61 // Initialize the MediaSourceDelegate. |media_source| will be owned by |
62 // this object after this call. | 62 // this object after this call. |
63 void InitializeMediaSource( | 63 void InitializeMediaSource( |
64 const MediaSourceOpenedCB& media_source_opened_cb, | 64 const MediaSourceOpenedCB& media_source_opened_cb, |
65 const media::Demuxer::NeedKeyCB& need_key_cb, | 65 const media::Demuxer::NeedKeyCB& need_key_cb, |
66 const media::SetDecryptorReadyCB& set_decryptor_ready_cb, | 66 const media::SetDecryptorReadyCB& set_decryptor_ready_cb, |
67 const UpdateNetworkStateCB& update_network_state_cb, | 67 const UpdateNetworkStateCB& update_network_state_cb, |
68 const DurationChangeCB& duration_change_cb); | 68 const DurationChangeCB& duration_change_cb); |
69 | 69 |
70 const blink::WebTimeRanges& Buffered(); | |
71 blink::WebTimeRanges Buffered() const; | 70 blink::WebTimeRanges Buffered() const; |
72 size_t DecodedFrameCount() const; | 71 size_t DecodedFrameCount() const; |
73 size_t DroppedFrameCount() const; | 72 size_t DroppedFrameCount() const; |
74 size_t AudioDecodedByteCount() const; | 73 size_t AudioDecodedByteCount() const; |
75 size_t VideoDecodedByteCount() const; | 74 size_t VideoDecodedByteCount() const; |
76 | 75 |
77 // In MSE case, calls ChunkDemuxer::CancelPendingSeek(). Also sets the | 76 // In MSE case, calls ChunkDemuxer::CancelPendingSeek(). Also sets the |
78 // expectation that a regular seek will be arriving and to trivially finish | 77 // expectation that a regular seek will be arriving and to trivially finish |
79 // any browser seeks that may be requested prior to the regular seek. | 78 // any browser seeks that may be requested prior to the regular seek. |
80 void CancelPendingSeek(const base::TimeDelta& seek_time); | 79 void CancelPendingSeek(const base::TimeDelta& seek_time); |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 media::SetDecryptorReadyCB set_decryptor_ready_cb_; | 198 media::SetDecryptorReadyCB set_decryptor_ready_cb_; |
200 | 199 |
201 scoped_ptr<media::DecryptingDemuxerStream> audio_decrypting_demuxer_stream_; | 200 scoped_ptr<media::DecryptingDemuxerStream> audio_decrypting_demuxer_stream_; |
202 scoped_ptr<media::DecryptingDemuxerStream> video_decrypting_demuxer_stream_; | 201 scoped_ptr<media::DecryptingDemuxerStream> video_decrypting_demuxer_stream_; |
203 | 202 |
204 media::DemuxerStream* audio_stream_; | 203 media::DemuxerStream* audio_stream_; |
205 media::DemuxerStream* video_stream_; | 204 media::DemuxerStream* video_stream_; |
206 | 205 |
207 media::PipelineStatistics statistics_; | 206 media::PipelineStatistics statistics_; |
208 media::Ranges<base::TimeDelta> buffered_time_ranges_; | 207 media::Ranges<base::TimeDelta> buffered_time_ranges_; |
209 // Keep a list of buffered time ranges. | |
210 blink::WebTimeRanges buffered_web_time_ranges_; | |
211 | 208 |
212 MediaSourceOpenedCB media_source_opened_cb_; | 209 MediaSourceOpenedCB media_source_opened_cb_; |
213 media::Demuxer::NeedKeyCB need_key_cb_; | 210 media::Demuxer::NeedKeyCB need_key_cb_; |
214 | 211 |
215 // Temporary for EME v0.1. In the future the init data type should be passed | 212 // Temporary for EME v0.1. In the future the init data type should be passed |
216 // through GenerateKeyRequest() directly from WebKit. | 213 // through GenerateKeyRequest() directly from WebKit. |
217 std::string init_data_type_; | 214 std::string init_data_type_; |
218 | 215 |
219 // Lock used to serialize access for |seeking_|. | 216 // Lock used to serialize access for |seeking_|. |
220 mutable base::Lock seeking_lock_; | 217 mutable base::Lock seeking_lock_; |
(...skipping 22 matching lines...) Expand all Loading... |
243 base::WeakPtrFactory<MediaSourceDelegate> main_weak_factory_; | 240 base::WeakPtrFactory<MediaSourceDelegate> main_weak_factory_; |
244 base::WeakPtrFactory<MediaSourceDelegate> media_weak_factory_; | 241 base::WeakPtrFactory<MediaSourceDelegate> media_weak_factory_; |
245 base::WeakPtr<MediaSourceDelegate> main_weak_this_; | 242 base::WeakPtr<MediaSourceDelegate> main_weak_this_; |
246 | 243 |
247 DISALLOW_COPY_AND_ASSIGN(MediaSourceDelegate); | 244 DISALLOW_COPY_AND_ASSIGN(MediaSourceDelegate); |
248 }; | 245 }; |
249 | 246 |
250 } // namespace content | 247 } // namespace content |
251 | 248 |
252 #endif // CONTENT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_H_ | 249 #endif // CONTENT_RENDERER_MEDIA_ANDROID_MEDIA_SOURCE_DELEGATE_H_ |
OLD | NEW |