| 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_impl.h" | 5 #include "media/base/pipeline_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 828 if (!demuxer_->GetStream(DemuxerStream::AUDIO) && | 828 if (!demuxer_->GetStream(DemuxerStream::AUDIO) && |
| 829 !demuxer_->GetStream(DemuxerStream::VIDEO)) { | 829 !demuxer_->GetStream(DemuxerStream::VIDEO)) { |
| 830 DVLOG(1) << "Error: demuxer does not have an audio or a video stream."; | 830 DVLOG(1) << "Error: demuxer does not have an audio or a video stream."; |
| 831 done_cb.Run(PIPELINE_ERROR_COULD_NOT_RENDER); | 831 done_cb.Run(PIPELINE_ERROR_COULD_NOT_RENDER); |
| 832 return; | 832 return; |
| 833 } | 833 } |
| 834 break; | 834 break; |
| 835 | 835 |
| 836 case DemuxerStreamProvider::Type::URL: | 836 case DemuxerStreamProvider::Type::URL: |
| 837 // NOTE: Empty GURL are not valid. | 837 // NOTE: Empty GURL are not valid. |
| 838 if (!demuxer_->GetUrl().is_valid()) { | 838 if (!demuxer_->GetMediaUrlParams().media_url.is_valid()) { |
| 839 DVLOG(1) << "Error: demuxer does not have a valid URL."; | 839 DVLOG(1) << "Error: demuxer does not have a valid URL."; |
| 840 done_cb.Run(PIPELINE_ERROR_COULD_NOT_RENDER); | 840 done_cb.Run(PIPELINE_ERROR_COULD_NOT_RENDER); |
| 841 return; | 841 return; |
| 842 } | 842 } |
| 843 break; | 843 break; |
| 844 } | 844 } |
| 845 | 845 |
| 846 if (cdm_context_) | 846 if (cdm_context_) |
| 847 shared_state_.renderer->SetCdm(cdm_context_, | 847 shared_state_.renderer->SetCdm(cdm_context_, |
| 848 base::Bind(&IgnoreCdmAttached)); | 848 base::Bind(&IgnoreCdmAttached)); |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1288 void PipelineImpl::OnSuspendDone() { | 1288 void PipelineImpl::OnSuspendDone() { |
| 1289 DVLOG(3) << __func__; | 1289 DVLOG(3) << __func__; |
| 1290 DCHECK(thread_checker_.CalledOnValidThread()); | 1290 DCHECK(thread_checker_.CalledOnValidThread()); |
| 1291 DCHECK(IsRunning()); | 1291 DCHECK(IsRunning()); |
| 1292 | 1292 |
| 1293 DCHECK(!suspend_cb_.is_null()); | 1293 DCHECK(!suspend_cb_.is_null()); |
| 1294 base::ResetAndReturn(&suspend_cb_).Run(PIPELINE_OK); | 1294 base::ResetAndReturn(&suspend_cb_).Run(PIPELINE_OK); |
| 1295 } | 1295 } |
| 1296 | 1296 |
| 1297 } // namespace media | 1297 } // namespace media |
| OLD | NEW |