bits_per_sample (PJMEDIA_PIA_BITS)
change in a reinvite, we recreate the AudioEndpoint conf (#74) and add the new stream port and new dtmfdet port to it.
However the other ports are not recreated/added.
Let's consider if this would be possible:
wav_player: we might need to do this:
add a function to permit to check the number of samples that were played so far (well we might get stats from some pjmedia function)
recreate the port and seek to the number of samples so that we can continue playing from it
wav_writer:
when the port is destroyed, ensure the wav file is closed
the port create function should be modified with bool parameter 'append' which would indicate to open an existing wav file and append to it.
recreate the port with parameter 'append' set to true
tonegen (inband dtmf generation):
the port needs to provide a function to check the pending digits to be sent
when recreating the port, immediately add the pending digits to it (obs: this would be susceptible to a gitch so we might need to indicate if the first digit must be immediately generated if its output was not complete in the previous port
fax: this might not be doable as we would be in the middle of fax communication and we cannot open a tiff file for seek-read or append like we would do with wav_player/wav_writer
flite: similar to wav_player (seek to number of samples transmitted so far)
pocketsphinx (future):
need to have a function to permit to flush partial transcripts. But if there is not, just recreate the port
In all cases, a resample_port might need to be added.
If the following stream port characteristics
In all cases, a resample_port might need to be added.