Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: media/filters/ffmpeg_demuxer.cc

Issue 165176: Merge 21999 - BufferedDataSource to support server without range request supp... (Closed) Base URL: svn://chrome-svn/chrome/branches/195/src/
Patch Set: Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/filters/ffmpeg_demuxer.h ('k') | media/filters/ffmpeg_demuxer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Modified: svn:mergeinfo
Merged /trunk/src/media/filters/ffmpeg_demuxer.cc:r21999
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « media/filters/ffmpeg_demuxer.h ('k') | media/filters/ffmpeg_demuxer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698