android.media
Class MediaRecorder

java.lang.Object
  extended by android.media.MediaRecorder

public class MediaRecorder
extends java.lang.Object


Nested Class Summary
 class MediaRecorder.AudioEncoder
           
 class MediaRecorder.AudioSource
           
static interface MediaRecorder.OnErrorListener
           
static interface MediaRecorder.OnInfoListener
           
 class MediaRecorder.OutputFormat
           
 class MediaRecorder.VideoEncoder
           
 class MediaRecorder.VideoSource
           
 
Field Summary
static int MEDIA_RECORDER_ERROR_UNKNOWN
           
static int MEDIA_RECORDER_INFO_MAX_DURATION_REACHED
           
static int MEDIA_RECORDER_INFO_MAX_FILESIZE_REACHED
           
static int MEDIA_RECORDER_INFO_UNKNOWN
           
 
Constructor Summary
MediaRecorder()
           
 
Method Summary
protected  void finalize()
           
static int getAudioSourceMax()
           
 int getMaxAmplitude()
           
 void prepare()
           
 void release()
           
 void reset()
           
 void setAudioEncoder(int audio_encoder)
           
 void setAudioSource(int audio_source)
           
 void setCamera(Camera c)
           
 void setMaxDuration(int max_duration_ms)
           
 void setMaxFileSize(long max_filesize_bytes)
           
 void setOnErrorListener(MediaRecorder.OnErrorListener l)
           
 void setOnInfoListener(MediaRecorder.OnInfoListener listener)
           
 void setOutputFile(java.io.FileDescriptor fd)
           
 void setOutputFile(java.lang.String path)
           
 void setOutputFormat(int output_format)
           
 void setPreviewDisplay(Surface sv)
           
 void setVideoEncoder(int video_encoder)
           
 void setVideoFrameRate(int rate)
           
 void setVideoSize(int width, int height)
           
 void setVideoSource(int video_source)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MEDIA_RECORDER_ERROR_UNKNOWN

public static final int MEDIA_RECORDER_ERROR_UNKNOWN
See Also:
Constant Field Values

MEDIA_RECORDER_INFO_UNKNOWN

public static final int MEDIA_RECORDER_INFO_UNKNOWN
See Also:
Constant Field Values

MEDIA_RECORDER_INFO_MAX_DURATION_REACHED

public static final int MEDIA_RECORDER_INFO_MAX_DURATION_REACHED
See Also:
Constant Field Values

MEDIA_RECORDER_INFO_MAX_FILESIZE_REACHED

public static final int MEDIA_RECORDER_INFO_MAX_FILESIZE_REACHED
See Also:
Constant Field Values
Constructor Detail

MediaRecorder

public MediaRecorder()
Method Detail

setCamera

public void setCamera(Camera c)

setPreviewDisplay

public void setPreviewDisplay(Surface sv)

setAudioSource

public void setAudioSource(int audio_source)
                    throws java.lang.IllegalStateException
Throws:
java.lang.IllegalStateException

getAudioSourceMax

public static final int getAudioSourceMax()

setVideoSource

public void setVideoSource(int video_source)
                    throws java.lang.IllegalStateException
Throws:
java.lang.IllegalStateException

setOutputFormat

public void setOutputFormat(int output_format)
                     throws java.lang.IllegalStateException
Throws:
java.lang.IllegalStateException

setVideoSize

public void setVideoSize(int width,
                         int height)
                  throws java.lang.IllegalStateException
Throws:
java.lang.IllegalStateException

setVideoFrameRate

public void setVideoFrameRate(int rate)
                       throws java.lang.IllegalStateException
Throws:
java.lang.IllegalStateException

setMaxDuration

public void setMaxDuration(int max_duration_ms)
                    throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

setMaxFileSize

public void setMaxFileSize(long max_filesize_bytes)
                    throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

setAudioEncoder

public void setAudioEncoder(int audio_encoder)
                     throws java.lang.IllegalStateException
Throws:
java.lang.IllegalStateException

setVideoEncoder

public void setVideoEncoder(int video_encoder)
                     throws java.lang.IllegalStateException
Throws:
java.lang.IllegalStateException

setOutputFile

public void setOutputFile(java.io.FileDescriptor fd)
                   throws java.lang.IllegalStateException
Throws:
java.lang.IllegalStateException

setOutputFile

public void setOutputFile(java.lang.String path)
                   throws java.lang.IllegalStateException
Throws:
java.lang.IllegalStateException

prepare

public void prepare()
             throws java.lang.IllegalStateException,
                    java.io.IOException
Throws:
java.lang.IllegalStateException
java.io.IOException

start

public void start()
           throws java.lang.IllegalStateException
Throws:
java.lang.IllegalStateException

stop

public void stop()
          throws java.lang.IllegalStateException
Throws:
java.lang.IllegalStateException

reset

public void reset()

getMaxAmplitude

public int getMaxAmplitude()
                    throws java.lang.IllegalStateException
Throws:
java.lang.IllegalStateException

setOnErrorListener

public void setOnErrorListener(MediaRecorder.OnErrorListener l)

setOnInfoListener

public void setOnInfoListener(MediaRecorder.OnInfoListener listener)

release

public void release()

finalize

protected void finalize()
Overrides:
finalize in class java.lang.Object


Copyright © 2008-2010. All Rights Reserved.