Liblinphone  5.3.0
Typedefs | Enumerations | Functions
Audio

Typedefs

typedef struct _LinphoneAudioDevice LinphoneAudioDevice
 Object holding audio device information. More...
 
typedef enum _LinphoneAudioDeviceType LinphoneAudioDeviceType
 LinphoneAudioDeviceType enum represents the different types of an audio device.
 
typedef enum _LinphoneAudioDeviceCapabilities LinphoneAudioDeviceCapabilities
 LinphoneAudioDeviceCapabilities enum represents whether a device can record audio, play audio or both
 

Enumerations

enum  _LinphoneAudioDeviceType {
  LinphoneAudioDeviceTypeUnknown = 0,
  LinphoneAudioDeviceTypeMicrophone = 1,
  LinphoneAudioDeviceTypeEarpiece = 2,
  LinphoneAudioDeviceTypeSpeaker = 3,
  LinphoneAudioDeviceTypeBluetooth = 4,
  LinphoneAudioDeviceTypeBluetoothA2DP = 5,
  LinphoneAudioDeviceTypeTelephony = 6,
  LinphoneAudioDeviceTypeAuxLine = 7,
  LinphoneAudioDeviceTypeGenericUsb = 8,
  LinphoneAudioDeviceTypeHeadset = 9,
  LinphoneAudioDeviceTypeHeadphones = 10,
  LinphoneAudioDeviceTypeHearingAid = 11
}
 LinphoneAudioDeviceType enum represents the different types of an audio device. More...
 
enum  _LinphoneAudioDeviceCapabilities {
  LinphoneAudioDeviceCapabilityRecord = 1 << 0,
  LinphoneAudioDeviceCapabilityPlay = 1 << 1,
  LinphoneAudioDeviceCapabilityAll = 3
}
 LinphoneAudioDeviceCapabilities enum represents whether a device can record audio, play audio or both More...
 

Functions

bctbx_list_t * linphone_core_get_audio_devices (const LinphoneCore *core)
 Returns a list of audio devices, with only the first device for each type To have the list of all audio devices, use linphone_core_get_extended_audio_devices() More...
 
bctbx_list_t * linphone_core_get_extended_audio_devices (const LinphoneCore *core)
 Returns the list of all audio devices. More...
 
void linphone_core_set_input_audio_device (LinphoneCore *core, LinphoneAudioDevice *audio_device)
 Sets the given LinphoneAudioDevice as input for all active calls. More...
 
void linphone_core_set_output_audio_device (LinphoneCore *core, LinphoneAudioDevice *audio_device)
 Sets the given LinphoneAudioDevice as output for all active calls. More...
 
const LinphoneAudioDevicelinphone_core_get_input_audio_device (const LinphoneCore *core)
 Gets the input audio device for the current call. More...
 
const LinphoneAudioDevicelinphone_core_get_output_audio_device (const LinphoneCore *core)
 Gets the output audio device for the current call. More...
 
void linphone_core_set_default_input_audio_device (LinphoneCore *core, LinphoneAudioDevice *audio_device)
 Sets the given LinphoneAudioDevice as default input for next calls. More...
 
void linphone_core_set_default_output_audio_device (LinphoneCore *core, LinphoneAudioDevice *audio_device)
 Sets the given LinphoneAudioDevice as default output for next calls. More...
 
const LinphoneAudioDevicelinphone_core_get_default_input_audio_device (const LinphoneCore *core)
 Gets the default input audio device. More...
 
const LinphoneAudioDevicelinphone_core_get_default_output_audio_device (const LinphoneCore *core)
 Gets the default output audio device. More...
 
const char * linphone_audio_device_get_id (const LinphoneAudioDevice *audio_device)
 Returns the id of the audio device. More...
 
const char * linphone_audio_device_get_device_name (const LinphoneAudioDevice *audio_device)
 Returns the name of the audio device. More...
 
const char * linphone_audio_device_get_driver_name (const LinphoneAudioDevice *audio_device)
 Returns the driver name used by the device. More...
 
LinphoneAudioDeviceCapabilities linphone_audio_device_get_capabilities (const LinphoneAudioDevice *audio_device)
 Returns the capabilities of the device. More...
 
