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

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

Issue 7741012: ovda: allow the setting of profile to be optional (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 9 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
« 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 OMX_ERRORTYPE result = OMX_SendCommand( 508 OMX_ERRORTYPE result = OMX_SendCommand(
509 component_handle_, OMX_CommandStateSet, new_state, 0); 509 component_handle_, OMX_CommandStateSet, new_state, 0);
510 RETURN_ON_OMX_FAILURE(result, "SendCommand(OMX_CommandStateSet) failed", 510 RETURN_ON_OMX_FAILURE(result, "SendCommand(OMX_CommandStateSet) failed",
511 PLATFORM_FAILURE,); 511 PLATFORM_FAILURE,);
512 } 512 }
513 513
514 void OmxVideoDecodeAccelerator::OnReachedIdleInInitializing() { 514 void OmxVideoDecodeAccelerator::OnReachedIdleInInitializing() {
515 DCHECK_EQ(client_state_, OMX_StateLoaded); 515 DCHECK_EQ(client_state_, OMX_StateLoaded);
516 client_state_ = OMX_StateIdle; 516 client_state_ = OMX_StateIdle;
517 // Query the resources with the component. 517 // Query the resources with the component.
518 if (component_name_is_nvidia_h264ext_) { 518 if (component_name_is_nvidia_h264ext_ &&
519 (profile_ != OMX_VIDEO_AVCProfileMax)) {
519 OMX_INDEXTYPE extension_index; 520 OMX_INDEXTYPE extension_index;
520 OMX_ERRORTYPE result = OMX_GetExtensionIndex( 521 OMX_ERRORTYPE result = OMX_GetExtensionIndex(
521 component_handle_, 522 component_handle_,
522 const_cast<char*>("OMX.Nvidia.index.config.checkresources"), 523 const_cast<char*>("OMX.Nvidia.index.config.checkresources"),
523 &extension_index); 524 &extension_index);
524 RETURN_ON_OMX_FAILURE(result, 525 RETURN_ON_OMX_FAILURE(result,
525 "Failed to get the extension", 526 "Failed to get the extension",
526 PLATFORM_FAILURE,); 527 PLATFORM_FAILURE,);
527 OMX_VIDEO_PARAM_PROFILELEVELTYPE video_profile_level; 528 OMX_VIDEO_PARAM_PROFILELEVELTYPE video_profile_level;
528 InitParam(*this, &video_profile_level); 529 InitParam(*this, &video_profile_level);
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
1066 1067
1067 bool OmxVideoDecodeAccelerator::SendCommandToPort( 1068 bool OmxVideoDecodeAccelerator::SendCommandToPort(
1068 OMX_COMMANDTYPE cmd, int port_index) { 1069 OMX_COMMANDTYPE cmd, int port_index) {
1069 DCHECK_EQ(message_loop_, MessageLoop::current()); 1070 DCHECK_EQ(message_loop_, MessageLoop::current());
1070 OMX_ERRORTYPE result = OMX_SendCommand(component_handle_, 1071 OMX_ERRORTYPE result = OMX_SendCommand(component_handle_,
1071 cmd, port_index, 0); 1072 cmd, port_index, 0);
1072 RETURN_ON_OMX_FAILURE(result, "SendCommand() failed" << cmd, 1073 RETURN_ON_OMX_FAILURE(result, "SendCommand() failed" << cmd,
1073 PLATFORM_FAILURE, false); 1074 PLATFORM_FAILURE, false);
1074 return true; 1075 return true;
1075 } 1076 }
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