android菜鸟求助
下面的这段程序为什么播放不出来图像?
android端代码接口函数声明的类
public class testprogress {

public Bitmap mBitmap;

static {
System.loadLibrary("jnigraphics");
System.loadLibrary("log");
System.loadLibrary("ffmpeg");
System.loadLibrary("hello-jni");
}

public native int AdDecBef(int with, int height, char[]path);//初始化解码器
public native int AdDecFra(Bitmap bitmap);//jni解码端对BITMAP图的数据填充
        public native int AdDecFin();//释放空间 public static void main(){
// testprogress pt=new testprogress();
// pt.stringFromJNI();
}
}Activity 处理过程:
public class testjni extends Activity {
    /** Called when the activity is first created. */
private static final String TAG = "lifeCycle";
private Button plybtn = null;
public testprogress tp = new testprogress();    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        tp.mBitmap = Bitmap.createBitmap(176, 144, Bitmap.Config.RGB_565);//rgb fomat 为16位图
           
        plybtn = (Button) this.findViewById(R.id.play);
        plybtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
int ret = 0;
int fnum = 0;
ret = tp.AdDecBef(176, 144, null);
if(ret < 0){
Log.i(TAG,"Avinition decoder fail!");
tp.AdDecFin();
}else{
while(true){
ret = tp.AdDecFra(tp.mBitmap);

if(ret == -1){
Log.i(TAG,"Av decoder finish!");
tp.AdDecFin();
break;
}else{
fnum = ret; //记录帧的总数
       ImageView i=(ImageView)findViewById(R.id.fram);
i.setImageBitmap(tp.mBitmap);

i.setVisibility(View.VISIBLE);
}
}

}
}
});      
    }
    
}
标红的地方为一帧一帧图像的显示过程  一片空白  什么也不显示。  用写文件的方式在JNI中抓取处理得到的RGB数据都是正常的。JNI端主要代码如下:int android_decoder_fram(JNIEnv*env ,jobject bitmap){
int inlen = 0;
int outlen = 0;
int fr_end = 0;
int ret = 0;
AndroidBitmapInfo  info;
void *pixels = g_pixels; if((ret = AndroidBitmap_getInfo(env,bitmap, &info)) < 0){
                LOGE("AndroidBitmap_getInfo false");
                return -1; 
} if((ret = AndroidBitmap_lockPixels(env,bitmap, &pixels)) < 0){
                LOGE("AndroidBitmap_lockPixels false");
                return -1;
} LOGI("color image :: width is %d; height is %d; stride is %d; format is %d; pixelsaddris %d",  
     info.width,info.height,info.stride,info.format,& (*pixels)); if(info.format != ANDROID_BITMAP_FORMAT_RGB_565){
LOGE("Bitmap format is not GBA_565 !");  
return -1;
}

if(g_cklth+4 >= g_filelth){
return -1;  //end of decode
}

while(!feof(g_inpf) && fr_end == 0){
inlen = getNextNal(g_srcbuf);
g_cklth += inlen;
outlen = avcodec_decode(g_srcbuf, inlen, g_disbuf);
if(outlen > 0){

ConvertYUVtoRGB(g_disbuf,g_ds_w,g_ds_h);
RGBto16bit565();
// fwrite(bufRGB565,1,176*144*2,g_rgbpf);
// fill_bitmap(&info, pixels);
fill_bitmap_test(pixels);
fwrite(pixels,1,176*144*3,g_rgbpf);
fr_end = 1;
g_framnam++;
break;
}
#endif
}
AndroidBitmap_unlockPixels(env, bitmap);
return g_framnam;
} jint Java_android_testjni_testprogress_AdDecFra
  (JNIEnv *env, jobject this,jobject bitmap){
return android_decoder_fram(env,bitmap);
 }求教各位帮帮忙  指点下。  另外在网上看到  jni层 获取surface来显示视频  这样的库和头
static android::Surface::SurfaceInfo info;
static android::Region dirtyRegion;
在什么地方?看了别人的调用方法 感觉都说的模棱两口,还是不太清楚。这里哪位高人顺便介绍下!小生刚接触ANDROID才两天。