summaryrefslogtreecommitdiffstats
path: root/media/tools
diff options
context:
space:
mode:
authorhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-02 20:50:56 +0000
committerhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-02 20:50:56 +0000
commit2ac1e7ca438583c681cbb686122f3ec69fa1d5ff (patch)
tree500afab56a65e9f61e311ee42c5e1e969cf5915a /media/tools
parentde945c861f68df1f16d58b0570332976fed57f7d (diff)
downloadchromium_src-2ac1e7ca438583c681cbb686122f3ec69fa1d5ff.zip
chromium_src-2ac1e7ca438583c681cbb686122f3ec69fa1d5ff.tar.gz
chromium_src-2ac1e7ca438583c681cbb686122f3ec69fa1d5ff.tar.bz2
Generate stubs for OpenMAX IL
Generate stubs for OpenMAX IL so we don't need a real OpenMAX library for building. The actual library is loaded during runtime. TEST=Build is green TEST=Running omx_test works on hardware with OpenMAX support Review URL: http://codereview.chromium.org/661135 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40418 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/tools')
-rw-r--r--media/tools/omx_test/omx_test.cc6
-rw-r--r--media/tools/player_x11/player_x11.cc8
2 files changed, 14 insertions, 0 deletions
diff --git a/media/tools/omx_test/omx_test.cc b/media/tools/omx_test/omx_test.cc
index 428bacc..e90f150 100644
--- a/media/tools/omx_test/omx_test.cc
+++ b/media/tools/omx_test/omx_test.cc
@@ -320,6 +320,12 @@ int main(int argc, char** argv) {
loop_count = 1;
DCHECK_GE(loop_count, 1);
+ // Initialize OpenMAX.
+ if (!media::InitializeOpenMaxLibrary(FilePath())) {
+ LOG(ERROR) << "Unable to initialize OpenMAX library.";
+ return false;
+ }
+
// If FFmpeg should be used for demuxing load the library here and do
// the initialization.
if (use_ffmpeg && !InitFFmpeg()) {
diff --git a/media/tools/player_x11/player_x11.cc b/media/tools/player_x11/player_x11.cc
index 41207fd..24ba556 100644
--- a/media/tools/player_x11/player_x11.cc
+++ b/media/tools/player_x11/player_x11.cc
@@ -64,6 +64,14 @@ bool InitX11() {
bool InitPipeline(MessageLoop* message_loop,
const char* filename, bool enable_audio,
scoped_refptr<media::PipelineImpl>* pipeline) {
+ // Initialize OpenMAX.
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableOpenMax) &&
+ !media::InitializeOpenMaxLibrary(FilePath())) {
+ std::cout << "Unable to initialize OpenMAX library."<< std::endl;
+ return false;
+ }
+
// Load media libraries.
if (!media::InitializeMediaLibrary(FilePath())) {
std::cout << "Unable to initialize the media library." << std::endl;