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

Side by Side Diff: media/filters/ffmpeg_video_decoder.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/ffmpeg_demuxer.cc ('k') | media/filters/omx_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 "media/filters/ffmpeg_video_decoder.h" 5 #include "media/filters/ffmpeg_video_decoder.h"
6 6
7 #include <deque> 7 #include <deque>
8 8
9 #include "base/task.h" 9 #include "base/task.h"
10 #include "media/base/callback.h" 10 #include "media/base/callback.h"
(...skipping 18 matching lines...) Expand all
29 decode_engine_(engine) { 29 decode_engine_(engine) {
30 memset(&info_, 0, sizeof(info_)); 30 memset(&info_, 0, sizeof(info_));
31 } 31 }
32 32
33 FFmpegVideoDecoder::~FFmpegVideoDecoder() { 33 FFmpegVideoDecoder::~FFmpegVideoDecoder() {
34 } 34 }
35 35
36 void FFmpegVideoDecoder::Initialize(DemuxerStream* demuxer_stream, 36 void FFmpegVideoDecoder::Initialize(DemuxerStream* demuxer_stream,
37 FilterCallback* callback) { 37 FilterCallback* callback) {
38 if (MessageLoop::current() != message_loop()) { 38 if (MessageLoop::current() != message_loop()) {
39 message_loop()->PostTask(FROM_HERE, 39 message_loop()->PostTask(
40 NewRunnableMethod(this, 40 FROM_HERE,
41 &FFmpegVideoDecoder::Initialize, 41 NewRunnableMethod(this,
42 demuxer_stream, 42 &FFmpegVideoDecoder::Initialize,
43 callback)); 43 make_scoped_refptr(demuxer_stream),
44 callback));
44 return; 45 return;
45 } 46 }
46 47
47 DCHECK_EQ(MessageLoop::current(), message_loop()); 48 DCHECK_EQ(MessageLoop::current(), message_loop());
48 DCHECK(!demuxer_stream_); 49 DCHECK(!demuxer_stream_);
49 DCHECK(!initialize_callback_.get()); 50 DCHECK(!initialize_callback_.get());
50 51
51 demuxer_stream_ = demuxer_stream; 52 demuxer_stream_ = demuxer_stream;
52 initialize_callback_.reset(callback); 53 initialize_callback_.reset(callback);
53 54
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 } 442 }
442 443
443 // static 444 // static
444 bool FFmpegVideoDecoder::IsMediaFormatSupported(const MediaFormat& format) { 445 bool FFmpegVideoDecoder::IsMediaFormatSupported(const MediaFormat& format) {
445 std::string mime_type; 446 std::string mime_type;
446 return format.GetAsString(MediaFormat::kMimeType, &mime_type) && 447 return format.GetAsString(MediaFormat::kMimeType, &mime_type) &&
447 mime_type::kFFmpegVideo == mime_type; 448 mime_type::kFFmpegVideo == mime_type;
448 } 449 }
449 450
450 } // namespace media 451 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/ffmpeg_demuxer.cc ('k') | media/filters/omx_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698