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)
import java.io.File; import java.io.IOException; import android.content.Context; import android.media.MediaRecorder; import android.os.Environment; import android.util.Log; import android.view.SurfaceHolder; import android.view.SurfaceView; import android.widget.Toast; public class VideoRecorder extends SurfaceView{ final String TAG = "[ - VideoRecorder - ]:"; MediaRecorder recorder; public boolean isRecording; public String latestVideoPath; public String path = "myVideo"; public SurfaceHolder previewHolder; public int counter = 0; Context ctx; /** * Creates a new audio recording at the given path (relative to root of SD card). */ public VideoRecorder(Context ctx) { super(ctx); this.ctx = ctx; this.path = sanitizePath(path); isRecording = false; previewHolder = this.getHolder(); previewHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); previewHolder.addCallback(surfaceHolderListener); recorder = new MediaRecorder(); } private String sanitizePath(String path) { if (!path.startsWith("/")) { path = "/" + path; } if (!path.contains(".")) { path += ".3gp"; } return Environment.getExternalStorageDirectory().getAbsolutePath() + path; } /** * Starts a new recording. */ public void start() throws IOException { String state = android.os.Environment.getExternalStorageState(); if(!state.equals(android.os.Environment.MEDIA_MOUNTED)) { Toast.makeText(ctx, "Error: SD card is not mounted - cannot record video.", Toast.LENGTH_SHORT).show(); throw new IOException("SD Card is not mounted. It is " + state + "."); } // make sure the directory we plan to store the recording in exists File directory = new File(path).getParentFile(); if (!directory.exists() && !directory.mkdirs()) { throw new IOException("Path to file could not be created."); } recorder.setPreviewDisplay(previewHolder.getSurface()); recorder.setVideoSource(MediaRecorder.VideoSource.DEFAULT); recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); recorder.setVideoEncoder(MediaRecorder.VideoEncoder.DEFAULT); recorder.setVideoSize(640, 480); latestVideoPath = path + counter++; recorder.setOutputFile(latestVideoPath); recorder.prepare(); recorder.start(); Log.v(TAG, "starting a video recording..."); isRecording = true; } /** * Stops a recording that has been previously started. */ public void stop() throws IOException { isRecording = false; recorder.stop(); Log.v(TAG, "stopping video recording..."); //recorder.release(); } private SurfaceHolder.Callback surfaceHolderListener = new SurfaceHolder.Callback() { public void surfaceCreated(SurfaceHolder holder) { try { } catch (Exception t) { t.printStackTrace(); }; } public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { } public void surfaceDestroyed(SurfaceHolder arg0) { Log.v(TAG, "Surface Destroyed..."); } }; }