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

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

Issue 1750213002: Fix Android black frames from MSE config changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 (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 "content/common/gpu/media/dxva_video_decode_accelerator_win.h" 5 #include "content/common/gpu/media/dxva_video_decode_accelerator_win.h"
6 6
7 #if !defined(OS_WIN) 7 #if !defined(OS_WIN)
8 #error This file should only be built on Windows. 8 #error This file should only be built on Windows.
9 #endif // !defined(OS_WIN) 9 #endif // !defined(OS_WIN)
10 10
(...skipping 1729 matching lines...) Expand 10 before | Expand all | Expand 10 after
1740 } 1740 }
1741 1741
1742 void DXVAVideoDecodeAccelerator::NotifyPictureReady( 1742 void DXVAVideoDecodeAccelerator::NotifyPictureReady(
1743 int picture_buffer_id, 1743 int picture_buffer_id,
1744 int input_buffer_id) { 1744 int input_buffer_id) {
1745 DCHECK(main_thread_task_runner_->BelongsToCurrentThread()); 1745 DCHECK(main_thread_task_runner_->BelongsToCurrentThread());
1746 // This task could execute after the decoder has been torn down. 1746 // This task could execute after the decoder has been torn down.
1747 if (GetState() != kUninitialized && client_) { 1747 if (GetState() != kUninitialized && client_) {
1748 // TODO(henryhsu): Use correct visible size instead of (0, 0). We can't use 1748 // TODO(henryhsu): Use correct visible size instead of (0, 0). We can't use
1749 // coded size here so use (0, 0) intentionally to have the client choose. 1749 // coded size here so use (0, 0) intentionally to have the client choose.
1750 media::Picture picture(picture_buffer_id, input_buffer_id, 1750 media::Picture picture(picture_buffer_id, input_buffer_id, gfx::Rect(0, 0),
liberato (no reviews please) 2016/03/09 15:32:06 perhaps remove this file from the CL.
chcunningham 2016/03/09 20:25:09 Done.
1751 gfx::Rect(0, 0), false); 1751 false);
1752 client_->PictureReady(picture); 1752 client_->PictureReady(picture);
1753 } 1753 }
1754 } 1754 }
1755 1755
1756 void DXVAVideoDecodeAccelerator::NotifyInputBuffersDropped() { 1756 void DXVAVideoDecodeAccelerator::NotifyInputBuffersDropped() {
1757 DCHECK(main_thread_task_runner_->BelongsToCurrentThread()); 1757 DCHECK(main_thread_task_runner_->BelongsToCurrentThread());
1758 if (!client_) 1758 if (!client_)
1759 return; 1759 return;
1760 1760
1761 for (PendingInputs::iterator it = pending_input_buffers_.begin(); 1761 for (PendingInputs::iterator it = pending_input_buffers_.begin();
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
2450 hr = transform->SetOutputType(0, media_type.get(), 0); // No flags 2450 hr = transform->SetOutputType(0, media_type.get(), 0); // No flags
2451 RETURN_ON_HR_FAILURE(hr, "Failed to set output type", false); 2451 RETURN_ON_HR_FAILURE(hr, "Failed to set output type", false);
2452 return true; 2452 return true;
2453 } 2453 }
2454 media_type.Release(); 2454 media_type.Release();
2455 } 2455 }
2456 return false; 2456 return false;
2457 } 2457 }
2458 2458
2459 } // namespace content 2459 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698