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 /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

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 /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - Video recording

Video recording

All your problems with Audio, Video and Images.

Video recording

Postby cassiere82 » Thu Aug 06, 2009 10:51 am

Hi all,

I'm trying to develop an application which records audio and video on a file. As far as I use only audio recording, it is good. When I try to add the video part, I get an error on the prepare() method.

Below you can find an excerpt of the code...

private void setStreaming() throws IOException {
// Creating a MediaRecorder object
mr = new MediaRecorder();
mr.setCamera(Camera.open());
// Configuring audio/video source (MIC and camera)
mr.setAudioSource(MediaRecorder.AudioSource.MIC);
//mr.setCamera(Camera.open());
mr.setVideoSource(MediaRecorder.VideoSource.DEFAULT);

// Configuring the output format
mr.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
// Configuring audio/video codecs
mr.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
mr.setVideoEncoder(MediaRecorder.VideoEncoder.MPEG_4_SP);
// Setting the output file
if (audiofile == null) {
File sampleDir = Environment.getExternalStorageDirectory();
try
{
audiofile = File.createTempFile("moca", ".mp4", sampleDir);
}
catch (IOException e)
{
Log.e("ERROR","sdcard access error");
return;
}
}
mr.setOutputFile(audiofile.getAbsolutePath());
// the recorder is ready to register

mr.prepare();
mr.start();
}


In the first version, I tried it without the mr.setCamera(Camera.open()); instruction, but then I got an error in the logcat

E/CameraInput( 554): Camera is not available

then I tried to add the instruction, but I got another error

D/CameraService( 554): Connect E from ICameraClient 0x2d198
D/CameraService( 554): new client (0x2d198) attempting to connect - rejected


Any suggestions??
Thks
Bye
cassiere82
Freshman
Freshman
 
Posts: 3
Joined: Tue Aug 04, 2009 3:20 pm

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 7 guests