These are internal APIs and change with every release, so the code you
found on the web is probably for a different device/release.
I recommend avoiding these APIs.   See also "Using IOMX from jni to
gain access to hardware codecs" at
http://groups.google.com/group/android-platform/browse_thread/thread/e74cab1074d01a7a

On Apr 16, 2:35 am, baisy <[email protected]> wrote:
> hi,all
> i want to get OMX interface on stagefright, but failed.(on samsung tab)
>
> the code i get from web:
>
> sp<IOMX> mOmx;
>
> sp<IServiceManager> sm = defaultServiceManager();
>
> sp<IBinder> binder = sm->getService(String16("media.player"));
>
> sp<IMediaPlayerService> service =
> interface_cast<IMediaPlayerService>(binder);
>
> CHECK(service.get() != NULL);
>
> mOmx = service->getOMX();
>
> CHECK(omx.get() != NULL);
>
> the result:
>
> sm->getService(String16("media.player"))  -------> success
>
> service.get()                                          -------> success
>
> service->getOMX()                                  -------> failed
>
> anyone could help me?
>
> thanks

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting

Reply via email to