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

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

Issue 9718013: Merge FilterStatusCB into PipelineStatusCB. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 9 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_video_decoder.h ('k') | media/filters/gpu_video_decoder.h » ('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/ffmpeg_video_decoder.h" 5 #include "media/filters/ffmpeg_video_decoder.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 message_loop_->PostTask(FROM_HERE, base::Bind( 132 message_loop_->PostTask(FROM_HERE, base::Bind(
133 &FFmpegVideoDecoder::Stop, this, callback)); 133 &FFmpegVideoDecoder::Stop, this, callback));
134 return; 134 return;
135 } 135 }
136 136
137 ReleaseFFmpegResources(); 137 ReleaseFFmpegResources();
138 state_ = kUninitialized; 138 state_ = kUninitialized;
139 callback.Run(); 139 callback.Run();
140 } 140 }
141 141
142 void FFmpegVideoDecoder::Seek(base::TimeDelta time, const FilterStatusCB& cb) { 142 void FFmpegVideoDecoder::Seek(base::TimeDelta time,
143 const PipelineStatusCB& cb) {
143 if (MessageLoop::current() != message_loop_) { 144 if (MessageLoop::current() != message_loop_) {
144 message_loop_->PostTask(FROM_HERE, base::Bind( 145 message_loop_->PostTask(FROM_HERE, base::Bind(
145 &FFmpegVideoDecoder::Seek, this, time, cb)); 146 &FFmpegVideoDecoder::Seek, this, time, cb));
146 return; 147 return;
147 } 148 }
148 149
149 cb.Run(PIPELINE_OK); 150 cb.Run(PIPELINE_OK);
150 } 151 }
151 152
152 void FFmpegVideoDecoder::Pause(const base::Closure& callback) { 153 void FFmpegVideoDecoder::Pause(const base::Closure& callback) {
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 scoped_refptr<VideoFrame> FFmpegVideoDecoder::AllocateVideoFrame() { 440 scoped_refptr<VideoFrame> FFmpegVideoDecoder::AllocateVideoFrame() {
440 VideoFrame::Format format = PixelFormatToVideoFormat(codec_context_->pix_fmt); 441 VideoFrame::Format format = PixelFormatToVideoFormat(codec_context_->pix_fmt);
441 size_t width = codec_context_->width; 442 size_t width = codec_context_->width;
442 size_t height = codec_context_->height; 443 size_t height = codec_context_->height;
443 444
444 return VideoFrame::CreateFrame(format, width, height, 445 return VideoFrame::CreateFrame(format, width, height,
445 kNoTimestamp(), kNoTimestamp()); 446 kNoTimestamp(), kNoTimestamp());
446 } 447 }
447 448
448 } // namespace media 449 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/ffmpeg_video_decoder.h ('k') | media/filters/gpu_video_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698