1、录音

MeidaRecorder:需要许可!

(1)、需要录音的授权(许可):<user-permission android:name="android.permission.RECORD_AUDIO"/>

(2)、需要写SD的授权(许可):<user-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

2、播放视频

(1)、得到surfaceView控件,surfaceView = (SurfaceView)findViewById(R.id.surfaceView1);

(2)、得到surfaceView控件对应的surfaceHolder

          surfaceView控件不能直接控制使用,必须通过surfaceHolder来控制。

          线程间通信使用的holder机制。所以不能直接使用surfaceView。surfaceView是另外一个线程。线程间通信,进程间通信(binder)。必要的话,设置SURFACE_TYPE_PUSH_BUFFERS

surfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);

posted on 2013-01-21 11:14  Tiny339  阅读(562)  评论(0编辑  收藏  举报