https://github.com/xfirefly/AD_Client/blob/master/app/src/main/java/com/bluberry/adclient/RTKSourceInActivity.javaprotected byte[] doInBackground(Void... para) {
byte[] data = new byte[0];
/* if (m_HDMIRxPlayer == null || m_HDMIRxPlayer.isPlaying() == false)
return null;
byte[] data = m_HDMIRxPlayer.capture(type, x, y, width, height, outWidth, outHeight);*/
Log.d(TAG, "datadata " + data.length);
Bitmap one = Bitmap.createBitmap(outWidth, outHeight, Bitmap.Config.ARGB_8888);
// Copy Bitmap to buffer
ByteBuffer buffer = ByteBuffer.wrap(data);
one.copyPixelsFromBuffer(buffer);
//Canvas canvas = new Canvas(mutableBitmap); // now it should work ok
FileOutputStream out = null;
try {
out = new FileOutputStream(Environment.getExternalStorageDirectory().getAbsolutePath() + "/" + nowTime() + ".png");
one.compress(Bitmap.CompressFormat.JPEG, 100, out); // bmp is your Bitmap instance
// PNG is a lossless format, the compression factor (100) is ignored
one.recycle();
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (out != null) {
out.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
return data;
这时在干嘛??