com.googlecode.android_scripting.facade
Class MediaRecorderFacade
java.lang.Object
com.googlecode.android_scripting.jsonrpc.RpcReceiver
com.googlecode.android_scripting.facade.MediaRecorderFacade
public class MediaRecorderFacade
- extends RpcReceiver
A facade for recording media.
Guidance notes: Use e.g. '/sdcard/file.ext' for your media destination file. A file extension of
mpg will use the default settings for format and codec (often h263 which won't work with common
PC media players). A file extension of mp4 or 3gp will use the appropriate format with the (more
common) h264 codec. A video player such as QQPlayer (from the android market) plays both codecs
and uses the composition matrix (embedded in the video file) to correct for image rotation. Many
PC based media players ignore this matrix. Standard video sizes may be specified.
- Author:
- Felix Arends (felix.arends@gmail.com), Damon Kohler (damonkohler@gmail.com), John Karwatzki (jokar49@gmail.com)
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MediaRecorderFacade
public MediaRecorderFacade(FacadeManager manager)
recorderStartMicrophone
@Rpc(description="Records audio from the microphone and saves it to the given location.")
public void recorderStartMicrophone(@RpcParameter(name="targetPath")
java.lang.String targetPath)
throws java.io.IOException
- Throws:
java.io.IOException
recorderStartVideo
@Rpc(description="Records video from the camera and saves it to the given location. \nDuration specifies the maximum duration of the recording session. \nIf duration is 0 this method will return and the recording will only be stopped \nwhen recorderStop is called or when a scripts exits. \nOtherwise it will block for the time period equal to the duration argument.\nvideoSize: 0=160x120, 1=320x240, 2=352x288, 3=640x480, 4=800x480.")
public void recorderStartVideo(@RpcParameter(name="targetPath")
java.lang.String targetPath,
@RpcParameter(name="duration")@RpcDefault(value="0")
java.lang.Integer duration,
@RpcParameter(name="videoSize")@RpcDefault(value="1")
java.lang.Integer videoSize)
throws java.lang.Exception
- Throws:
java.lang.Exception
recorderCaptureVideo
@Rpc(description="Records video (and optionally audio) from the camera and saves it to the given location. \nDuration specifies the maximum duration of the recording session. \nIf duration is not provided this method will return immediately and the recording will only be stopped \nwhen recorderStop is called or when a scripts exits. \nOtherwise it will block for the time period equal to the duration argument.")
public void recorderCaptureVideo(@RpcParameter(name="targetPath")
java.lang.String targetPath,
@RpcParameter(name="duration")@RpcOptional
java.lang.Integer duration,
@RpcParameter(name="recordAudio")@RpcDefault(value="true")
java.lang.Boolean recordAudio)
throws java.lang.Exception
- Throws:
java.lang.Exception
recorderStop
@Rpc(description="Stops a previously started recording.")
public void recorderStop()
startInteractiveVideoRecording
@Rpc(description="Starts the video capture application to record a video and saves it to the specified path.")
public void startInteractiveVideoRecording(@RpcParameter(name="path")
java.lang.String path)
shutdown
public void shutdown()
- Description copied from class:
RpcReceiver
- Invoked when the receiver is shut down.
- Specified by:
shutdown in class RpcReceiver