| 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/filters/ffmpeg_demuxer.h" | 5 #include "media/filters/ffmpeg_demuxer.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/base64.h" | 10 #include "base/base64.h" |
| (...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 726 video_codec->time_base.den)); | 726 video_codec->time_base.den)); |
| 727 media_log_->SetStringProperty( | 727 media_log_->SetStringProperty( |
| 728 "video_format", VideoFrame::FormatToString(video_config.format())); | 728 "video_format", VideoFrame::FormatToString(video_config.format())); |
| 729 media_log_->SetBooleanProperty("video_is_encrypted", | 729 media_log_->SetBooleanProperty("video_is_encrypted", |
| 730 video_config.is_encrypted()); | 730 video_config.is_encrypted()); |
| 731 } else { | 731 } else { |
| 732 media_log_->SetBooleanProperty("found_video_stream", false); | 732 media_log_->SetBooleanProperty("found_video_stream", false); |
| 733 } | 733 } |
| 734 | 734 |
| 735 | 735 |
| 736 media_log_->SetDoubleProperty("max_duration", max_duration.InSecondsF()); | 736 media_log_->SetTimeProperty("max_duration", max_duration); |
| 737 media_log_->SetDoubleProperty("start_time", start_time_.InSecondsF()); | 737 media_log_->SetTimeProperty("start_time", start_time_); |
| 738 media_log_->SetIntegerProperty("bitrate", bitrate_); | 738 media_log_->SetIntegerProperty("bitrate", bitrate_); |
| 739 | 739 |
| 740 status_cb.Run(PIPELINE_OK); | 740 status_cb.Run(PIPELINE_OK); |
| 741 } | 741 } |
| 742 | 742 |
| 743 void FFmpegDemuxer::OnSeekFrameDone(const PipelineStatusCB& cb, int result) { | 743 void FFmpegDemuxer::OnSeekFrameDone(const PipelineStatusCB& cb, int result) { |
| 744 DCHECK(task_runner_->BelongsToCurrentThread()); | 744 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 745 CHECK(pending_seek_); | 745 CHECK(pending_seek_); |
| 746 pending_seek_ = false; | 746 pending_seek_ = false; |
| 747 | 747 |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 974 } | 974 } |
| 975 for (size_t i = 0; i < buffered.size(); ++i) | 975 for (size_t i = 0; i < buffered.size(); ++i) |
| 976 host_->AddBufferedTimeRange(buffered.start(i), buffered.end(i)); | 976 host_->AddBufferedTimeRange(buffered.start(i), buffered.end(i)); |
| 977 } | 977 } |
| 978 | 978 |
| 979 void FFmpegDemuxer::OnDataSourceError() { | 979 void FFmpegDemuxer::OnDataSourceError() { |
| 980 host_->OnDemuxerError(PIPELINE_ERROR_READ); | 980 host_->OnDemuxerError(PIPELINE_ERROR_READ); |
| 981 } | 981 } |
| 982 | 982 |
| 983 } // namespace media | 983 } // namespace media |
| OLD | NEW |