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

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

Issue 18580008: Rename VideoDecoder::HasOutputFrameAvailable() to CanReadWithoutStalling(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: name change and drop disabled (invalid) test Created 7 years, 5 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/video_frame_stream.h ('k') | media/filters/video_renderer_base.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/video_frame_stream.h" 5 #include "media/filters/video_frame_stream.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 return; 134 return;
135 } 135 }
136 136
137 state_ = STATE_STOPPED; 137 state_ = STATE_STOPPED;
138 stream_ = NULL; 138 stream_ = NULL;
139 decoder_.reset(); 139 decoder_.reset();
140 decrypting_demuxer_stream_.reset(); 140 decrypting_demuxer_stream_.reset();
141 message_loop_->PostTask(FROM_HERE, base::ResetAndReturn(&stop_cb_)); 141 message_loop_->PostTask(FROM_HERE, base::ResetAndReturn(&stop_cb_));
142 } 142 }
143 143
144 bool VideoFrameStream::HasOutputFrameAvailable() const { 144 bool VideoFrameStream::CanReadWithoutStalling() const {
145 DCHECK(message_loop_->BelongsToCurrentThread()); 145 DCHECK(message_loop_->BelongsToCurrentThread());
146 return decoder_->HasOutputFrameAvailable(); 146 return decoder_->CanReadWithoutStalling();
147 } 147 }
148 148
149 void VideoFrameStream::Read(const DemuxerStream::ReadCB& demuxer_read_cb) { 149 void VideoFrameStream::Read(const DemuxerStream::ReadCB& demuxer_read_cb) {
150 DCHECK(message_loop_->BelongsToCurrentThread()); 150 DCHECK(message_loop_->BelongsToCurrentThread());
151 151
152 if (state_ == STATE_FLUSHING_DECODER) { 152 if (state_ == STATE_FLUSHING_DECODER) {
153 message_loop_->PostTask(FROM_HERE, base::Bind( 153 message_loop_->PostTask(FROM_HERE, base::Bind(
154 demuxer_read_cb, DemuxerStream::kOk, DecoderBuffer::CreateEOSBuffer())); 154 demuxer_read_cb, DemuxerStream::kOk, DecoderBuffer::CreateEOSBuffer()));
155 return; 155 return;
156 } 156 }
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 DCHECK(!stop_cb_.is_null()); 358 DCHECK(!stop_cb_.is_null());
359 359
360 state_ = STATE_STOPPED; 360 state_ = STATE_STOPPED;
361 stream_ = NULL; 361 stream_ = NULL;
362 decoder_.reset(); 362 decoder_.reset();
363 decrypting_demuxer_stream_.reset(); 363 decrypting_demuxer_stream_.reset();
364 base::ResetAndReturn(&stop_cb_).Run(); 364 base::ResetAndReturn(&stop_cb_).Run();
365 } 365 }
366 366
367 } // namespace media 367 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/video_frame_stream.h ('k') | media/filters/video_renderer_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698