| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "base/scoped_ptr.h" | 5 #include "base/scoped_ptr.h" |
| 6 #include "base/stl_util-inl.h" | 6 #include "base/stl_util-inl.h" |
| 7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
| 8 #include "base/time.h" | 8 #include "base/time.h" |
| 9 #include "media/base/filter_host.h" | 9 #include "media/base/filter_host.h" |
| 10 #include "media/filters/ffmpeg_common.h" | 10 #include "media/filters/ffmpeg_common.h" |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 read_position_ = position; | 338 read_position_ = position; |
| 339 return true; | 339 return true; |
| 340 } | 340 } |
| 341 | 341 |
| 342 bool FFmpegDemuxer::GetSize(int64* size_out) { | 342 bool FFmpegDemuxer::GetSize(int64* size_out) { |
| 343 DCHECK(data_source_); | 343 DCHECK(data_source_); |
| 344 | 344 |
| 345 return data_source_->GetSize(size_out); | 345 return data_source_->GetSize(size_out); |
| 346 } | 346 } |
| 347 | 347 |
| 348 bool FFmpegDemuxer::IsStreamed() { | 348 bool FFmpegDemuxer::IsStreaming() { |
| 349 return false; | 349 DCHECK(data_source_); |
| 350 |
| 351 return data_source_->IsStreaming(); |
| 350 } | 352 } |
| 351 | 353 |
| 352 void FFmpegDemuxer::InitializeTask(DataSource* data_source, | 354 void FFmpegDemuxer::InitializeTask(DataSource* data_source, |
| 353 FilterCallback* callback) { | 355 FilterCallback* callback) { |
| 354 DCHECK_EQ(MessageLoop::current(), message_loop()); | 356 DCHECK_EQ(MessageLoop::current(), message_loop()); |
| 355 scoped_ptr<FilterCallback> c(callback); | 357 scoped_ptr<FilterCallback> c(callback); |
| 356 | 358 |
| 357 data_source_ = data_source; | 359 data_source_ = data_source; |
| 358 | 360 |
| 359 // Add ourself to Protocol list and get our unique key. | 361 // Add ourself to Protocol list and get our unique key. |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 548 read_event_.Wait(); | 550 read_event_.Wait(); |
| 549 return last_read_bytes_; | 551 return last_read_bytes_; |
| 550 } | 552 } |
| 551 | 553 |
| 552 void FFmpegDemuxer::SignalReadCompleted(size_t size) { | 554 void FFmpegDemuxer::SignalReadCompleted(size_t size) { |
| 553 last_read_bytes_ = size; | 555 last_read_bytes_ = size; |
| 554 read_event_.Signal(); | 556 read_event_.Signal(); |
| 555 } | 557 } |
| 556 | 558 |
| 557 } // namespace media | 559 } // namespace media |
| OLD | NEW |