Package org.linphone.core
Interface Recorder
public interface Recorder
Interface used to record audio and video into files.
see:
see:
Core.createRecorder(org.linphone.core.RecorderParams) -
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the opened file.floatGet linear volume when capturing audio.intGets the duration of the recording.getFile()Gets the file used for recording.longGets the native pointer used by this class to make native method calls.Retrieves theRecorderParamsobject.getState()Gets the current state of the recorder.Gets the object stored in this object user's dataintOpens a file for recording.intpause()Pauses the recording.voidsetParams(RecorderParams params) Sets theRecorderParamsobject.voidsetUserData(Object data) Sets the object to store in this object user's dataintstart()Starts the recording into the opened file.toString()
-
Method Details
-
getCaptureVolume
float getCaptureVolume()Get linear volume when capturing audio.
- Returns:
- Linear volume.
-
getDuration
int getDuration()Gets the duration of the recording.
- Returns:
- the duration of the recording, in milliseconds.
-
getFile
Gets the file used for recording.
- Returns:
- the file used for the recording if any.
-
getParams
- Returns:
- The
RecorderParamsobject.
-
setParams
- Parameters:
params- TheRecorderParamsobject to set.
-
getState
Recorder.State getState()Gets the current state of the recorder.
- Returns:
- the current
Recorder.State.
-
close
void close()Closes the opened file.
-
createContent
Create aContentobject from the recording, for example to send it
within aChatMessage.
warning: Recorder must be in Closed state!- Returns:
- the
Contentmatching the recording, or null.
-
open
Opens a file for recording.
If the file already exists, it will open in append mode, otherwise it is
created.- Parameters:
file- The path to the file to open.
-
pause
int pause()Pauses the recording.
-
start
int start()Starts the recording into the opened file.
-
setUserData
Sets the object to store in this object user's data- Parameters:
data- the object to store
-
getUserData
Object getUserData()Gets the object stored in this object user's data- Returns:
- the object store if any, null otherwise
-
getNativePointer
long getNativePointer()Gets the native pointer used by this class to make native method calls.- Returns:
- the nativer pointer, as long
-
toString
String toString()
-