| 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 "webkit/media/webmediaplayer_proxy.h" | 5 #include "webkit/media/webmediaplayer_proxy.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
| 10 #include "media/base/pipeline_status.h" | 10 #include "media/base/pipeline_status.h" |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 const std::string& id, | 193 const std::string& id, |
| 194 const std::string& type, | 194 const std::string& type, |
| 195 std::vector<std::string>& codecs) { | 195 std::vector<std::string>& codecs) { |
| 196 return chunk_demuxer_->AddId(id, type, codecs); | 196 return chunk_demuxer_->AddId(id, type, codecs); |
| 197 } | 197 } |
| 198 | 198 |
| 199 void WebMediaPlayerProxy::DemuxerRemoveId(const std::string& id) { | 199 void WebMediaPlayerProxy::DemuxerRemoveId(const std::string& id) { |
| 200 chunk_demuxer_->RemoveId(id); | 200 chunk_demuxer_->RemoveId(id); |
| 201 } | 201 } |
| 202 | 202 |
| 203 bool WebMediaPlayerProxy::DemuxerBufferedRange( | 203 media::Ranges<base::TimeDelta> WebMediaPlayerProxy::DemuxerBufferedRange( |
| 204 const std::string& id, | 204 const std::string& id) { |
| 205 media::ChunkDemuxer::Ranges* ranges_out) { | 205 return chunk_demuxer_->GetBufferedRanges(id); |
| 206 return chunk_demuxer_->GetBufferedRanges(id, ranges_out); | |
| 207 } | 206 } |
| 208 | 207 |
| 209 bool WebMediaPlayerProxy::DemuxerAppend(const std::string& id, | 208 bool WebMediaPlayerProxy::DemuxerAppend(const std::string& id, |
| 210 const uint8* data, | 209 const uint8* data, |
| 211 size_t length) { | 210 size_t length) { |
| 212 return chunk_demuxer_->AppendData(id, data, length); | 211 return chunk_demuxer_->AppendData(id, data, length); |
| 213 } | 212 } |
| 214 | 213 |
| 215 void WebMediaPlayerProxy::DemuxerAbort(const std::string& id) { | 214 void WebMediaPlayerProxy::DemuxerAbort(const std::string& id) { |
| 216 chunk_demuxer_->Abort(id); | 215 chunk_demuxer_->Abort(id); |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 const std::string& session_id, | 302 const std::string& session_id, |
| 304 scoped_array<uint8> init_data, | 303 scoped_array<uint8> init_data, |
| 305 int init_data_size) { | 304 int init_data_size) { |
| 306 DCHECK(render_loop_->BelongsToCurrentThread()); | 305 DCHECK(render_loop_->BelongsToCurrentThread()); |
| 307 if (webmediaplayer_) | 306 if (webmediaplayer_) |
| 308 webmediaplayer_->OnNeedKey(key_system, session_id, | 307 webmediaplayer_->OnNeedKey(key_system, session_id, |
| 309 init_data.Pass(), init_data_size); | 308 init_data.Pass(), init_data_size); |
| 310 } | 309 } |
| 311 | 310 |
| 312 } // namespace webkit_media | 311 } // namespace webkit_media |
| OLD | NEW |