0

We are getting error in converting from IBinder to ISurface.

The code used to convert is,

interface_cast<ISurface>(data.readStrongBinder());

Error is, "undefined reference toandroid::ISurface::asInterface(android::sp const&)'`"

Kindly help. ABS

ABS
  • 141
  • 3

1 Answers1

3

This is old, but maybe will help someone. I had similar issue, but with converting this way:

interface_cast<IAudioFlinger>(binder);

Solution was to include libmedia in Android.mk file.

LOCAL_SHARED_LIBRARIES := \ 
    libmedia

In your case, it should be some library from surface.

Janis Coders
  • 157
  • 1
  • 6