diff options
author | Benny Prijono <bennylp@teluu.com> | 2011-10-23 05:23:55 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2011-10-23 05:23:55 +0000 |
commit | cc83068c55ebed1f62a37c567ea9730aca1be4b3 (patch) | |
tree | cd75bcedb29b5d051288488151296314894301a7 /pjmedia/include | |
parent | 20336d98d512fe7afb211d85d794192df13b8e68 (diff) |
Fixed #1392: Immediately decode incoming frames to avoid loosing key frames when the jbuf is full and improve latency
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3835 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/include')
-rw-r--r-- | pjmedia/include/pjmedia/config.h | 10 | ||||
-rw-r--r-- | pjmedia/include/pjmedia/jbuf.h | 9 |
2 files changed, 19 insertions, 0 deletions
diff --git a/pjmedia/include/pjmedia/config.h b/pjmedia/include/pjmedia/config.h index 58f56e52..7e41402d 100644 --- a/pjmedia/include/pjmedia/config.h +++ b/pjmedia/include/pjmedia/config.h @@ -1045,6 +1045,16 @@ /** + * Video stream will discard old picture from the jitter buffer as soon as + * new picture is received, to reduce latency. + * + * Default: 0 + */ +#ifndef PJMEDIA_VID_STREAM_SKIP_PACKETS_TO_REDUCE_LATENCY +# define PJMEDIA_VID_STREAM_SKIP_PACKETS_TO_REDUCE_LATENCY 0 +#endif + +/** * @} */ diff --git a/pjmedia/include/pjmedia/jbuf.h b/pjmedia/include/pjmedia/jbuf.h index 83ee852b..2ae4ed6c 100644 --- a/pjmedia/include/pjmedia/jbuf.h +++ b/pjmedia/include/pjmedia/jbuf.h @@ -389,6 +389,15 @@ PJ_DECL(void) pjmedia_jbuf_peek_frame(pjmedia_jbuf *jb, PJ_DECL(unsigned) pjmedia_jbuf_remove_frame(pjmedia_jbuf *jb, unsigned frame_cnt); +/** + * Check if the jitter buffer is full. + * + * @param jb The jitter buffer. + * + * @return PJ_TRUE if it is full. + */ +PJ_DECL(pj_bool_t) pjmedia_jbuf_is_full(const pjmedia_jbuf *jb); + /** * Get jitter buffer current state/settings. |