开发者

only sound is being generated not video Why?

public void surfaceCreated(SurfaceHolder holder) {

    try {

        mp.setDisplay(holder);
        mp.setDataSource("/sdcard/family.3gp");
        Toast.makeText(this, "Surface created", Toast.LENGTH_LONG).show();
        mp.prepare();
        mp.setL开发者_如何转开发ooping(true);
        mp.start();

    } catch (IllegalArgumentException e1) {
        Toast.makeText(this, "Surface created 1", Toast.LENGTH_LONG).show();
        e1.printStackTrace();

Her i'm only getting the sound and i'm unable to get the video .... Please help me out...


You are probably using the emulator. The emulator will not have good enough performance to play back most videos. Please test video applications using an Android device.

Also, never hardwire /sdcard, as it is wrong for most Android devices. Use Environment.getExternalStorageDirectory() to get the root of external storage.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