a-mediastreamer2  5.2.0
Functions

Functions

struct _MSFilter * ms_snd_card_create_reader (MSSndCard *obj)
 
struct _MSFilter * ms_snd_card_create_writer (MSSndCard *obj)
 
MSSndCardms_snd_card_new (MSSndCardDesc *desc)
 
void ms_snd_card_destroy (MSSndCard *obj)
 
MSSndCardms_snd_card_dup (MSSndCard *card)
 
const char * ms_snd_card_get_driver_type (const MSSndCard *obj)
 
const char * ms_snd_card_get_name (const MSSndCard *obj)
 
const char * ms_snd_card_get_string_id (MSSndCard *obj)
 
unsigned int ms_snd_card_get_capabilities (const MSSndCard *obj)
 
void ms_snd_card_set_level (MSSndCard *obj, MSSndCardMixerElem e, int percent)
 
int ms_snd_card_get_level (MSSndCard *obj, MSSndCardMixerElem e)
 
void ms_snd_card_set_capture (MSSndCard *obj, MSSndCardCapture c)
 
int ms_snd_card_set_control (MSSndCard *obj, MSSndCardControlElem e, int val)
 
int ms_snd_card_get_control (MSSndCard *obj, MSSndCardControlElem e)
 
MSSndCardms_alsa_card_new_custom (const char *pcmdev, const char *mixdev)
 

Detailed Description

Function Documentation

◆ ms_snd_card_create_reader()

struct _MSFilter* ms_snd_card_create_reader ( MSSndCard obj)

Create an INPUT filter based on the selected sound card.

Parameters
objA sound card object.

Returns: A MSFilter if successful, NULL otherwise.

◆ ms_snd_card_create_writer()

struct _MSFilter* ms_snd_card_create_writer ( MSSndCard obj)

Create an OUPUT filter based on the selected sound card.

Parameters
objA sound card object.

Returns: A MSFilter if successful, NULL otherwise.

◆ ms_snd_card_new()

MSSndCard* ms_snd_card_new ( MSSndCardDesc desc)

Create a new sound card object.

Parameters
descA sound card description object.

Returns: MSSndCard if successful, NULL otherwise.

◆ ms_snd_card_destroy()

void ms_snd_card_destroy ( MSSndCard obj)

Destroy sound card object.

Parameters
objA MSSndCard object.

◆ ms_snd_card_dup()

MSSndCard* ms_snd_card_dup ( MSSndCard card)

Duplicate a sound card object.

This helps to open several time a sound card.

Parameters
cardA sound card object.

Returns: MSSndCard if successful, NULL otherwise.

◆ ms_snd_card_get_driver_type()

const char* ms_snd_card_get_driver_type ( const MSSndCard obj)

Retreive a sound card's driver type string.

Internal driver types are either: "OSS, ALSA, WINSND, PASND, CA"

Parameters
objA sound card object.

Returns: a string if successful, NULL otherwise.

◆ ms_snd_card_get_name()

const char* ms_snd_card_get_name ( const MSSndCard obj)

Retreive a sound card's name.

Parameters
objA sound card object.

Returns: a string if successful, NULL otherwise.

◆ ms_snd_card_get_string_id()

const char* ms_snd_card_get_string_id ( MSSndCard obj)

Retreive sound card's name ($driver_type: $name).

Parameters
objA sound card object.

Returns: A string if successful, NULL otherwise.

◆ ms_snd_card_get_capabilities()

unsigned int ms_snd_card_get_capabilities ( const MSSndCard obj)

Retreive sound card's capabilities.

  MS_SND_CARD_CAP_CAPTURE
  MS_SND_CARD_CAP_PLAYBACK
  MS_SND_CARD_CAP_CAPTURE|MS_SND_CARD_CAP_PLAYBACK
Parameters
objA sound card object.

Returns: A unsigned int if successful, 0 otherwise.

◆ ms_snd_card_set_level()

void ms_snd_card_set_level ( MSSndCard obj,
MSSndCardMixerElem  e,
int  percent 
)

Set some mixer level value.

  MS_SND_CARD_MASTER,
  MS_SND_CARD_PLAYBACK,
  MS_SND_CARD_CAPTURE

Note: not implemented on all sound card filters.

Parameters
objA sound card object.
eA sound card mixer object.
percentA volume level.

◆ ms_snd_card_get_level()

int ms_snd_card_get_level ( MSSndCard obj,
MSSndCardMixerElem  e 
)

Get some mixer level value.

  MS_SND_CARD_MASTER,
  MS_SND_CARD_PLAYBACK,
  MS_SND_CARD_CAPTURE

Note: not implemented on all sound card filters.

Parameters
objA sound card object.
eA sound card mixer object.

Returns: A int if successful, <0 otherwise.

◆ ms_snd_card_set_capture()

void ms_snd_card_set_capture ( MSSndCard obj,
MSSndCardCapture  c 
)

Set some source for capture.

  MS_SND_CARD_MIC,
  MS_SND_CARD_LINE

Note: not implemented on all sound card filters.

Parameters
objA sound card object.
cA sound card capture value.

Returns: A int if successful, 0 otherwise.

◆ ms_snd_card_set_control()

int ms_snd_card_set_control ( MSSndCard obj,
MSSndCardControlElem  e,
int  val 
)

Set some mixer control.

  MS_SND_CARD_MASTER_MUTE, -> 0: unmute, 1: mute
  MS_SND_CARD_PLAYBACK_MUTE, -> 0: unmute, 1: mute
  MS_SND_CARD_CAPTURE_MUTE -> 0: unmute, 1: mute

Note: not implemented on all sound card filters.

Parameters
objA sound card object.
eA sound card control object.
valA value for control.

Returns: 0 if successful, <0 otherwise.

◆ ms_snd_card_get_control()

int ms_snd_card_get_control ( MSSndCard obj,
MSSndCardControlElem  e 
)

Get some mixer control.

  MS_SND_CARD_MASTER_MUTE, -> return 0: unmute, 1: mute
  MS_SND_CARD_PLAYBACK_MUTE, -> return 0: unmute, 1: mute
  MS_SND_CARD_CAPTURE_MUTE -> return 0: unmute, 1: mute

Note: not implemented on all sound card filters.

Parameters
objA sound card object.
eA sound card mixer object.

Returns: A int if successful, <0 otherwise.

◆ ms_alsa_card_new_custom()

MSSndCard* ms_alsa_card_new_custom ( const char *  pcmdev,
const char *  mixdev 
)

Create a alsa card with user supplied pcm name and mixer name.

Parameters
pcmdevThe pcm device name following alsa conventions (ex: plughw:0)
mixdevThe mixer device name following alsa conventions.

Returns: a MSSndCard object, NULL if alsa support is not available.