MediaRecorder Vs. android.media.action intent

All your problems with Audio, Video and Images.

MediaRecorder Vs. android.media.action intent

Postby oculuss » Thu Dec 30, 2010 10:14 pm

Hello there,

I have been working on a recording project for fun and am seeing a few discrepancies. First, all of the examples for a complete MediaRecorder video recorder implementation have been either not working, or explained terribly. If someone could point me in the direction of a good and WORKING example (with the surface view code working as well) it would be greatly appreciated. Secondly, I have my app working using a android.media.action.VIDEO_CAPTURE intent. I see that rarely mentioned on here and am curious about what the advantages or disadvantages of using the camera may be with this method vs. the MediaRecorder method. My code is similar to the following, for those who are unclear what I am talking about.

Code: Select all
vidId = UUID.randomUUID().toString();
      
Intent intent = new Intent( "android.media.action.VIDEO_CAPTURE" );
File vidToBeCaptured = new File( videoStorageDirectory, vidId + ".3gp" );
if( vidToBeCaptured.exists() )
{
   vidToBeCaptured.delete();
}
vidUri = Uri.fromFile(vidToBeCaptured);
      
intent.putExtra(MediaStore.EXTRA_OUTPUT, vidUri);
startActivityForResult(intent, TAKE_VIDEO_REQUEST);
oculuss
Freshman
Freshman
 
Posts: 3
Joined: Sun Dec 05, 2010 11:25 pm
Location: Michigan

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 9 guests