Package org.linphone.core
Interface Recorder
public interface Recorder
Object used to record the audio or video of a call.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the opened file.Create a content from the recording, for example to send it in a chat message.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.Retrieve theRecorderParamsobject.getState()Gets the current state of the recorder.Gets the object stored in this object user's dataintOpen a file for recording.intpause()Pause the recording.voidsetParams(RecorderParams params) Set theRecorderParamsobject.voidsetUserData(Object data) Sets the object to store in this object user's dataintstart()Start 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()Close the opened file.
-
createContent
Create a content from the recording, for example to send it in a chat message.
warning: Recorder must be in Closed state!- Returns:
- the
Contentmatching the recording, or null.
-
open
Open a file for recording.
- Parameters:
file- The path to the file to open.
-
pause
int pause()Pause the recording.
-
start
int start()Start 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()
-