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

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

Issue 9015015: Take advantage of the new Pass() machinery on scoped_ptr{,_malloc}. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 11 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/gpu_video_decoder.h ('k') | media/tools/player_wtl/movie.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/gpu_video_decoder.h" 5 #include "media/filters/gpu_video_decoder.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "media/base/demuxer_stream.h" 10 #include "media/base/demuxer_stream.h"
(...skipping 23 matching lines...) Expand all
34 34
35 GpuVideoDecoder::BufferTimeData::BufferTimeData( 35 GpuVideoDecoder::BufferTimeData::BufferTimeData(
36 int32 bbid, base::TimeDelta ts, base::TimeDelta dur) 36 int32 bbid, base::TimeDelta ts, base::TimeDelta dur)
37 : bitstream_buffer_id(bbid), timestamp(ts), duration(dur) { 37 : bitstream_buffer_id(bbid), timestamp(ts), duration(dur) {
38 } 38 }
39 39
40 GpuVideoDecoder::BufferTimeData::~BufferTimeData() {} 40 GpuVideoDecoder::BufferTimeData::~BufferTimeData() {}
41 41
42 GpuVideoDecoder::GpuVideoDecoder( 42 GpuVideoDecoder::GpuVideoDecoder(
43 MessageLoop* message_loop, 43 MessageLoop* message_loop,
44 Factories* factories) 44 scoped_ptr<Factories> factories)
45 : message_loop_(message_loop), 45 : message_loop_(message_loop),
46 factories_(factories), 46 factories_(factories.Pass()),
47 flush_in_progress_(false), 47 flush_in_progress_(false),
48 demuxer_read_in_progress_(false), 48 demuxer_read_in_progress_(false),
49 next_picture_buffer_id_(0), 49 next_picture_buffer_id_(0),
50 next_bitstream_buffer_id_(0) { 50 next_bitstream_buffer_id_(0) {
51 DCHECK(message_loop_ && factories_.get()); 51 DCHECK(message_loop_ && factories_.get());
52 } 52 }
53 53
54 GpuVideoDecoder::~GpuVideoDecoder() { 54 GpuVideoDecoder::~GpuVideoDecoder() {
55 DCHECK_EQ(MessageLoop::current(), message_loop_); 55 DCHECK_EQ(MessageLoop::current(), message_loop_);
56 DCHECK(!vda_); // Stop should have been already called. 56 DCHECK(!vda_); // Stop should have been already called.
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 &GpuVideoDecoder::NotifyError, this, error)); 480 &GpuVideoDecoder::NotifyError, this, error));
481 return; 481 return;
482 } 482 }
483 vda_ = NULL; 483 vda_ = NULL;
484 DLOG(ERROR) << "VDA Error: " << error; 484 DLOG(ERROR) << "VDA Error: " << error;
485 if (host()) 485 if (host())
486 host()->SetError(PIPELINE_ERROR_DECODE); 486 host()->SetError(PIPELINE_ERROR_DECODE);
487 } 487 }
488 488
489 } // namespace media 489 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/gpu_video_decoder.h ('k') | media/tools/player_wtl/movie.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698