aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2009-03-05 18:40:32 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2009-03-05 18:40:32 +0000
commitbfc923cd793c657cde3a28fa1687b1787d51ee9a (patch)
treefad9458f9040a51c090d2890a55a8fdff8d90e8a /include
parent379970a052048766725e5e9b678514a5c5035c1c (diff)
Merged revisions 180373 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r180373 | kpfleming | 2009-03-05 12:29:38 -0600 (Thu, 05 Mar 2009) | 15 lines 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/branches/1.6.1@180378 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-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 d7d895b25..82027fe79 100644
--- a/include/asterisk/frame.h
+++ b/include/asterisk/frame.h
@@ -521,6 +521,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)