Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: media/base/android/media_source_player.cc

Issue 239743005: Updates WebMediaPlayerAndroid and MediaSourceDelegate to respect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: const Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « media/base/android/demuxer_stream_player_params.cc ('k') | media/base/android/media_source_player_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698