Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 73: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 74: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 75: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 76: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 77: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /bbc_download.php on line 78: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
package com.example; import java.io.IOException; import android.app.Activity; import android.graphics.PixelFormat; import android.media.MediaRecorder; import android.os.Bundle; import android.util.Log; import android.view.KeyEvent; import android.view.SurfaceHolder; import android.view.SurfaceView; public class CamcorderActivity extends Activity implements SurfaceHolder.Callback { private MediaRecorder recorder; private SurfaceView surfaceView; private SurfaceHolder surfaceHolder; private boolean recording = false; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // configure the surface getWindow().setFormat(PixelFormat.TRANSLUCENT); setContentView(R.layout.main); surfaceView = (SurfaceView) findViewById(R.id.camcordersurface); surfaceHolder = surfaceView.getHolder(); surfaceHolder.addCallback(this); surfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); configureRecorder(); } private void configureRecorder() { // configure media recorder recorder = new MediaRecorder(); recorder.setAudioSource(MediaRecorder.AudioSource.MIC); recorder.setVideoSource(MediaRecorder.VideoSource.DEFAULT); recorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4); recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB); recorder.setVideoEncoder(MediaRecorder.VideoEncoder.MPEG_4_SP); } private void stopRecorder() { try { if (recorder == null) { return; } recorder.stop(); recorder.reset(); recorder.release(); recording = false; recorder = null; } finally { if (recorder != null) { recorder.release(); } } } private void startRecorder() { recorder.start(); recording = true; } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER) { // if not recording then start if (!recording) { startRecorder(); } else { // if already recording then stop stopRecorder(); finish(); } return true; } return super.onKeyDown(keyCode, event); } @Override public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { // do nothing } @Override public void surfaceCreated(SurfaceHolder holder) { recorder.setOutputFile("/sdcard/test" + System.currentTimeMillis() + ".mp4"); recorder.setPreviewDisplay(holder.getSurface()); try { recorder.prepare(); } catch (IOException e) { Log.e("error -- ", e.toString(), e); // TODO: // show error message } } @Override public void surfaceDestroyed(SurfaceHolder holder) { stopRecorder(); } }