我ParcelFileDescriptor从下面的链接中读到了.
http://developer.android.com/reference/android/os/ParcelFileDescriptor.html
但我从中得不到任何想法.它是什么?它能做什么?
有人能解释一下吗?
这是我的代码,但当我启动媒体播放器时,它只有声音出来,表面没有任何显示.为什么?
我不知道这个.你有一些代码可以帮我学习吗?
videoV = (SurfaceView) findViewById(R.id.SurfaceView1);
sh = videoV.getHolder();
File path = Environment.getExternalStorageDirectory();
File file = new File(path, "sample2.mp4");
sh.addCallback(this);
mp = new MediaPlayer();
mp.setDataSource(file.getAbsolutePath());
mp.setDisplay(sh);
mp.prepare();
mp.start();
Run Code Online (Sandbox Code Playgroud)