summaryrefslogtreecommitdiffstats
path: root/third_party/openmax
diff options
context:
space:
mode:
authorscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-25 00:24:01 +0000
committerscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-25 00:24:01 +0000
commitae84de4fd565c6efb2ffdea7c97a47697d50845f (patch)
tree77050fca7b5a2e7715939540151fad40895406cb /third_party/openmax
parent3c4e3015463fd407ccd932e5da17e3c4bc8e3c5c (diff)
downloadchromium_src-ae84de4fd565c6efb2ffdea7c97a47697d50845f.zip
chromium_src-ae84de4fd565c6efb2ffdea7c97a47697d50845f.tar.gz
chromium_src-ae84de4fd565c6efb2ffdea7c97a47697d50845f.tar.bz2
Implement method stubs for OpenMAX IL instead of relying on -lOmxCore.
You can switch to using -lOmxCore by setting the gyp variable use_system_openmax=1. Also fixed type-punning warnings in omx_video_decoder.cc BUG=28663 TEST=building omx_test should have no linker errors Review URL: http://codereview.chromium.org/431041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33012 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/openmax')
-rw-r--r--third_party/openmax/omx_stub.cc36
-rw-r--r--third_party/openmax/openmax.gyp52
2 files changed, 79 insertions, 9 deletions
diff --git a/third_party/openmax/omx_stub.cc b/third_party/openmax/omx_stub.cc
new file mode 100644
index 0000000..a2a7526
--- /dev/null
+++ b/third_party/openmax/omx_stub.cc
@@ -0,0 +1,36 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Satisfies linker dependencies for targets requiring an OpenMAX Core library.
+// Not intended in any way to be functional!!
+
+#include <OMX_Core.h>
+
+#define NOTIMPLEMENTED_POLICY 3 // Fail at runtime via DCHECK.
+#include "base/logging.h"
+
+extern "C" {
+
+OMX_API OMX_ERRORTYPE OMX_Init() {
+ NOTIMPLEMENTED();
+ return OMX_ErrorNotImplemented;
+}
+
+OMX_API OMX_ERRORTYPE OMX_Deinit() {
+ NOTIMPLEMENTED();
+ return OMX_ErrorNotImplemented;
+}
+
+OMX_API OMX_ERRORTYPE OMX_GetHandle(OMX_HANDLETYPE*, OMX_STRING, OMX_PTR,
+ OMX_CALLBACKTYPE*) {
+ NOTIMPLEMENTED();
+ return OMX_ErrorNotImplemented;
+}
+
+OMX_API OMX_ERRORTYPE OMX_FreeHandle(OMX_HANDLETYPE) {
+ NOTIMPLEMENTED();
+ return OMX_ErrorNotImplemented;
+};
+
+} // extern "C"
diff --git a/third_party/openmax/openmax.gyp b/third_party/openmax/openmax.gyp
index aeca369..53929ba 100644
--- a/third_party/openmax/openmax.gyp
+++ b/third_party/openmax/openmax.gyp
@@ -3,11 +3,46 @@
# found in the LICENSE file.
{
+ 'variables': {
+ 'use_system_openmax%': 0,
+ },
+ 'target_defaults': {
+ 'conditions': [
+ ['use_system_openmax==0', {
+ 'type': '<(library)',
+ 'dependencies': [
+ '../../base/base.gyp:base',
+ ],
+ 'sources': [
+ 'omx_stub.cc',
+ ],
+ 'include_dirs': [
+ 'il',
+ ],
+ 'defines': [
+ '__OMX_EXPORTS',
+ ],
+ 'direct_dependent_settings': {
+ 'defines': [
+ '__OMX_EXPORTS',
+ ],
+ },
+ },{
+ 'type': 'none',
+ 'direct_dependent_settings': {
+ 'link_settings': {
+ 'libraries': [
+ '-lOmxCore',
+ ],
+ },
+ },
+ }],
+ ],
+ },
'targets': [
{
# OpenMAX IL level of API.
'target_name': 'il',
- 'type': 'none',
'sources': [
'il/OMX_Audio.h',
'il/OMX_Component.h',
@@ -24,14 +59,13 @@
'include_dirs': [
'il',
],
- 'link_settings': {
- 'libraries': [
- '-lOmxCore',
- # We need dl for dlopen() and friends.
- '-ldl',
- ],
- },
},
},
- ],
+ ],
}
+
+# Local Variables:
+# tab-width:2
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=2 shiftwidth=2: