Package org.linphone.core
Interface Recorder
public interface Recorder
Object used to record the audio or video of a call.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close the opened file.Create a content from the recording, for example to send it in a chat message.float
Get linear volume when capturing audio.int
Gets the duration of the recording.getFile()
Gets the file used for recording.long
Gets the native pointer used by this class to make native method calls.Retrieve theRecorderParams
object.getState()
Gets the current state of the recorder.Gets the object stored in this object user's dataint
Open a file for recording.int
pause()
Pause the recording.void
setParams
(RecorderParams params) Set theRecorderParams
object.void
setUserData
(Object data) Sets the object to store in this object user's dataint
start()
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
RecorderParams
object.
-
setParams
- Parameters:
params
- TheRecorderParams
object 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
Content
matching 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()
-