aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/frame.h
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2009-03-05 18:29:38 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2009-03-05 18:29:38 +0000
commit5d5eb54ba76e257b12f5e74bfdfc925e75518a40 (patch)
tree83571b4f0d3351db8bf0aff77046f624f430d382 /include/asterisk/frame.h
parent78d18e52a495a2b1f964a2dceeb7fcc705a79d73 (diff)
Merged revisions 180372 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r180372 | kpfleming | 2009-03-05 12:22:16 -0600 (Thu, 05 Mar 2009) | 9 lines Fix problems when RTP packet frame size is changed During some code analysis, I found that calling ast_rtp_codec_setpref() on an ast_rtp session does not work as expected; it does not adjust the smoother that may on the RTP session, in fact it summarily drops it, even if it has data in it, even if the current format's framing size has not changed. This is not good. This patch changes this behavior, so that if the packetization size for the current format changes, any existing smoother is safely updated to use the new size, and if no smoother was present, one is created. A new API call for smoothers, ast_smoother_reconfigure(), was required to implement these changes. Review: http://reviewboard.digium.com/r/184/ ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@180373 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/frame.h')
-rw-r--r--include/asterisk/frame.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/asterisk/frame.h b/include/asterisk/frame.h
index bb547962c..62485ced6 100644
--- a/include/asterisk/frame.h
+++ b/include/asterisk/frame.h
@@ -523,6 +523,16 @@ int ast_smoother_get_flags(struct ast_smoother *smoother);
int ast_smoother_test_flag(struct ast_smoother *s, int flag);
void ast_smoother_free(struct ast_smoother *s);
void ast_smoother_reset(struct ast_smoother *s, int bytes);
+
+/*!
+ * \brief Reconfigure an existing smoother to output a different number of bytes per frame
+ * \param s the smoother to reconfigure
+ * \param bytes the desired number of bytes per output frame
+ * \return nothing
+ *
+ */
+void ast_smoother_reconfigure(struct ast_smoother *s, int bytes);
+
int __ast_smoother_feed(struct ast_smoother *s, struct ast_frame *f, int swap);
struct ast_frame *ast_smoother_read(struct ast_smoother *s);
#define ast_smoother_feed(s,f) __ast_smoother_feed(s, f, 0)