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

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

Issue 4192012: Convert implicit scoped_refptr constructor calls to explicit ones, part 1 (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: fix presubmit 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/filters/decoder_base_unittest.cc ('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')
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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 return; 119 return;
120 } 120 }
121 121
122 // Convert if the packet if there is bitstream filter. 122 // Convert if the packet if there is bitstream filter.
123 if (packet->data && bitstream_converter_.get() && 123 if (packet->data && bitstream_converter_.get() &&
124 !bitstream_converter_->ConvertPacket(packet)) { 124 !bitstream_converter_->ConvertPacket(packet)) {
125 LOG(ERROR) << "Format converstion failed."; 125 LOG(ERROR) << "Format converstion failed.";
126 } 126 }
127 127
128 // Enqueue the callback and attempt to satisfy a read immediately. 128 // Enqueue the callback and attempt to satisfy a read immediately.
129 scoped_refptr<Buffer> buffer = 129 scoped_refptr<Buffer> buffer(
130 new AVPacketBuffer(packet, timestamp, duration); 130 new AVPacketBuffer(packet, timestamp, duration));
131 if (!buffer) { 131 if (!buffer) {
132 NOTREACHED() << "Unable to allocate AVPacketBuffer"; 132 NOTREACHED() << "Unable to allocate AVPacketBuffer";
133 return; 133 return;
134 } 134 }
135 buffer_queue_.push_back(buffer); 135 buffer_queue_.push_back(buffer);
136 FulfillPendingRead(); 136 FulfillPendingRead();
137 return; 137 return;
138 } 138 }
139 139
140 void FFmpegDemuxerStream::FlushBuffers() { 140 void FFmpegDemuxerStream::FlushBuffers() {
(...skipping 470 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/filters/decoder_base_unittest.cc ('k') | media/filters/ffmpeg_demuxer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698