android.media
Class MediaRecorder

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

public class MediaRecorder
extends 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 setAudioChannels(int numChannels)
           
 void setAudioEncoder(int audio_encoder)
           
 void setAudioEncodingBitRate(int bitRate)
           
 void setAudioSamplingRate(int samplingRate)
           
 void setAudioSource(int audio_source)
           
 void setAuxiliaryOutputFile(FileDescriptor fd)
           
 void setAuxiliaryOutputFile(String path)
           
 void setCamera(Camera c)
           
 void setCaptureRate(double fps)
           
 void setLocation(float latitude, float longitude)
           
 void setMaxDuration(int max_duration_ms)
           
 void setMaxFileSize(long max_filesize_bytes)
           
 void setOnErrorListener(MediaRecorder.OnErrorListener l)
           
 void setOnInfoListener(MediaRecorder.OnInfoListener listener)
           
 void setOrientationHint(int degrees)
           
 void setOutputFile(FileDescriptor fd)
           
 void setOutputFile(String path)
           
 void setOutputFormat(int output_format)
           
 void setPreviewDisplay(Surface sv)
           
 void setProfile(CamcorderProfile profile)
           
 void setVideoEncoder(int video_encoder)
           
 void setVideoEncodingBitRate(int bitRate)
           
 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 IllegalStateException
Throws:
IllegalStateException

getAudioSourceMax

public static final int getAudioSourceMax()

setVideoSource

public void setVideoSource(int video_source)
                    throws IllegalStateException
Throws:
IllegalStateException

setProfile

public void setProfile(CamcorderProfile profile)

setCaptureRate

public void setCaptureRate(double fps)

setOrientationHint

public void setOrientationHint(int degrees)

setLocation

public void setLocation(float latitude,
                        float longitude)

setOutputFormat

public void setOutputFormat(int output_format)
                     throws IllegalStateException
Throws:
IllegalStateException

setVideoSize

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

setVideoFrameRate

public void setVideoFrameRate(int rate)
                       throws IllegalStateException
Throws:
IllegalStateException

setMaxDuration

public void setMaxDuration(int max_duration_ms)
                    throws IllegalArgumentException
Throws:
IllegalArgumentException

setMaxFileSize

public void setMaxFileSize(long max_filesize_bytes)
                    throws IllegalArgumentException
Throws:
IllegalArgumentException

setAudioEncoder

public void setAudioEncoder(int audio_encoder)
                     throws IllegalStateException
Throws:
IllegalStateException

setVideoEncoder

public void setVideoEncoder(int video_encoder)
                     throws IllegalStateException
Throws:
IllegalStateException

setAudioSamplingRate

public void setAudioSamplingRate(int samplingRate)

setAudioChannels

public void setAudioChannels(int numChannels)

setAudioEncodingBitRate

public void setAudioEncodingBitRate(int bitRate)

setVideoEncodingBitRate

public void setVideoEncodingBitRate(int bitRate)

setAuxiliaryOutputFile

public void setAuxiliaryOutputFile(FileDescriptor fd)

setAuxiliaryOutputFile

public void setAuxiliaryOutputFile(String path)

setOutputFile

public void setOutputFile(FileDescriptor fd)
                   throws IllegalStateException
Throws:
IllegalStateException

setOutputFile

public void setOutputFile(String path)
                   throws IllegalStateException
Throws:
IllegalStateException

prepare

public void prepare()
             throws IllegalStateException,
                    IOException
Throws:
IllegalStateException
IOException

start

public void start()
           throws IllegalStateException
Throws:
IllegalStateException

stop

public void stop()
          throws IllegalStateException
Throws:
IllegalStateException

reset

public void reset()

getMaxAmplitude

public int getMaxAmplitude()
                    throws IllegalStateException
Throws:
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 Object


Copyright © 2008-2012. All Rights Reserved.