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

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

Issue 3821005: Make sure to use scoped_refptr for refcounted params in audio/video/remoting (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: Created 10 years, 2 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/decoder_base.h ('k') | media/filters/ffmpeg_video_decoder.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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 NewRunnableMethod(this, &FFmpegDemuxer::SeekTask, time, callback)); 303 NewRunnableMethod(this, &FFmpegDemuxer::SeekTask, time, callback));
304 } 304 }
305 305
306 void FFmpegDemuxer::OnAudioRendererDisabled() { 306 void FFmpegDemuxer::OnAudioRendererDisabled() {
307 message_loop()->PostTask(FROM_HERE, 307 message_loop()->PostTask(FROM_HERE,
308 NewRunnableMethod(this, &FFmpegDemuxer::DisableAudioStreamTask)); 308 NewRunnableMethod(this, &FFmpegDemuxer::DisableAudioStreamTask));
309 } 309 }
310 310
311 void FFmpegDemuxer::Initialize(DataSource* data_source, 311 void FFmpegDemuxer::Initialize(DataSource* data_source,
312 FilterCallback* callback) { 312 FilterCallback* callback) {
313 message_loop()->PostTask(FROM_HERE, 313 message_loop()->PostTask(
314 NewRunnableMethod(this, &FFmpegDemuxer::InitializeTask, data_source, 314 FROM_HERE,
315 NewRunnableMethod(this,
316 &FFmpegDemuxer::InitializeTask,
317 make_scoped_refptr(data_source),
315 callback)); 318 callback));
316 } 319 }
317 320
318 size_t FFmpegDemuxer::GetNumberOfStreams() { 321 size_t FFmpegDemuxer::GetNumberOfStreams() {
319 return streams_.size(); 322 return streams_.size();
320 } 323 }
321 324
322 scoped_refptr<DemuxerStream> FFmpegDemuxer::GetStream(int stream) { 325 scoped_refptr<DemuxerStream> FFmpegDemuxer::GetStream(int stream) {
323 DCHECK_GE(stream, 0); 326 DCHECK_GE(stream, 0);
324 DCHECK_LT(stream, static_cast<int>(streams_.size())); 327 DCHECK_LT(stream, static_cast<int>(streams_.size()));
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 read_event_.Wait(); 611 read_event_.Wait();
609 return last_read_bytes_; 612 return last_read_bytes_;
610 } 613 }
611 614
612 void FFmpegDemuxer::SignalReadCompleted(size_t size) { 615 void FFmpegDemuxer::SignalReadCompleted(size_t size) {
613 last_read_bytes_ = size; 616 last_read_bytes_ = size;
614 read_event_.Signal(); 617 read_event_.Signal();
615 } 618 }
616 619
617 } // namespace media 620 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/decoder_base.h ('k') | media/filters/ffmpeg_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698