OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "media/base/android/media_source_player.h" | 5 #include "media/base/android/media_source_player.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <limits> | 9 #include <limits> |
10 #include <utility> | 10 #include <utility> |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 if (!manager()->RequestPlay(player_id(), duration_, HasAudio())) { | 245 if (!manager()->RequestPlay(player_id(), duration_, HasAudio())) { |
246 Pause(true); | 246 Pause(true); |
247 return; | 247 return; |
248 } | 248 } |
249 | 249 |
250 // When we start, we could have new demuxed data coming in. This new data | 250 // When we start, we could have new demuxed data coming in. This new data |
251 // could be clear (not encrypted) or encrypted with different keys. So key | 251 // could be clear (not encrypted) or encrypted with different keys. So key |
252 // related info should all be cleared. | 252 // related info should all be cleared. |
253 is_waiting_for_key_ = false; | 253 is_waiting_for_key_ = false; |
254 key_added_while_decode_pending_ = false; | 254 key_added_while_decode_pending_ = false; |
255 AttachListener(NULL); | 255 AttachListener(nullptr); |
256 | 256 |
257 SetPendingEvent(PREFETCH_REQUEST_EVENT_PENDING); | 257 SetPendingEvent(PREFETCH_REQUEST_EVENT_PENDING); |
258 ProcessPendingEvents(); | 258 ProcessPendingEvents(); |
259 } | 259 } |
260 | 260 |
261 void MediaSourcePlayer::OnDemuxerConfigsAvailable( | 261 void MediaSourcePlayer::OnDemuxerConfigsAvailable( |
262 const DemuxerConfigs& configs) { | 262 const DemuxerConfigs& configs) { |
263 DVLOG(1) << __FUNCTION__; | 263 DVLOG(1) << __FUNCTION__; |
264 DCHECK(!HasAudio() && !HasVideo()); | 264 DCHECK(!HasAudio() && !HasVideo()); |
265 | 265 |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
857 is_waiting_for_key_ = false; | 857 is_waiting_for_key_ = false; |
858 key_added_while_decode_pending_ = false; | 858 key_added_while_decode_pending_ = false; |
859 | 859 |
860 // StartInternal() will trigger a prefetch, where in most cases we'll just | 860 // StartInternal() will trigger a prefetch, where in most cases we'll just |
861 // use previously received data. | 861 // use previously received data. |
862 if (playing_) | 862 if (playing_) |
863 StartInternal(); | 863 StartInternal(); |
864 } | 864 } |
865 | 865 |
866 } // namespace media | 866 } // namespace media |
OLD | NEW |