Chromium Code Reviews| 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 #include "content/renderer/media/android/media_source_delegate.h" | 5 #include "content/renderer/media/android/media_source_delegate.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 491 if (CanNotifyDemuxerReady()) | 491 if (CanNotifyDemuxerReady()) |
| 492 NotifyDemuxerReady(); | 492 NotifyDemuxerReady(); |
| 493 } | 493 } |
| 494 | 494 |
| 495 void MediaSourceDelegate::InitAudioDecryptingDemuxerStream() { | 495 void MediaSourceDelegate::InitAudioDecryptingDemuxerStream() { |
| 496 DCHECK(media_loop_->BelongsToCurrentThread()); | 496 DCHECK(media_loop_->BelongsToCurrentThread()); |
| 497 DVLOG(1) << __FUNCTION__ << " : " << demuxer_client_id_; | 497 DVLOG(1) << __FUNCTION__ << " : " << demuxer_client_id_; |
| 498 DCHECK(!set_decryptor_ready_cb_.is_null()); | 498 DCHECK(!set_decryptor_ready_cb_.is_null()); |
| 499 | 499 |
| 500 audio_decrypting_demuxer_stream_.reset(new media::DecryptingDemuxerStream( | 500 audio_decrypting_demuxer_stream_.reset(new media::DecryptingDemuxerStream( |
| 501 base::MessageLoopProxy::current(), set_decryptor_ready_cb_)); | 501 media_loop_, set_decryptor_ready_cb_)); |
|
whywhat
2013/09/17 01:00:40
This seems unrelated?
xhwang
2013/09/17 01:13:00
Yep, just some other cleanups.
| |
| 502 audio_decrypting_demuxer_stream_->Initialize( | 502 audio_decrypting_demuxer_stream_->Initialize( |
| 503 audio_stream_, | 503 audio_stream_, |
| 504 base::Bind(&MediaSourceDelegate::OnAudioDecryptingDemuxerStreamInitDone, | 504 base::Bind(&MediaSourceDelegate::OnAudioDecryptingDemuxerStreamInitDone, |
| 505 media_weak_factory_.GetWeakPtr())); | 505 media_weak_factory_.GetWeakPtr())); |
| 506 } | 506 } |
| 507 | 507 |
| 508 void MediaSourceDelegate::InitVideoDecryptingDemuxerStream() { | 508 void MediaSourceDelegate::InitVideoDecryptingDemuxerStream() { |
| 509 DCHECK(media_loop_->BelongsToCurrentThread()); | 509 DCHECK(media_loop_->BelongsToCurrentThread()); |
| 510 DVLOG(1) << __FUNCTION__ << " : " << demuxer_client_id_; | 510 DVLOG(1) << __FUNCTION__ << " : " << demuxer_client_id_; |
| 511 DCHECK(!set_decryptor_ready_cb_.is_null()); | 511 DCHECK(!set_decryptor_ready_cb_.is_null()); |
| 512 | 512 |
| 513 video_decrypting_demuxer_stream_.reset(new media::DecryptingDemuxerStream( | 513 video_decrypting_demuxer_stream_.reset(new media::DecryptingDemuxerStream( |
| 514 base::MessageLoopProxy::current(), set_decryptor_ready_cb_)); | 514 media_loop_, set_decryptor_ready_cb_)); |
| 515 video_decrypting_demuxer_stream_->Initialize( | 515 video_decrypting_demuxer_stream_->Initialize( |
| 516 video_stream_, | 516 video_stream_, |
| 517 base::Bind(&MediaSourceDelegate::OnVideoDecryptingDemuxerStreamInitDone, | 517 base::Bind(&MediaSourceDelegate::OnVideoDecryptingDemuxerStreamInitDone, |
| 518 media_weak_factory_.GetWeakPtr())); | 518 media_weak_factory_.GetWeakPtr())); |
| 519 } | 519 } |
| 520 | 520 |
| 521 void MediaSourceDelegate::OnAudioDecryptingDemuxerStreamInitDone( | 521 void MediaSourceDelegate::OnAudioDecryptingDemuxerStreamInitDone( |
| 522 media::PipelineStatus status) { | 522 media::PipelineStatus status) { |
| 523 DCHECK(media_loop_->BelongsToCurrentThread()); | 523 DCHECK(media_loop_->BelongsToCurrentThread()); |
| 524 DVLOG(1) << __FUNCTION__ << "(" << status << ") : " << demuxer_client_id_; | 524 DVLOG(1) << __FUNCTION__ << "(" << status << ") : " << demuxer_client_id_; |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 765 base::AutoLock auto_lock(seeking_lock_); | 765 base::AutoLock auto_lock(seeking_lock_); |
| 766 seeking_ = seeking; | 766 seeking_ = seeking; |
| 767 } | 767 } |
| 768 | 768 |
| 769 bool MediaSourceDelegate::IsSeeking() const { | 769 bool MediaSourceDelegate::IsSeeking() const { |
| 770 base::AutoLock auto_lock(seeking_lock_); | 770 base::AutoLock auto_lock(seeking_lock_); |
| 771 return seeking_; | 771 return seeking_; |
| 772 } | 772 } |
| 773 | 773 |
| 774 } // namespace content | 774 } // namespace content |
| OLD | NEW |