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

Unified Diff: content/common/gpu/media/omx_video_decode_accelerator.cc

Issue 10967047: Set the config OMX_IndexConfigCommonMirror/OMX_MirrorVertical (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
// Get the handle to the component.
result = omx_gethandle(
@@ -517,6 +518,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
+ // NVIDIA OMX implementation used with this class chooses the 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_,
+ OMX_IndexConfigCommonMirror, &mirror_config);
+ RETURN_ON_OMX_FAILURE(result, "Failed to get mirror", PLATFORM_FAILURE,);
+ mirror_config.eMirror = OMX_MirrorVertical;
+ result = OMX_SetConfig(component_handle_,
+ OMX_IndexConfigCommonMirror, &mirror_config);
+ RETURN_ON_OMX_FAILURE(result, "Failed to set mirror", PLATFORM_FAILURE,);
}
BeginTransitionToState(OMX_StateExecuting);
}
« 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