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

Unified Diff: media/omx/omx_video_decoder.cc

Issue 431041: Implement method stubs for OpenMAX IL instead of relying on -lOmxCore. (Closed)
Patch Set: Created 11 years, 1 month 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 | « media/omx/omx_test.gyp ('k') | third_party/openmax/omx_stub.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/omx/omx_video_decoder.cc
diff --git a/media/omx/omx_video_decoder.cc b/media/omx/omx_video_decoder.cc
index b5857eddef77de164e785d5d17a8be85df6570dc..cdf0d5db655a3731605d164416368c27411b3703 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<OMX_STRING>(component_);
+ OMX_HANDLETYPE handle = reinterpret_cast<OMX_HANDLETYPE>(decoder_handle_);
+ omxresult = OMX_GetHandle(&handle, component, this, &callback);
+ decoder_handle_ = reinterpret_cast<OMX_COMPONENTTYPE*>(handle);
if (omxresult != OMX_ErrorNone) {
LOG(ERROR) << "Failed to Load the component: " << component;
StateTransitionTask(kError);
« no previous file with comments | « media/omx/omx_test.gyp ('k') | third_party/openmax/omx_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698