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

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

Issue 426873004: Pass decoded picture size from VDA to client (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use gfx::Size Created 6 years, 4 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
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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/debug/trace_event.h" 6 #include "base/debug/trace_event.h"
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 tfp_picture->x_pixmap(), 365 tfp_picture->x_pixmap(),
366 tfp_picture->size()), 366 tfp_picture->size()),
367 "Failed putting surface into pixmap", PLATFORM_FAILURE, ); 367 "Failed putting surface into pixmap", PLATFORM_FAILURE, );
368 368
369 // Notify the client a picture is ready to be displayed. 369 // Notify the client a picture is ready to be displayed.
370 ++num_frames_at_client_; 370 ++num_frames_at_client_;
371 TRACE_COUNTER1("Video Decoder", "Textures at client", num_frames_at_client_); 371 TRACE_COUNTER1("Video Decoder", "Textures at client", num_frames_at_client_);
372 DVLOG(4) << "Notifying output picture id " << output_id 372 DVLOG(4) << "Notifying output picture id " << output_id
373 << " for input "<< input_id << " is ready"; 373 << " for input "<< input_id << " is ready";
374 if (client_) 374 if (client_)
375 client_->PictureReady(media::Picture(output_id, input_id)); 375 client_->PictureReady(media::Picture(output_id,
376 input_id,
377 tfp_picture->size()));
Pawel Osciak 2014/08/10 00:02:21 Please file a bug for this and add: TODO(posciak):
kcwu 2014/08/12 04:48:05 Done.
376 } 378 }
377 379
378 void VaapiVideoDecodeAccelerator::TryOutputSurface() { 380 void VaapiVideoDecodeAccelerator::TryOutputSurface() {
379 DCHECK_EQ(message_loop_, base::MessageLoop::current()); 381 DCHECK_EQ(message_loop_, base::MessageLoop::current());
380 382
381 // Handle Destroy() arriving while pictures are queued for output. 383 // Handle Destroy() arriving while pictures are queued for output.
382 if (!client_) 384 if (!client_)
383 return; 385 return;
384 386
385 if (pending_output_cbs_.empty() || output_buffers_.empty()) 387 if (pending_output_cbs_.empty() || output_buffers_.empty())
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 DCHECK_EQ(message_loop_, base::MessageLoop::current()); 916 DCHECK_EQ(message_loop_, base::MessageLoop::current());
915 Cleanup(); 917 Cleanup();
916 delete this; 918 delete this;
917 } 919 }
918 920
919 bool VaapiVideoDecodeAccelerator::CanDecodeOnIOThread() { 921 bool VaapiVideoDecodeAccelerator::CanDecodeOnIOThread() {
920 return false; 922 return false;
921 } 923 }
922 924
923 } // namespace content 925 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698