| 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 <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
| 10 #include "base/android/jni_string.h" | 10 #include "base/android/jni_string.h" |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 return; | 300 return; |
| 301 } | 301 } |
| 302 | 302 |
| 303 SetPendingEvent(PREFETCH_REQUEST_EVENT_PENDING); | 303 SetPendingEvent(PREFETCH_REQUEST_EVENT_PENDING); |
| 304 ProcessPendingEvents(); | 304 ProcessPendingEvents(); |
| 305 } | 305 } |
| 306 | 306 |
| 307 void MediaSourcePlayer::OnDemuxerConfigsAvailable( | 307 void MediaSourcePlayer::OnDemuxerConfigsAvailable( |
| 308 const DemuxerConfigs& configs) { | 308 const DemuxerConfigs& configs) { |
| 309 DVLOG(1) << __FUNCTION__; | 309 DVLOG(1) << __FUNCTION__; |
| 310 duration_ = base::TimeDelta::FromMilliseconds(configs.duration_ms); | 310 duration_ = configs.duration; |
| 311 clock_.SetDuration(duration_); | 311 clock_.SetDuration(duration_); |
| 312 | 312 |
| 313 audio_codec_ = configs.audio_codec; | 313 audio_codec_ = configs.audio_codec; |
| 314 num_channels_ = configs.audio_channels; | 314 num_channels_ = configs.audio_channels; |
| 315 sampling_rate_ = configs.audio_sampling_rate; | 315 sampling_rate_ = configs.audio_sampling_rate; |
| 316 is_audio_encrypted_ = configs.is_audio_encrypted; | 316 is_audio_encrypted_ = configs.is_audio_encrypted; |
| 317 audio_extra_data_ = configs.audio_extra_data; | 317 audio_extra_data_ = configs.audio_extra_data; |
| 318 if (HasAudio()) { | 318 if (HasAudio()) { |
| 319 DCHECK_GT(num_channels_, 0); | 319 DCHECK_GT(num_channels_, 0); |
| 320 audio_timestamp_helper_.reset(new AudioTimestampHelper(sampling_rate_)); | 320 audio_timestamp_helper_.reset(new AudioTimestampHelper(sampling_rate_)); |
| (...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1019 | 1019 |
| 1020 void MediaSourcePlayer::ClearPendingEvent(PendingEventFlags event) { | 1020 void MediaSourcePlayer::ClearPendingEvent(PendingEventFlags event) { |
| 1021 DVLOG(1) << __FUNCTION__ << "(" << GetEventName(event) << ")"; | 1021 DVLOG(1) << __FUNCTION__ << "(" << GetEventName(event) << ")"; |
| 1022 DCHECK_NE(event, NO_EVENT_PENDING); | 1022 DCHECK_NE(event, NO_EVENT_PENDING); |
| 1023 DCHECK(IsEventPending(event)) << GetEventName(event); | 1023 DCHECK(IsEventPending(event)) << GetEventName(event); |
| 1024 | 1024 |
| 1025 pending_event_ &= ~event; | 1025 pending_event_ &= ~event; |
| 1026 } | 1026 } |
| 1027 | 1027 |
| 1028 } // namespace media | 1028 } // namespace media |
| OLD | NEW |