在我的应用程序中,我必须将bytearray(即.h264格式)解码为视频和来自实时漫游的字节数组。代码如下:
static final int VIDEO_BUF_SIZE = 100000;
static final int FRAME_INFO_SIZE = 16;
byte[] frameInfo = new byte[FRAME_INFO_SIZE];
byte[] videoBuffer = new byte[VIDEO_BUF_SIZE];
File SDFile = android.os.Environment.getExternalStorageDirectory();
File destDir = new File(SDFile.getAbsolutePath() + "/test.h264");
//avRecvFrameData returns the length of the frame and stores it in ret.
int ret = av.avRecvFrameData(avIndex, videoBuffer,
VIDEO_BUF_SIZE, frameInfo, FRAME_INFO_SIZE,
frameNumber);
fos=new FileOutputStream(destDir,true);
fos.write(videoBuffer, 0, ret);
fos.close();
那我现在该怎么办?
感谢All。