LinphoneAudioDeviceType linphone_audio_device_get_type (const LinphoneAudioDevice *audio_device)
 Returns the type of the device. More...
 
bool_t linphone_audio_device_has_capability (const LinphoneAudioDevice *audio_device, const LinphoneAudioDeviceCapabilities capability)
 Returns whether or not the audio device has the given capability. More...
 
LinphoneAudioDevicelinphone_audio_device_ref (LinphoneAudioDevice *audio_device)
 Takes a reference on a LinphoneAudioDevice. More...
 
void linphone_audio_device_unref (LinphoneAudioDevice *audio_device)
 Releases a LinphoneAudioDevice. More...
 

Detailed Description

Typedef Documentation

◆ LinphoneAudioDevice

typedef struct _LinphoneAudioDevice LinphoneAudioDevice

Object holding audio device information.

It contains the name of the device, it's type if available (Earpiece, Speaker, Bluetooth, etc..) and capabilities (input, output or both) the name of the driver that created it (filter in mediastreamer).

You can use the LinphoneAudioDevice objects to configure default input/output devices or do it dynamically during a call.

To get the list of available devices, use linphone_core_get_audio_devices(). This list will be limited to one device of each type. Use linphone_core_get_extended_audio_devices() for a complete list.

Enumeration Type Documentation

◆ _LinphoneAudioDeviceCapabilities

LinphoneAudioDeviceCapabilities enum represents whether a device can record audio, play audio or both

Enumerator
LinphoneAudioDeviceCapabilityRecord 

Can record audio.

LinphoneAudioDeviceCapabilityPlay 

Can play audio.

LinphoneAudioDeviceCapabilityAll 

Can play and record audio.

◆ _LinphoneAudioDeviceType

LinphoneAudioDeviceType enum represents the different types of an audio device.

Enumerator
LinphoneAudioDeviceTypeUnknown 

Unknown.

LinphoneAudioDeviceTypeMicrophone 

Microphone.

LinphoneAudioDeviceTypeEarpiece 

Earpiece.

LinphoneAudioDeviceTypeSpeaker 

Speaker.

LinphoneAudioDeviceTypeBluetooth 

Bluetooth.

LinphoneAudioDeviceTypeBluetoothA2DP 

Bluetooth A2DP.

LinphoneAudioDeviceTypeTelephony 

Telephony.

LinphoneAudioDeviceTypeAuxLine 

AuxLine.

LinphoneAudioDeviceTypeGenericUsb 

GenericUsb.

LinphoneAudioDeviceTypeHeadset 

Headset.

LinphoneAudioDeviceTypeHeadphones 

Headphones.

LinphoneAudioDeviceTypeHearingAid 

Hearing Aid.

Function Documentation

◆ linphone_audio_device_get_capabilities()

LinphoneAudioDeviceCapabilities linphone_audio_device_get_capabilities ( const LinphoneAudioDevice audio_device)

Returns the capabilities of the device.

Parameters
audio_devicethe LinphoneAudioDevice.
Returns
the LinphoneAudioDeviceCapabilities of the audio device (RECORD, PLAY or both) as a bit mask

◆ linphone_audio_device_get_device_name()

const char* linphone_audio_device_get_device_name ( const LinphoneAudioDevice audio_device)

Returns the name of the audio device.

Parameters
audio_devicethe LinphoneAudioDevice.
Returns
the name of the audio device.

◆ linphone_audio_device_get_driver_name()

const char* linphone_audio_device_get_driver_name ( const LinphoneAudioDevice audio_device)

Returns the driver name used by the device.

Parameters
audio_devicethe LinphoneAudioDevice.
Returns
the name of the driver used by this audio device.

◆ linphone_audio_device_get_id()

const char* linphone_audio_device_get_id ( const LinphoneAudioDevice audio_device)

Returns the id of the audio device.

Parameters
audio_devicethe LinphoneAudioDevice.
Returns
the id of the audio device.

◆ linphone_audio_device_get_type()

LinphoneAudioDeviceType linphone_audio_device_get_type ( const LinphoneAudioDevice audio_device)

Returns the type of the device.

