From ae84de4fd565c6efb2ffdea7c97a47697d50845f Mon Sep 17 00:00:00 2001 From: "scherkus@chromium.org" Date: Wed, 25 Nov 2009 00:24:01 +0000 Subject: 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 --- media/omx/omx_video_decoder.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'media/omx/omx_video_decoder.cc') diff --git a/media/omx/omx_video_decoder.cc b/media/omx/omx_video_decoder.cc index b5857ed..cdf0d5d 100644 --- a/media/omx/omx_video_decoder.cc +++ b/media/omx/omx_video_decoder.cc @@ -271,7 +271,6 @@ void OmxVideoDecoder::Transition_EmptyToLoaded() { DCHECK_EQ(message_loop_, MessageLoop::current()); DCHECK_EQ(kEmpty, GetState()); - const char* component; OMX_CALLBACKTYPE callback = { &EventHandler, &EmptyBufferCallback, &FillBufferCallback }; @@ -288,9 +287,10 @@ void OmxVideoDecoder::Transition_EmptyToLoaded() { // 2. Get the handle to the component. After OMX_GetHandle(), // the component is in loaded state. // TODO(hclam): We should have a list of componant names instead. - component = component_; - omxresult = OMX_GetHandle((OMX_HANDLETYPE*)(&decoder_handle_), - (OMX_STRING)component, this, &callback); + OMX_STRING component = const_cast(component_); + OMX_HANDLETYPE handle = reinterpret_cast(decoder_handle_); + omxresult = OMX_GetHandle(&handle, component, this, &callback); + decoder_handle_ = reinterpret_cast(handle); if (omxresult != OMX_ErrorNone) { LOG(ERROR) << "Failed to Load the component: " << component; StateTransitionTask(kError); -- cgit v1.1