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

Side by Side Diff: content/common/gpu/media/fake_video_decode_accelerator.cc

Issue 1750213002: Fix Android black frames from MSE config changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address the easy feedback, awaiting high level design sign off Created 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/common/gpu/media/fake_video_decode_accelerator.h" 5 #include "content/common/gpu/media/fake_video_decode_accelerator.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 if (flushing_ && queued_bitstream_ids_.empty()) { 170 if (flushing_ && queued_bitstream_ids_.empty()) {
171 flushing_ = false; 171 flushing_ = false;
172 client_->NotifyFlushDone(); 172 client_->NotifyFlushDone();
173 } 173 }
174 while (!free_output_buffers_.empty() && !queued_bitstream_ids_.empty()) { 174 while (!free_output_buffers_.empty() && !queued_bitstream_ids_.empty()) {
175 int bitstream_id = queued_bitstream_ids_.front(); 175 int bitstream_id = queued_bitstream_ids_.front();
176 queued_bitstream_ids_.pop(); 176 queued_bitstream_ids_.pop();
177 int buffer_id = free_output_buffers_.front(); 177 int buffer_id = free_output_buffers_.front();
178 free_output_buffers_.pop(); 178 free_output_buffers_.pop();
179 179
180 const media::Picture picture = 180 const media::Picture picture = media::Picture(
181 media::Picture(buffer_id, 181 buffer_id, bitstream_id, gfx::Rect(frame_buffer_size_), false, false);
182 bitstream_id,
183 gfx::Rect(frame_buffer_size_),
184 false);
185 client_->PictureReady(picture); 182 client_->PictureReady(picture);
186 // Bitstream no longer needed. 183 // Bitstream no longer needed.
187 client_->NotifyEndOfBitstreamBuffer(bitstream_id); 184 client_->NotifyEndOfBitstreamBuffer(bitstream_id);
188 if (flushing_ && queued_bitstream_ids_.empty()) { 185 if (flushing_ && queued_bitstream_ids_.empty()) {
189 flushing_ = false; 186 flushing_ = false;
190 client_->NotifyFlushDone(); 187 client_->NotifyFlushDone();
191 } 188 }
192 } 189 }
193 } 190 }
194 191
195 } // namespace content 192 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698