Kevin K
Kevin K

Reputation: 589

Android: Passing Java surface to native

I am working on hardware decoder which displays the decoded frames on a native window using the libstagefright.so.
When I tried to create the jni interface for the native functions for passing the surface(from SurfaceView) using "javac" command, I get the following error

 \custom_decoder.java:3: error: package android.view does not exist
 import android.view.Surface;
 error: cannot find symbol
 symbol: class Surface

What should I do to avoid this error?

UPDATE :

As per suggestion of Alex barker I tried the following but the same result

D:\android_workspace\2014\6June\ofi_vc_OMX_codec_test\src>javac -cp D:\Android_datas\android-sdk_r20.0.3-windows\android-sdk-windows ofi\ofi_vc_omx_codec_test\custom_decoder.java  
:3: error: package android.view does not exist
import android.view.Surface;
                   ^
ofi\ofi_vc_omx_codec_test\custom_decoder.java:15  
: error: cannot find symbol private native int set_display_surface(Surface disp_surface);
                                                                   ^
symbol:   class Surface  
location: class custom_decoder

Upvotes: 0

Views: 1559

Answers (1)

Alex Barker
Alex Barker

Reputation: 4400

Based on the information you provided, you have a simple classpath issue. Add the -cp flag to your javac command and pass it the SDK location.

Upvotes: 1

Related Questions