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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 bool WebMediaPlayerProxy::DemuxerAppend(const std::string& id, | 160 bool WebMediaPlayerProxy::DemuxerAppend(const std::string& id, |
161 const uint8* data, | 161 const uint8* data, |
162 size_t length) { | 162 size_t length) { |
163 return chunk_demuxer_->AppendData(id, data, length); | 163 return chunk_demuxer_->AppendData(id, data, length); |
164 } | 164 } |
165 | 165 |
166 void WebMediaPlayerProxy::DemuxerAbort(const std::string& id) { | 166 void WebMediaPlayerProxy::DemuxerAbort(const std::string& id) { |
167 chunk_demuxer_->Abort(id); | 167 chunk_demuxer_->Abort(id); |
168 } | 168 } |
169 | 169 |
| 170 void WebMediaPlayerProxy::DemuxerSetDuration(base::TimeDelta duration) { |
| 171 chunk_demuxer_->SetDuration(duration); |
| 172 } |
| 173 |
170 void WebMediaPlayerProxy::DemuxerEndOfStream(media::PipelineStatus status) { | 174 void WebMediaPlayerProxy::DemuxerEndOfStream(media::PipelineStatus status) { |
171 chunk_demuxer_->EndOfStream(status); | 175 chunk_demuxer_->EndOfStream(status); |
172 } | 176 } |
173 | 177 |
174 void WebMediaPlayerProxy::DemuxerShutdown() { | 178 void WebMediaPlayerProxy::DemuxerShutdown() { |
175 if (chunk_demuxer_.get()) | 179 if (chunk_demuxer_.get()) |
176 chunk_demuxer_->Shutdown(); | 180 chunk_demuxer_->Shutdown(); |
177 } | 181 } |
178 | 182 |
179 void WebMediaPlayerProxy::DemuxerOpenedTask( | 183 void WebMediaPlayerProxy::DemuxerOpenedTask( |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 const std::string& session_id, | 258 const std::string& session_id, |
255 scoped_array<uint8> init_data, | 259 scoped_array<uint8> init_data, |
256 int init_data_size) { | 260 int init_data_size) { |
257 DCHECK(render_loop_->BelongsToCurrentThread()); | 261 DCHECK(render_loop_->BelongsToCurrentThread()); |
258 if (webmediaplayer_) | 262 if (webmediaplayer_) |
259 webmediaplayer_->OnNeedKey(key_system, session_id, | 263 webmediaplayer_->OnNeedKey(key_system, session_id, |
260 init_data.Pass(), init_data_size); | 264 init_data.Pass(), init_data_size); |
261 } | 265 } |
262 | 266 |
263 } // namespace webkit_media | 267 } // namespace webkit_media |
OLD | NEW |