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 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
851 void PipelineImpl::RendererWrapper::ReportMetadata() { | 851 void PipelineImpl::RendererWrapper::ReportMetadata() { |
852 DCHECK(media_task_runner_->BelongsToCurrentThread()); | 852 DCHECK(media_task_runner_->BelongsToCurrentThread()); |
853 | 853 |
854 PipelineMetadata metadata; | 854 PipelineMetadata metadata; |
855 metadata.timeline_offset = demuxer_->GetTimelineOffset(); | 855 metadata.timeline_offset = demuxer_->GetTimelineOffset(); |
856 DemuxerStream* stream = demuxer_->GetStream(DemuxerStream::VIDEO); | 856 DemuxerStream* stream = demuxer_->GetStream(DemuxerStream::VIDEO); |
857 if (stream) { | 857 if (stream) { |
858 metadata.has_video = true; | 858 metadata.has_video = true; |
859 metadata.natural_size = stream->video_decoder_config().natural_size(); | 859 metadata.natural_size = stream->video_decoder_config().natural_size(); |
860 metadata.video_rotation = stream->video_rotation(); | 860 metadata.video_rotation = stream->video_rotation(); |
| 861 metadata.video_decoder_config = stream->video_decoder_config(); |
861 } | 862 } |
862 if (demuxer_->GetStream(DemuxerStream::AUDIO)) { | 863 stream = demuxer_->GetStream(DemuxerStream::AUDIO); |
| 864 if (stream) { |
863 metadata.has_audio = true; | 865 metadata.has_audio = true; |
| 866 metadata.audio_decoder_config = stream->audio_decoder_config(); |
864 } | 867 } |
865 | 868 |
866 main_task_runner_->PostTask(FROM_HERE, base::Bind(&PipelineImpl::OnMetadata, | 869 main_task_runner_->PostTask(FROM_HERE, base::Bind(&PipelineImpl::OnMetadata, |
867 weak_pipeline_, metadata)); | 870 weak_pipeline_, metadata)); |
868 } | 871 } |
869 | 872 |
870 PipelineImpl::PipelineImpl( | 873 PipelineImpl::PipelineImpl( |
871 const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner, | 874 const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner, |
872 MediaLog* media_log) | 875 MediaLog* media_log) |
873 : media_task_runner_(media_task_runner), | 876 : media_task_runner_(media_task_runner), |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1258 void PipelineImpl::OnSuspendDone() { | 1261 void PipelineImpl::OnSuspendDone() { |
1259 DVLOG(3) << __func__; | 1262 DVLOG(3) << __func__; |
1260 DCHECK(thread_checker_.CalledOnValidThread()); | 1263 DCHECK(thread_checker_.CalledOnValidThread()); |
1261 DCHECK(IsRunning()); | 1264 DCHECK(IsRunning()); |
1262 | 1265 |
1263 DCHECK(!suspend_cb_.is_null()); | 1266 DCHECK(!suspend_cb_.is_null()); |
1264 base::ResetAndReturn(&suspend_cb_).Run(PIPELINE_OK); | 1267 base::ResetAndReturn(&suspend_cb_).Run(PIPELINE_OK); |
1265 } | 1268 } |
1266 | 1269 |
1267 } // namespace media | 1270 } // namespace media |
OLD | NEW |