Chromium Code Reviews| Index: content/common/gpu/media/omx_video_decode_accelerator.cc |
| =================================================================== |
| --- content/common/gpu/media/omx_video_decode_accelerator.cc (revision 157792) |
| +++ content/common/gpu/media/omx_video_decode_accelerator.cc (working copy) |
| @@ -190,7 +190,8 @@ |
| PLATFORM_FAILURE, false); |
| RETURN_ON_FAILURE(num_components == 1, "No components for: " << role_name, |
| PLATFORM_FAILURE, false); |
| - component_name_is_nvidia_h264ext_ = component == "OMX.Nvidia.h264ext.decode"; |
| + component_name_is_nvidia_h264ext_ = StartsWithASCII(component, |
| + "OMX.Nvidia.h264ext.decode", true); |
|
Ami GONE FROM CHROMIUM
2012/09/21 16:35:09
indent is wrong
|
| // Get the handle to the component. |
| result = omx_gethandle( |
| @@ -498,10 +499,11 @@ |
| void OmxVideoDecodeAccelerator::OnReachedIdleInInitializing() { |
| DCHECK_EQ(client_state_, OMX_StateLoaded); |
| client_state_ = OMX_StateIdle; |
| + OMX_ERRORTYPE result = OMX_ErrorNone; |
|
Ami GONE FROM CHROMIUM
2012/09/21 16:35:09
unnecessary (and counter to chromium style; declar
|
| // Query the resources with the component. |
| if (component_name_is_nvidia_h264ext_) { |
| OMX_INDEXTYPE extension_index; |
| - OMX_ERRORTYPE result = OMX_GetExtensionIndex( |
| + result = OMX_GetExtensionIndex( |
| component_handle_, |
| const_cast<char*>("OMX.Nvidia.index.config.checkresources"), |
| &extension_index); |
| @@ -517,6 +519,22 @@ |
| RETURN_ON_OMX_FAILURE(result, |
| "Resource Allocation failed", |
| PLATFORM_FAILURE,); |
| + |
| + // The OMX spec doesn't say whether (0,0) is bottom-left or top-left, but both |
|
Ami GONE FROM CHROMIUM
2012/09/21 16:35:09
indent is off
|
| + // OMX implementations used with this class far choose the same, and are the |
|
Ami GONE FROM CHROMIUM
2012/09/21 16:35:09
this isn't true anymore (which is why this code is
|
| + // opposite of other APIs used for HW decode (DXVA, OS/X, VAAPI). So we |
| + // request a mirror here to avoid having to track Y-orientation throughout the |
| + // stack (particularly unattractive because this is exposed to ppapi plugin |
| + // authors and NaCl programs). |
| + OMX_CONFIG_MIRRORTYPE mirror_config; |
| + InitParam(*this, &mirror_config); |
| + result = OMX_GetConfig( component_handle_, |
|
Ami GONE FROM CHROMIUM
2012/09/21 16:35:09
extra space
|
| + OMX_IndexConfigCommonMirror, &mirror_config); |
|
Ami GONE FROM CHROMIUM
2012/09/21 16:35:09
indent is off
|
| + RETURN_ON_OMX_FAILURE(result, "Failed to get mirror", PLATFORM_FAILURE,); |
| + mirror_config.eMirror = OMX_MirrorVertical; |
| + result = OMX_SetConfig( component_handle_, |
|
Ami GONE FROM CHROMIUM
2012/09/21 16:35:09
extra space
|
| + OMX_IndexConfigCommonMirror, &mirror_config); |
|
Ami GONE FROM CHROMIUM
2012/09/21 16:35:09
indent is off
|
| + RETURN_ON_OMX_FAILURE(result, "Failed to set mirror", PLATFORM_FAILURE,); |
| } |
| BeginTransitionToState(OMX_StateExecuting); |
| } |