| 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 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 628 "video_format", VideoFrame::FormatToString(video_config.format())); | 628 "video_format", VideoFrame::FormatToString(video_config.format())); |
| 629 media_log_->SetBooleanProperty("video_is_encrypted", | 629 media_log_->SetBooleanProperty("video_is_encrypted", |
| 630 video_config.is_encrypted()); | 630 video_config.is_encrypted()); |
| 631 } else { | 631 } else { |
| 632 media_log_->SetBooleanProperty("found_video_stream", false); | 632 media_log_->SetBooleanProperty("found_video_stream", false); |
| 633 } | 633 } |
| 634 | 634 |
| 635 | 635 |
| 636 media_log_->SetDoubleProperty("max_duration", max_duration.InSecondsF()); | 636 media_log_->SetDoubleProperty("max_duration", max_duration.InSecondsF()); |
| 637 media_log_->SetDoubleProperty("start_time", start_time_.InSecondsF()); | 637 media_log_->SetDoubleProperty("start_time", start_time_.InSecondsF()); |
| 638 media_log_->SetDoubleProperty("total_bytes", | |
| 639 static_cast<double>(filesize_in_bytes)); | |
| 640 media_log_->SetIntegerProperty("bitrate", bitrate_); | 638 media_log_->SetIntegerProperty("bitrate", bitrate_); |
| 641 | 639 |
| 642 status_cb.Run(PIPELINE_OK); | 640 status_cb.Run(PIPELINE_OK); |
| 643 } | 641 } |
| 644 | 642 |
| 645 void FFmpegDemuxer::OnSeekFrameDone(const PipelineStatusCB& cb, int result) { | 643 void FFmpegDemuxer::OnSeekFrameDone(const PipelineStatusCB& cb, int result) { |
| 646 DCHECK(message_loop_->BelongsToCurrentThread()); | 644 DCHECK(message_loop_->BelongsToCurrentThread()); |
| 647 CHECK(pending_seek_); | 645 CHECK(pending_seek_); |
| 648 pending_seek_ = false; | 646 pending_seek_ = false; |
| 649 | 647 |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 836 } | 834 } |
| 837 for (size_t i = 0; i < buffered.size(); ++i) | 835 for (size_t i = 0; i < buffered.size(); ++i) |
| 838 host_->AddBufferedTimeRange(buffered.start(i), buffered.end(i)); | 836 host_->AddBufferedTimeRange(buffered.start(i), buffered.end(i)); |
| 839 } | 837 } |
| 840 | 838 |
| 841 void FFmpegDemuxer::OnDataSourceError() { | 839 void FFmpegDemuxer::OnDataSourceError() { |
| 842 host_->OnDemuxerError(PIPELINE_ERROR_READ); | 840 host_->OnDemuxerError(PIPELINE_ERROR_READ); |
| 843 } | 841 } |
| 844 | 842 |
| 845 } // namespace media | 843 } // namespace media |
| OLD | NEW |