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

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

Issue 10392141: Plumb texture target to VideoDecodeAccelerator::Client (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win build Created 8 years, 6 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 "content/common/gpu/media/omx_video_decode_accelerator.h" 5 #include "content/common/gpu/media/omx_video_decode_accelerator.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 741
742 // Request picture buffers to be handed to the component. 742 // Request picture buffers to be handed to the component.
743 // ProvidePictureBuffers() will trigger AssignPictureBuffers, which ultimately 743 // ProvidePictureBuffers() will trigger AssignPictureBuffers, which ultimately
744 // assigns the textures to the component and re-enables the port. 744 // assigns the textures to the component and re-enables the port.
745 const OMX_VIDEO_PORTDEFINITIONTYPE& vformat = port_format.format.video; 745 const OMX_VIDEO_PORTDEFINITIONTYPE& vformat = port_format.format.video;
746 last_requested_picture_buffer_dimensions_.SetSize(vformat.nFrameWidth, 746 last_requested_picture_buffer_dimensions_.SetSize(vformat.nFrameWidth,
747 vformat.nFrameHeight); 747 vformat.nFrameHeight);
748 if (client_) { 748 if (client_) {
749 client_->ProvidePictureBuffers( 749 client_->ProvidePictureBuffers(
750 kNumPictureBuffers, 750 kNumPictureBuffers,
751 gfx::Size(vformat.nFrameWidth, vformat.nFrameHeight)); 751 gfx::Size(vformat.nFrameWidth, vformat.nFrameHeight),
752 GL_TEXTURE_2D);
752 } 753 }
753 } 754 }
754 755
755 void OmxVideoDecodeAccelerator::OnOutputPortEnabled() { 756 void OmxVideoDecodeAccelerator::OnOutputPortEnabled() {
756 DCHECK_EQ(message_loop_, MessageLoop::current()); 757 DCHECK_EQ(message_loop_, MessageLoop::current());
757 758
758 if (!CanFillBuffer()) { 759 if (!CanFillBuffer()) {
759 StopOnError(ILLEGAL_STATE); 760 StopOnError(ILLEGAL_STATE);
760 return; 761 return;
761 } 762 }
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
1048 1049
1049 bool OmxVideoDecodeAccelerator::SendCommandToPort( 1050 bool OmxVideoDecodeAccelerator::SendCommandToPort(
1050 OMX_COMMANDTYPE cmd, int port_index) { 1051 OMX_COMMANDTYPE cmd, int port_index) {
1051 DCHECK_EQ(message_loop_, MessageLoop::current()); 1052 DCHECK_EQ(message_loop_, MessageLoop::current());
1052 OMX_ERRORTYPE result = OMX_SendCommand(component_handle_, 1053 OMX_ERRORTYPE result = OMX_SendCommand(component_handle_,
1053 cmd, port_index, 0); 1054 cmd, port_index, 0);
1054 RETURN_ON_OMX_FAILURE(result, "SendCommand() failed" << cmd, 1055 RETURN_ON_OMX_FAILURE(result, "SendCommand() failed" << cmd,
1055 PLATFORM_FAILURE, false); 1056 PLATFORM_FAILURE, false);
1056 return true; 1057 return true;
1057 } 1058 }
OLDNEW
« no previous file with comments | « content/common/gpu/media/mac_video_decode_accelerator.mm ('k') | content/common/gpu/media/rendering_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698