OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |