Liblinphone: linphone::Recorder Class Reference

Liblinphone 5.3.0

Public Types | Public Member Functions | List of all members
linphone::Recorder Class Reference

Object used to record the audio or video of a call. More...

`#include <recorder.hh>`

Inheritance diagram for linphone::Recorder:

## Public Types
enum class | FileFormat { Unknown , Wav , Mkv }
| Enum representing the file format of a recording.
enum class | State { Closed , Paused , Running }
| Enum representing the state of a recording. More...

## Public Member Functions
LINPHONECXX_PUBLIC | Recorder (void *ptr, bool takeRef=true)
LINPHONECXX_PUBLIC _LinphoneRecorder * | cPtr ()
LINPHONECXX_PUBLIC float | getCaptureVolume () const
| Get linear volume when capturing audio.
LINPHONECXX_PUBLIC int | getDuration () const
| Gets the duration of the recording.
LINPHONECXX_PUBLIC std::string | getFile () const
| Gets the file used for recording.
LINPHONECXX_PUBLIC std::shared_ptr< const linphone::RecorderParams > | getParams () const
| Retrieve the RecorderParams object.
LINPHONECXX_PUBLIC void | setParams (const std::shared_ptr< linphone::RecorderParams > &params)
| Set the RecorderParams object.
LINPHONECXX_PUBLIC State | getState () const
| Gets the current state of the recorder.
LINPHONECXX_PUBLIC void | close ()
| Close the opened file.
LINPHONECXX_PUBLIC std::shared_ptr< linphone::Content > | createContent ()
| Create a content from the recording, for example to send it in a chat message.
LINPHONECXX_PUBLIC linphone::Status | open (const std::string &file)
| Open a file for recording.
LINPHONECXX_PUBLIC linphone::Status | pause ()
| Pause the recording.
LINPHONECXX_PUBLIC linphone::Status | start ()
| Start the recording into the opened file.

## Detailed Description

Object used to record the audio or video of a call.

## Member Enumeration Documentation

## ◆ State

enum class linphone::Recorder::State
| strong

Enum representing the state of a recording.

Enumerator
Closed | No file is opened for recording.
Paused | The recorder is paused.
Running | The recorder is running.

## Member Function Documentation

## ◆ createContent()

LINPHONECXX_PUBLIC std::shared_ptr< linphone::Content > linphone::Recorder::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 nullptr.

## ◆ getCaptureVolume()

LINPHONECXX_PUBLIC float linphone::Recorder::getCaptureVolume | ( |  | ) | const

Get linear volume when capturing audio.

Returns
  Linear volume.

## ◆ getDuration()

LINPHONECXX_PUBLIC int linphone::Recorder::getDuration | ( |  | ) | const

Gets the duration of the recording.

Returns
  the duration of the recording, in milliseconds.

## ◆ getFile()

LINPHONECXX_PUBLIC std::string linphone::Recorder::getFile | ( |  | ) | const

Gets the file used for recording.

Returns
  the file used for the recording if any.

## ◆ getParams()

LINPHONECXX_PUBLIC std::shared_ptr< const linphone::RecorderParams > linphone::Recorder::getParams | ( |  | ) | const

Retrieve the RecorderParams object.

Returns
  The RecorderParams object.

## ◆ getState()

LINPHONECXX_PUBLIC State linphone::Recorder::getState | ( |  | ) | const

Gets the current state of the recorder.

Returns
  the current State.

## ◆ open()

LINPHONECXX_PUBLIC linphone::Status linphone::Recorder::open | ( | const std::string & | file | ) |

Open a file for recording.

Parameters

  file | The path to the file to open.

## ◆ setParams()

LINPHONECXX_PUBLIC void linphone::Recorder::setParams | ( | const std::shared_ptr< linphone::RecorderParams > & | params | ) |

Set the RecorderParams object.

Parameters

  params | The RecorderParams object to set.

The documentation for this class was generated from the following file:

- recorder.hh