diff options
-rw-r--r-- | pjmedia/include/pjmedia/config.h | 17 | ||||
-rw-r--r-- | pjmedia/src/pjmedia/stream.c | 2 |
2 files changed, 18 insertions, 1 deletions
diff --git a/pjmedia/include/pjmedia/config.h b/pjmedia/include/pjmedia/config.h index 8fa302ad..948598b0 100644 --- a/pjmedia/include/pjmedia/config.h +++ b/pjmedia/include/pjmedia/config.h @@ -217,6 +217,23 @@ /** + * Limit the number of calls by stream to the PLC to generate synthetic + * frames to this duration. If packets are still lost after this maximum + * duration, silence will be generated by the stream instead. Since the + * PLC normally should have its own limit on the maximum duration of + * synthetic frames to be generated (for PJMEDIA's PLC, the limit is + * PJMEDIA_WSOLA_MAX_EXPAND_MSEC), we can set this value to a large number + * to give additional flexibility should the PLC wants to do something + * clever with the lost frames. + * + * Default: 240 ms + */ +#ifndef PJMEDIA_MAX_PLC_DURATION_MSEC +# define PJMEDIA_MAX_PLC_DURATION_MSEC 240 +#endif + + +/** * Specify number of sound buffers. Larger number is better for sound * stability and to accommodate sound devices that are unable to send frames * in timely manner, however it would probably cause more audio delay (and diff --git a/pjmedia/src/pjmedia/stream.c b/pjmedia/src/pjmedia/stream.c index 9e85054b..6054f9a9 100644 --- a/pjmedia/src/pjmedia/stream.c +++ b/pjmedia/src/pjmedia/stream.c @@ -48,7 +48,7 @@ * synthetic frames, so we need to set this to a reasonably large value * just as precaution */ -#define MAX_PLC_MSEC 240 +#define MAX_PLC_MSEC PJMEDIA_MAX_PLC_DURATION_MSEC /** * Media channel. |