Parameters
audio_devicethe LinphoneAudioDevice.
Returns
the LinphoneAudioDeviceType of the audio device (microphone, speaker, earpiece, bluetooth, etc...)

◆ linphone_audio_device_has_capability()

bool_t linphone_audio_device_has_capability ( const LinphoneAudioDevice audio_device,
const LinphoneAudioDeviceCapabilities  capability 
)

Returns whether or not the audio device has the given capability.

Parameters
audio_devicethe LinphoneAudioDevice.
capabilitythe LinphoneAudioDeviceCapabilities to check
Returns
TRUE if the audio device has the capability, FALSE otherwise

◆ linphone_audio_device_ref()

LinphoneAudioDevice* linphone_audio_device_ref ( LinphoneAudioDevice audio_device)

Takes a reference on a LinphoneAudioDevice.

Parameters
audio_devicethe LinphoneAudioDevice.
Returns
the same LinphoneAudioDevice object

◆ linphone_audio_device_unref()

void linphone_audio_device_unref ( LinphoneAudioDevice audio_device)

Releases a LinphoneAudioDevice.

Parameters
audio_devicethe LinphoneAudioDevice.

◆ linphone_core_get_audio_devices()

bctbx_list_t* linphone_core_get_audio_devices ( const LinphoneCore core)

Returns a list of audio devices, with only the first device for each type To have the list of all audio devices, use linphone_core_get_extended_audio_devices()

Parameters
coreThe LinphoneCore
Returns
A list with the first LinphoneAudioDevice of each type

◆ linphone_core_get_default_input_audio_device()

const LinphoneAudioDevice* linphone_core_get_default_input_audio_device ( const LinphoneCore core)

Gets the default input audio device.

Parameters
coreThe LinphoneCore
Returns
The default input audio device

◆ linphone_core_get_default_output_audio_device()

const LinphoneAudioDevice* linphone_core_get_default_output_audio_device ( const LinphoneCore core)

Gets the default output audio device.

Parameters
coreThe LinphoneCore
Returns
The default output audio device

◆ linphone_core_get_extended_audio_devices()

bctbx_list_t* linphone_core_get_extended_audio_devices ( const LinphoneCore core)

Returns the list of all audio devices.

Parameters
coreThe LinphoneCore
Returns
A list of all LinphoneAudioDevice

◆ linphone_core_get_input_audio_device()

const LinphoneAudioDevice* linphone_core_get_input_audio_device ( const LinphoneCore core)

Gets the input audio device for the current call.

Parameters
coreThe LinphoneCore
Returns
The input audio device for the current or first call, NULL if there is no call.

◆ linphone_core_get_output_audio_device()

const LinphoneAudioDevice* linphone_core_get_output_audio_device ( const LinphoneCore core)

Gets the output audio device for the current call.

Parameters
coreThe LinphoneCore
Returns
The output audio device for the current or first call, NULL if there is no call.

◆ linphone_core_set_default_input_audio_device()

void linphone_core_set_default_input_audio_device ( LinphoneCore core,
LinphoneAudioDevice audio_device 
)

Sets the given LinphoneAudioDevice as default input for next calls.

Parameters
coreThe LinphoneCore
audio_deviceThe LinphoneAudioDevice

◆ linphone_core_set_default_output_audio_device()

void linphone_core_set_default_output_audio_device ( LinphoneCore core,
LinphoneAudioDevice audio_device 
)

Sets the given LinphoneAudioDevice as default output for next calls.

Parameters
coreThe LinphoneCore
audio_deviceThe LinphoneAudioDevice

◆ linphone_core_set_input_audio_device()

void linphone_core_set_input_audio_device ( LinphoneCore core,
LinphoneAudioDevice audio_device 
)

Sets the given LinphoneAudioDevice as input for all active calls.

Parameters
coreThe LinphoneCore
audio_deviceThe LinphoneAudioDevice. NULL does nothing.

◆ linphone_core_set_output_audio_device()

void linphone_core_set_output_audio_device ( LinphoneCore core,
LinphoneAudioDevice audio_device 
)

Sets the given LinphoneAudioDevice as output for all active calls.

Parameters
coreThe LinphoneCore
audio_deviceThe LinphoneAudioDevice. NULL does nothing.