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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 void MediaSourcePlayer::Pause(bool is_media_related_action) { | 127 void MediaSourcePlayer::Pause(bool is_media_related_action) { |
128 DVLOG(1) << __FUNCTION__; | 128 DVLOG(1) << __FUNCTION__; |
129 | 129 |
130 // Since decoder jobs have their own thread, decoding is not fully paused | 130 // Since decoder jobs have their own thread, decoding is not fully paused |
131 // until all the decoder jobs call MediaDecoderCallback(). It is possible | 131 // until all the decoder jobs call MediaDecoderCallback(). It is possible |
132 // that Start() is called while the player is waiting for | 132 // that Start() is called while the player is waiting for |
133 // MediaDecoderCallback(). In that case, decoding will continue when | 133 // MediaDecoderCallback(). In that case, decoding will continue when |
134 // MediaDecoderCallback() is called. | 134 // MediaDecoderCallback() is called. |
135 playing_ = false; | 135 playing_ = false; |
136 start_time_ticks_ = base::TimeTicks(); | 136 start_time_ticks_ = base::TimeTicks(); |
| 137 |
| 138 SetAudible(false); |
137 } | 139 } |
138 | 140 |
139 bool MediaSourcePlayer::IsPlaying() { | 141 bool MediaSourcePlayer::IsPlaying() { |
140 return playing_; | 142 return playing_; |
141 } | 143 } |
142 | 144 |
143 int MediaSourcePlayer::GetVideoWidth() { | 145 int MediaSourcePlayer::GetVideoWidth() { |
144 return video_decoder_job_->output_width(); | 146 return video_decoder_job_->output_width(); |
145 } | 147 } |
146 | 148 |
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
833 // support setMediaKeys(0) (see http://crbug.com/330324), or when we release | 835 // support setMediaKeys(0) (see http://crbug.com/330324), or when we release |
834 // MediaDrm when the video is paused, or when the device goes to sleep (see | 836 // MediaDrm when the video is paused, or when the device goes to sleep (see |
835 // http://crbug.com/272421). | 837 // http://crbug.com/272421). |
836 audio_decoder_job_->SetDrmBridge(NULL); | 838 audio_decoder_job_->SetDrmBridge(NULL); |
837 video_decoder_job_->SetDrmBridge(NULL); | 839 video_decoder_job_->SetDrmBridge(NULL); |
838 cdm_registration_id_ = 0; | 840 cdm_registration_id_ = 0; |
839 drm_bridge_ = NULL; | 841 drm_bridge_ = NULL; |
840 } | 842 } |
841 | 843 |
842 } // namespace media | 844 } // namespace media |
OLD | NEW |