| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/renderer/media/android/media_source_delegate.h" | 5 #include "content/renderer/media/android/media_source_delegate.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 | 177 |
| 178 void MediaSourceDelegate::InitializeDemuxer() { | 178 void MediaSourceDelegate::InitializeDemuxer() { |
| 179 DCHECK(media_loop_->BelongsToCurrentThread()); | 179 DCHECK(media_loop_->BelongsToCurrentThread()); |
| 180 demuxer_client_->AddDelegate(demuxer_client_id_, this); | 180 demuxer_client_->AddDelegate(demuxer_client_id_, this); |
| 181 chunk_demuxer_->Initialize(this, | 181 chunk_demuxer_->Initialize(this, |
| 182 base::Bind(&MediaSourceDelegate::OnDemuxerInitDone, | 182 base::Bind(&MediaSourceDelegate::OnDemuxerInitDone, |
| 183 media_weak_factory_.GetWeakPtr()), | 183 media_weak_factory_.GetWeakPtr()), |
| 184 false); | 184 false); |
| 185 } | 185 } |
| 186 | 186 |
| 187 const blink::WebTimeRanges& MediaSourceDelegate::Buffered() { | |
| 188 buffered_web_time_ranges_ = | |
| 189 ConvertToWebTimeRanges(buffered_time_ranges_); | |
| 190 return buffered_web_time_ranges_; | |
| 191 } | |
| 192 | |
| 193 blink::WebTimeRanges MediaSourceDelegate::Buffered() const { | 187 blink::WebTimeRanges MediaSourceDelegate::Buffered() const { |
| 194 return ConvertToWebTimeRanges(buffered_time_ranges_); | 188 return ConvertToWebTimeRanges(buffered_time_ranges_); |
| 195 } | 189 } |
| 196 | 190 |
| 197 size_t MediaSourceDelegate::DecodedFrameCount() const { | 191 size_t MediaSourceDelegate::DecodedFrameCount() const { |
| 198 return statistics_.video_frames_decoded; | 192 return statistics_.video_frames_decoded; |
| 199 } | 193 } |
| 200 | 194 |
| 201 size_t MediaSourceDelegate::DroppedFrameCount() const { | 195 size_t MediaSourceDelegate::DroppedFrameCount() const { |
| 202 return statistics_.video_frames_dropped; | 196 return statistics_.video_frames_dropped; |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 770 configs->video_size = config.natural_size(); | 764 configs->video_size = config.natural_size(); |
| 771 configs->is_video_encrypted = config.is_encrypted(); | 765 configs->is_video_encrypted = config.is_encrypted(); |
| 772 configs->video_extra_data = std::vector<uint8>( | 766 configs->video_extra_data = std::vector<uint8>( |
| 773 config.extra_data(), config.extra_data() + config.extra_data_size()); | 767 config.extra_data(), config.extra_data() + config.extra_data_size()); |
| 774 return true; | 768 return true; |
| 775 } | 769 } |
| 776 return false; | 770 return false; |
| 777 } | 771 } |
| 778 | 772 |
| 779 } // namespace content | 773 } // namespace content |
| OLD | NEW |