Package org.robolectric.shadows
Class ShadowMediaRecorder
- java.lang.Object
-
- org.robolectric.shadows.ShadowMediaRecorder
-
@Implements(android.media.MediaRecorder.class) public class ShadowMediaRecorder extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static intSTATE_DATA_SOURCE_CONFIGUREDstatic intSTATE_ERRORstatic intSTATE_INITIALstatic intSTATE_INITIALIZEDstatic intSTATE_PREPAREDstatic intSTATE_RECORDINGstatic intSTATE_RELEASED
-
Constructor Summary
Constructors Constructor Description ShadowMediaRecorder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void__constructor__()protected static void__staticInitializer__()intgetAudioChannels()intgetAudioEncoder()intgetAudioEncodingBitRate()intgetAudioSamplingRate()intgetAudioSource()CameragetCamera()MediaRecorder.OnErrorListenergetErrorListener()MediaRecorder.OnInfoListenergetInfoListener()intgetMaxDuration()longgetMaxFileSize()intgetOutputFormat()StringgetOutputPath()SurfacegetPreviewDisplay()intgetState()protected SurfacegetSurface()intgetVideoEncoder()intgetVideoEncodingBitRate()intgetVideoFrameRate()intgetVideoHeight()intgetVideoSource()intgetVideoWidth()protected voidprepare()protected voidrelease()protected voidreset()protected voidsetAudioChannels(int numChannels)protected voidsetAudioEncoder(int audio_encoder)protected voidsetAudioEncodingBitRate(int bitRate)protected voidsetAudioSamplingRate(int samplingRate)protected voidsetAudioSource(int audio_source)protected voidsetCamera(Camera c)protected voidsetMaxDuration(int max_duration_ms)protected voidsetMaxFileSize(long max_filesize_bytes)protected voidsetOnErrorListener(MediaRecorder.OnErrorListener l)protected voidsetOnInfoListener(MediaRecorder.OnInfoListener listener)protected voidsetOutputFile(String path)protected voidsetOutputFormat(int output_format)protected voidsetPreviewDisplay(Surface sv)protected voidsetVideoEncoder(int video_encoder)protected voidsetVideoEncodingBitRate(int bitRate)protected voidsetVideoFrameRate(int rate)protected voidsetVideoSize(int width, int height)protected voidsetVideoSource(int video_source)protected voidstart()protected voidstop()
-
-
-
Field Detail
-
STATE_ERROR
public static final int STATE_ERROR
- See Also:
- Constant Field Values
-
STATE_INITIAL
public static final int STATE_INITIAL
- See Also:
- Constant Field Values
-
STATE_INITIALIZED
public static final int STATE_INITIALIZED
- See Also:
- Constant Field Values
-
STATE_DATA_SOURCE_CONFIGURED
public static final int STATE_DATA_SOURCE_CONFIGURED
- See Also:
- Constant Field Values
-
STATE_PREPARED
public static final int STATE_PREPARED
- See Also:
- Constant Field Values
-
STATE_RECORDING
public static final int STATE_RECORDING
- See Also:
- Constant Field Values
-
STATE_RELEASED
public static final int STATE_RELEASED
- See Also:
- Constant Field Values
-
-
Method Detail
-
__staticInitializer__
@Implementation protected static void __staticInitializer__()
-
__constructor__
@Implementation protected void __constructor__()
-
setAudioChannels
@Implementation protected void setAudioChannels(int numChannels)
-
setAudioEncoder
@Implementation protected void setAudioEncoder(int audio_encoder)
-
setAudioEncodingBitRate
@Implementation protected void setAudioEncodingBitRate(int bitRate)
-
setAudioSamplingRate
@Implementation protected void setAudioSamplingRate(int samplingRate)
-
setAudioSource
@Implementation protected void setAudioSource(int audio_source)
-
setCamera
@Implementation protected void setCamera(Camera c)
-
setMaxDuration
@Implementation protected void setMaxDuration(int max_duration_ms)
-
setMaxFileSize
@Implementation protected void setMaxFileSize(long max_filesize_bytes)
-
setOnErrorListener
@Implementation protected void setOnErrorListener(MediaRecorder.OnErrorListener l)
-
setOnInfoListener
@Implementation protected void setOnInfoListener(MediaRecorder.OnInfoListener listener)
-
setOutputFile
@Implementation protected void setOutputFile(String path)
-
setOutputFormat
@Implementation protected void setOutputFormat(int output_format)
-
setPreviewDisplay
@Implementation protected void setPreviewDisplay(Surface sv)
-
setVideoEncoder
@Implementation protected void setVideoEncoder(int video_encoder)
-
setVideoEncodingBitRate
@Implementation protected void setVideoEncodingBitRate(int bitRate)
-
setVideoFrameRate
@Implementation protected void setVideoFrameRate(int rate)
-
setVideoSize
@Implementation protected void setVideoSize(int width, int height)
-
setVideoSource
@Implementation protected void setVideoSource(int video_source)
-
prepare
@Implementation protected void prepare()
-
start
@Implementation protected void start()
-
stop
@Implementation protected void stop()
-
reset
@Implementation protected void reset()
-
release
@Implementation protected void release()
-
getSurface
@Implementation(minSdk=21) protected Surface getSurface()
-
getCamera
public Camera getCamera()
-
getAudioChannels
public int getAudioChannels()
-
getAudioEncoder
public int getAudioEncoder()
-
getAudioEncodingBitRate
public int getAudioEncodingBitRate()
-
getAudioSamplingRate
public int getAudioSamplingRate()
-
getAudioSource
public int getAudioSource()
-
getMaxDuration
public int getMaxDuration()
-
getMaxFileSize
public long getMaxFileSize()
-
getOutputPath
public String getOutputPath()
-
getOutputFormat
public int getOutputFormat()
-
getVideoEncoder
public int getVideoEncoder()
-
getVideoEncodingBitRate
public int getVideoEncodingBitRate()
-
getVideoFrameRate
public int getVideoFrameRate()
-
getVideoWidth
public int getVideoWidth()
-
getVideoHeight
public int getVideoHeight()
-
getVideoSource
public int getVideoSource()
-
getPreviewDisplay
public Surface getPreviewDisplay()
-
getErrorListener
public MediaRecorder.OnErrorListener getErrorListener()
-
getInfoListener
public MediaRecorder.OnInfoListener getInfoListener()
-
getState
public int getState()
-
-