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

Side by Side Diff: chromecast/media/cma/pipeline/av_pipeline_impl.cc

Issue 2340013002: [Chromecast] Don't push buffers after the backend has been stopped (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chromecast/media/cma/pipeline/av_pipeline_impl.h" 5 #include "chromecast/media/cma/pipeline/av_pipeline_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 } 270 }
271 271
272 void AvPipelineImpl::OnBufferDecrypted( 272 void AvPipelineImpl::OnBufferDecrypted(
273 std::unique_ptr<DecryptContextImpl> decrypt_context, 273 std::unique_ptr<DecryptContextImpl> decrypt_context,
274 scoped_refptr<DecoderBufferBase> buffer, 274 scoped_refptr<DecoderBufferBase> buffer,
275 bool success) { 275 bool success) {
276 if (!success) { 276 if (!success) {
277 LOG(WARNING) << "Can't decrypt with decrypt_context"; 277 LOG(WARNING) << "Can't decrypt with decrypt_context";
278 buffer->set_decrypt_context(std::move(decrypt_context)); 278 buffer->set_decrypt_context(std::move(decrypt_context));
279 } 279 }
280
281 if (!enable_feeding_)
282 return;
283
280 pending_buffer_ = buffer; 284 pending_buffer_ = buffer;
281 PushPendingBuffer(); 285 PushPendingBuffer();
282 } 286 }
283 287
284 void AvPipelineImpl::OnPushBufferComplete(BufferStatus status) { 288 void AvPipelineImpl::OnPushBufferComplete(BufferStatus status) {
285 DCHECK(thread_checker_.CalledOnValidThread()); 289 DCHECK(thread_checker_.CalledOnValidThread());
286 pushed_buffer_ = nullptr; 290 pushed_buffer_ = nullptr;
287 if (status == MediaPipelineBackend::kBufferFailed) { 291 if (status == MediaPipelineBackend::kBufferFailed) {
288 LOG(WARNING) << "AvPipelineImpl: PushFrame failed"; 292 LOG(WARNING) << "AvPipelineImpl: PushFrame failed";
289 OnDecoderError(); 293 OnDecoderError();
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 } 397 }
394 } 398 }
395 399
396 // The frame is playable: remove it from the list of non playable frames. 400 // The frame is playable: remove it from the list of non playable frames.
397 non_playable_frames_.pop_front(); 401 non_playable_frames_.pop_front();
398 } 402 }
399 } 403 }
400 404
401 } // namespace media 405 } // namespace media
402 } // namespace chromecast 406 } // namespace chromecast
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698