OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/pipeline.h" | 5 #include "media/base/pipeline.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
814 } | 814 } |
815 | 815 |
816 void Pipeline::OnAddTextTrack(const TextTrackConfig& config, | 816 void Pipeline::OnAddTextTrack(const TextTrackConfig& config, |
817 const AddTextTrackDoneCB& done_cb) { | 817 const AddTextTrackDoneCB& done_cb) { |
818 DCHECK(task_runner_->BelongsToCurrentThread()); | 818 DCHECK(task_runner_->BelongsToCurrentThread()); |
819 add_text_track_cb_.Run(config, done_cb); | 819 add_text_track_cb_.Run(config, done_cb); |
820 } | 820 } |
821 | 821 |
822 void Pipeline::InitializeDemuxer(const PipelineStatusCB& done_cb) { | 822 void Pipeline::InitializeDemuxer(const PipelineStatusCB& done_cb) { |
823 DCHECK(task_runner_->BelongsToCurrentThread()); | 823 DCHECK(task_runner_->BelongsToCurrentThread()); |
824 demuxer_->Initialize(this, done_cb, text_renderer_); | 824 demuxer_->Initialize(this, done_cb, !!text_renderer_); |
825 } | 825 } |
826 | 826 |
827 void Pipeline::InitializeRenderer(const PipelineStatusCB& done_cb) { | 827 void Pipeline::InitializeRenderer(const PipelineStatusCB& done_cb) { |
828 DCHECK(task_runner_->BelongsToCurrentThread()); | 828 DCHECK(task_runner_->BelongsToCurrentThread()); |
829 | 829 |
830 if (!demuxer_->GetStream(DemuxerStream::AUDIO) && | 830 if (!demuxer_->GetStream(DemuxerStream::AUDIO) && |
831 !demuxer_->GetStream(DemuxerStream::VIDEO)) { | 831 !demuxer_->GetStream(DemuxerStream::VIDEO)) { |
832 { | 832 { |
833 base::AutoLock auto_lock(lock_); | 833 base::AutoLock auto_lock(lock_); |
834 renderer_.reset(); | 834 renderer_.reset(); |
(...skipping 29 matching lines...) Expand all Loading... |
864 metadata_cb_.Run(metadata); | 864 metadata_cb_.Run(metadata); |
865 } | 865 } |
866 | 866 |
867 void Pipeline::BufferingStateChanged(BufferingState new_buffering_state) { | 867 void Pipeline::BufferingStateChanged(BufferingState new_buffering_state) { |
868 DVLOG(1) << __FUNCTION__ << "(" << new_buffering_state << ") "; | 868 DVLOG(1) << __FUNCTION__ << "(" << new_buffering_state << ") "; |
869 DCHECK(task_runner_->BelongsToCurrentThread()); | 869 DCHECK(task_runner_->BelongsToCurrentThread()); |
870 buffering_state_cb_.Run(new_buffering_state); | 870 buffering_state_cb_.Run(new_buffering_state); |
871 } | 871 } |
872 | 872 |
873 } // namespace media | 873 } // namespace media |
OLD | NEW |