setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);

 

위 타입의 영상 스트리밍 SurfaceView 가 있는데요

 

 

            SurfaceView sv = (SurfaceView)findViewById(R.id.surface);
            Bitmap blank = Bitmap.createBitmap(800, 480, Bitmap.Config.ARGB_8888);
            Canvas canvas = new Canvas(blank);
            sv.draw(canvas);
            capture(blank);
  public void capture(Bitmap source) {
      try {
      Matrix mat = new Matrix();
      mat.postRotate(90);
      Bitmap bitmap = Bitmap.createBitmap(source, 0, 0, source.getWidth(), source.getHeight(), mat, true);
      File file = new File(Environment.getExternalStorageDirectory() + "/test.jpg"); 
      Log.d("jpegCallback-----------", file.getAbsolutePath() + " " + file.isFile()); 
      FileOutputStream fos;
      fos = new FileOutputStream(file);
      bitmap.compress(CompressFormat.JPEG, 70, fos);
      fos.close(); 
     } catch (IOException e) {
        e.printStackTrace();
     } 
 }

위와같은 소스인데요, 비슷한 질문글은 많은데 제대로 답변이 달린 글이 없네요..

 

현재 뿌려주고있는 SurfaceView 화면을 Bitmap으로 저장하는건데

 

제대로 가져오지못하고 까만그림만 저장되네요

 

혹시 아시는분 있으면 조언부탁드립니다