Package org.linphone.core

# Interface Recorder

public interface Recorder
Interface used to record audio and video into files.
see: `Core.createRecorder(org.linphone.core.RecorderParams)`

## Nested Class Summary

Nested Classes
Modifier and Type
Interface
Description
`static enum`
`Recorder.State`

## Method Summary

Modifier and Type
Method
Description
`void`
`close()`
Closes the opened file.
`Content`
`createContent()`
Create a `Content` object from the recording, for example to send it
within a `ChatMessage`.
`float`
`getCaptureVolume()`
Get linear volume when capturing audio.
`int`
`getDuration()`
Gets the duration of the recording.
`String`
`getFile()`
Gets the file used for recording.
`long`
`getNativePointer()`
Gets the native pointer used by this class to make native method calls.
`RecorderParams`
`getParams()`
Retrieves the `RecorderParams` object.
`Recorder.State`
`getState()`
Gets the current state of the recorder.
`Object`
`getUserData()`
Gets the object stored in this object user's data
`int`
`open(String file)`
Opens a file for recording.
`int`
`pause()`
Pauses the recording.
`void`
`setParams(RecorderParams params)`
Sets the `RecorderParams` object.
`void`
`setUserData(Object data)`
Sets the object to store in this object user's data
`int`
`start()`
Starts the recording into the opened file.
`String`
`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

@Nullable String getFile()
Gets the file used for recording.

Returns:
  the file used for the recording if any.

### getParams

@NonNull RecorderParams getParams()
Retrieves the `RecorderParams` object.

Returns:
  The `RecorderParams` object.

### setParams

void setParams(@NonNull RecorderParams params)
Sets the `RecorderParams` object.

Parameters:
  `params` - The `RecorderParams` object 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

@Nullable Content createContent()
Create a `Content` object from the recording, for example to send it
within a `ChatMessage`.
warning: Recorder must be in Closed state!

Returns:
  the `Content` matching the recording, or null.

### open

int open(@NonNull String file)
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

void setUserData(Object data)
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()

Overrides:
  `toString` in class `Object`