BLOG | DOCUMENTATION | TRAC

Home --> Documentations --> PJMEDIA Reference

pjmedia_snd_port_param Struct Reference

Data Fields

pjmedia_aud_param base
 
unsigned options
 
unsigned ec_options
 
void * user_data
 
pjmedia_aud_play_cb on_play_frame
 
pjmedia_aud_rec_cb on_rec_frame
 

Detailed Description

This structure specifies the parameters to create the sound port. Use pjmedia_snd_port_param_default() to initialize this structure with default values (mostly zeroes)

Field Documentation

◆ base

pjmedia_aud_param pjmedia_snd_port_param::base

Base structure.

◆ options

unsigned pjmedia_snd_port_param::options

Sound port creation options.

◆ ec_options

unsigned pjmedia_snd_port_param::ec_options

Echo cancellation options/flags.

◆ user_data

void* pjmedia_snd_port_param::user_data

Arbitrary user data for playback and record preview callbacks below.

◆ on_play_frame

pjmedia_aud_play_cb pjmedia_snd_port_param::on_play_frame

Optional callback for audio frame preview right before queued to the speaker. Notes:

  • application MUST NOT block or perform long operation in the callback as the callback may be executed in sound device thread
  • when using software echo cancellation, application MUST NOT modify the audio data from within the callback, otherwise the echo canceller will not work properly.
  • the return value of the callback will be ignored

◆ on_rec_frame

pjmedia_aud_rec_cb pjmedia_snd_port_param::on_rec_frame

Optional callback for audio frame preview recorded from the microphone before being processed by any media component such as software echo canceller. Notes:

  • application MUST NOT block or perform long operation in the callback as the callback may be executed in sound device thread
  • when using software echo cancellation, application MUST NOT modify the audio data from within the callback, otherwise the echo canceller will not work properly.
  • the return value of the callback will be ignored

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

 


PJMEDIA small footprint Open Source media stack
Copyright (C) 2006-2008 Teluu Inc.