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

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

Issue 4291001: Convert implicit scoped_refptr constructor calls to explicit ones, part 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/build
Patch Set: comments Created 10 years, 1 month 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/base/pipeline_impl.cc ('k') | net/base/host_resolver_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/callback.h" 5 #include "base/callback.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/scoped_ptr.h" 8 #include "base/scoped_ptr.h"
9 #include "base/stl_util-inl.h" 9 #include "base/stl_util-inl.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 if (kDemuxerIsWebm && (stream->codec->codec_id != CODEC_ID_VP8 && 440 if (kDemuxerIsWebm && (stream->codec->codec_id != CODEC_ID_VP8 &&
441 stream->codec->codec_id != CODEC_ID_VORBIS)) { 441 stream->codec->codec_id != CODEC_ID_VORBIS)) {
442 packet_streams_.push_back(NULL); 442 packet_streams_.push_back(NULL);
443 continue; 443 continue;
444 } 444 }
445 445
446 FFmpegDemuxerStream* demuxer_stream 446 FFmpegDemuxerStream* demuxer_stream
447 = new FFmpegDemuxerStream(this, stream); 447 = new FFmpegDemuxerStream(this, stream);
448 448
449 DCHECK(demuxer_stream); 449 DCHECK(demuxer_stream);
450 streams_.push_back(demuxer_stream); 450 streams_.push_back(make_scoped_refptr(demuxer_stream));
451 packet_streams_.push_back(demuxer_stream); 451 packet_streams_.push_back(make_scoped_refptr(demuxer_stream));
452 max_duration = std::max(max_duration, demuxer_stream->duration()); 452 max_duration = std::max(max_duration, demuxer_stream->duration());
453 } else { 453 } else {
454 packet_streams_.push_back(NULL); 454 packet_streams_.push_back(NULL);
455 } 455 }
456 } 456 }
457 if (streams_.empty()) { 457 if (streams_.empty()) {
458 host()->SetError(DEMUXER_ERROR_NO_SUPPORTED_STREAMS); 458 host()->SetError(DEMUXER_ERROR_NO_SUPPORTED_STREAMS);
459 callback->Run(); 459 callback->Run();
460 return; 460 return;
461 } 461 }
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 read_event_.Wait(); 611 read_event_.Wait();
612 return last_read_bytes_; 612 return last_read_bytes_;
613 } 613 }
614 614
615 void FFmpegDemuxer::SignalReadCompleted(size_t size) { 615 void FFmpegDemuxer::SignalReadCompleted(size_t size) {
616 last_read_bytes_ = size; 616 last_read_bytes_ = size;
617 read_event_.Signal(); 617 read_event_.Signal();
618 } 618 }
619 619
620 } // namespace media 620 } // namespace media
OLDNEW
« no previous file with comments | « media/base/pipeline_impl.cc ('k') | net/base/host_resolver_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698