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

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

Issue 312803002: Android media: VideoFrame should not store so many sync points. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: android unittests build fix Created 6 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
« media/base/video_frame.cc ('K') | « media/filters/gpu_video_decoder.h ('k') | 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 (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 <algorithm> 7 #include <algorithm>
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 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 474
475 output_cb_.Run(frame); 475 output_cb_.Run(frame);
476 } 476 }
477 477
478 // static 478 // static
479 void GpuVideoDecoder::ReleaseMailbox( 479 void GpuVideoDecoder::ReleaseMailbox(
480 base::WeakPtr<GpuVideoDecoder> decoder, 480 base::WeakPtr<GpuVideoDecoder> decoder,
481 const scoped_refptr<media::GpuVideoAcceleratorFactories>& factories, 481 const scoped_refptr<media::GpuVideoAcceleratorFactories>& factories,
482 int64 picture_buffer_id, 482 int64 picture_buffer_id,
483 uint32 texture_id, 483 uint32 texture_id,
484 const std::vector<uint32>& release_sync_points) { 484 uint32 release_sync_point) {
485 DCHECK(factories->GetTaskRunner()->BelongsToCurrentThread()); 485 DCHECK(factories->GetTaskRunner()->BelongsToCurrentThread());
486 486 factories->WaitSyncPoint(release_sync_point);
487 for (size_t i = 0; i < release_sync_points.size(); i++)
488 factories->WaitSyncPoint(release_sync_points[i]);
489 487
490 if (decoder) { 488 if (decoder) {
491 decoder->ReusePictureBuffer(picture_buffer_id); 489 decoder->ReusePictureBuffer(picture_buffer_id);
492 return; 490 return;
493 } 491 }
494 // It's the last chance to delete the texture after display, 492 // It's the last chance to delete the texture after display,
495 // because GpuVideoDecoder was destructed. 493 // because GpuVideoDecoder was destructed.
496 factories->DeleteTexture(texture_id); 494 factories->DeleteTexture(texture_id);
497 } 495 }
498 496
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 DLOG(ERROR) << "VDA Error: " << error; 605 DLOG(ERROR) << "VDA Error: " << error;
608 DestroyVDA(); 606 DestroyVDA();
609 } 607 }
610 608
611 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() 609 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent()
612 const { 610 const {
613 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); 611 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread());
614 } 612 }
615 613
616 } // namespace media 614 } // namespace media
OLDNEW
« media/base/video_frame.cc ('K') | « media/filters/gpu_video_decoder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698